{"id":15312322,"url":"https://github.com/donmccurdy/aframe-proxy-controls","last_synced_at":"2025-10-08T21:31:51.410Z","repository":{"id":57174248,"uuid":"48520628","full_name":"donmccurdy/aframe-proxy-controls","owner":"donmccurdy","description":"A-Frame component to proxy keyboard/gamepad controls between devices over WebRTC.","archived":true,"fork":false,"pushed_at":"2019-01-19T22:10:21.000Z","size":308,"stargazers_count":50,"open_issues_count":0,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-03T03:16:08.300Z","etag":null,"topics":["aframe","webrtc","websocket","webvr"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donmccurdy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-24T02:27:15.000Z","updated_at":"2024-09-25T22:03:19.000Z","dependencies_parsed_at":"2022-08-29T00:03:03.582Z","dependency_job_id":null,"html_url":"https://github.com/donmccurdy/aframe-proxy-controls","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmccurdy%2Faframe-proxy-controls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmccurdy%2Faframe-proxy-controls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmccurdy%2Faframe-proxy-controls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmccurdy%2Faframe-proxy-controls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donmccurdy","download_url":"https://codeload.github.com/donmccurdy/aframe-proxy-controls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235762307,"owners_count":19041498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aframe","webrtc","websocket","webvr"],"created_at":"2024-10-01T08:36:34.310Z","updated_at":"2025-10-08T21:31:46.109Z","avatar_url":"https://github.com/donmccurdy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A-Frame `proxy-controls` Component\n\n![Status](https://img.shields.io/badge/status-experimental-orange.svg)\n[![License](https://img.shields.io/badge/license-MIT-007ec6.svg)](https://github.com/donmccurdy/aframe-proxy-controls/blob/master/LICENSE)\n\nA-Frame component to proxy keyboard/gamepad controls between devices over WebRTC.\n\n## Overview\n\nWith a mobile device / Google Cardboard for WebVR, designing the UI around a single button is an obstacle. This component provides an *experimental* way to proxy user input events (keyboard, perhaps Leap Motion later) from a keyboard-connected device to the mobile viewer.\n\nFor performance, WebRTC DataStreams are used to minimize latency between the devices. [Browser support for this standard is limited](http://caniuse.com/#feat=rtcpeerconnection) - notably, Safari (including all iPhone browsers) does not support it. I will consider adding fallback support via WebSockets in the future, if the latency is bearable.\n\n## Usage\n\nAdd the `proxy-controls` component to the scene, and use one of the input controller components on the object(s) you want to control. For example:\n\n```html\n\u003ca-scene proxy-controls\u003e\n  \u003ca-entity id=\"player\" gamepad-controls=\"controller: 2\"\u003e\u003c/a-entity\u003e\n\u003c/a-scene\u003e\n```\n\nThe `gamepad-controls` component is available separately, [here](https://github.com/donmccurdy/aframe-gamepad-controls).\n\n## Options\n\nOptions are assigned with A-Frame's entity/component/property pattern:\n\n```html\n\u003ca-scene camera proxy-controls=\"enabled: true;\n                                debug: true;\n                                pairCode: 'my-secret-code';\n                                enableOverlay: false;\"\u003e\n\n  \u003c!-- scene content --\u003e                                 \n                                 \n\u003c/a-scene\u003e\n```\n\n\nProperty            | Default  | Description\n--------------------|----------|-------------\nenabled             | true     | Enables/disables event updates from the host.\ndebug               | false    | Enables/disables logging in the console.\nproxyUrl            | https://proxy-controls.donmccurdy.com | URL of the remote proxy server / signaling server.\npairCode            | \\\u003crandom\\\u003e | Pair code that should be used to match with the remote host. If not provided, a random pair code is assigned.\nenableOverlay       | true | Enables/disables the overlay UI showing the pair code.\nenableOverlayStyles | true | Enables/disables the CSS used to style the pair code overlay.\n\n## Events\n\nWhen the pair code is available, a `proxycontrols.paircode` event is fired. If you want to hide the default overlay, use this to show the pair code to the user as needed:\n\n```javascript\nscene.addEventListener('proxycontrols.paircode', function (e) {\n  console.log(e.detail.pairCode);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonmccurdy%2Faframe-proxy-controls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonmccurdy%2Faframe-proxy-controls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonmccurdy%2Faframe-proxy-controls/lists"}