{"id":13491832,"url":"https://github.com/bryik/aframe-controller-cursor-component","last_synced_at":"2025-03-28T08:33:30.891Z","repository":{"id":57174132,"uuid":"63983741","full_name":"bryik/aframe-controller-cursor-component","owner":"bryik","description":"A cursor for tracked controllers.","archived":true,"fork":false,"pushed_at":"2018-10-26T20:33:35.000Z","size":1065,"stargazers_count":30,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-12T00:02:17.933Z","etag":null,"topics":["aframe","oculus","vive","vr"],"latest_commit_sha":null,"homepage":"https://bryik.github.io/aframe-controller-cursor-component/","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/bryik.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":"2016-07-22T21:14:33.000Z","updated_at":"2023-01-28T14:33:26.000Z","dependencies_parsed_at":"2022-09-02T08:01:27.649Z","dependency_job_id":null,"html_url":"https://github.com/bryik/aframe-controller-cursor-component","commit_stats":null,"previous_names":["bryik/aframe-vive-cursor-component"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Faframe-controller-cursor-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Faframe-controller-cursor-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Faframe-controller-cursor-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Faframe-controller-cursor-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryik","download_url":"https://codeload.github.com/bryik/aframe-controller-cursor-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245996975,"owners_count":20707370,"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","oculus","vive","vr"],"created_at":"2024-07-31T19:01:00.614Z","updated_at":"2025-03-28T08:33:30.207Z","avatar_url":"https://github.com/bryik.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"## aframe-controller-cursor-component\n\n**This is an old component!** A-Frame 0.6.0 and up includes [laser-controls](https://aframe.io/docs/0.6.0/components/laser-controls.html). Use that instead!\n\n\u003chr\u003e\n\n[A-Frame](https://aframe.io) component for adding a laser-style cursor to a\ntracked controls (e.g., HTC Vive, Oculus Touch).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://i.imgur.com/QCgZWd7.gif\"/\u003e\n\u003c/p\u003e\n\n### API\n\n| Property   | Description                                                                             | Default Value |\n|------------|-----------------------------------------------------------------------------------------|---------------|\n| color      | Laser color.                                                                            | #74BEC1       |\n| downEvents | Event to detect button down, comma-separated. For example, use `trackpaddown` for 3DoF. | triggerdown   |\n| upEvents   | Event to detect button up, comma-separated. For example, use `trackpadup` for 3DoF.     | triggerup     |\n| radius     | Laser radius (top and bottom).                                                          | 0.001         |\n\n### Usage\n\nAttach the component to an entity alongside a tracked controls entity.\n\n```html\n\u003ca-entity hand-controls=\"right\" controller-cursor\u003e\u003c/a-entity\u003e\n```\n\nThe controller cursor component is based on A-Frame's [built-in\ncursor](https://aframe.io/docs/master/components/cursor.html), many of the\nevents and states are shared.\n\n`mouseup` and `mousedown` are mapped to the trigger. Pulling the trigger will\nemit the same events as clicking.\n\n### Notes\n\nTo avoid intersecting with the laser, the raycaster's `near` property is set to\n0.03. Thus, you may see odd results when the top of the controller is held\nextremely close to the entity you wish to intersect.\n\nThis component was built for the Vive controller model. If you are using a\ndifferent model, you may need to modify the raycaster and position of the\nlaser. In the future, this should be made more easily configurable.\n\n#### Browser\n\nInstall and use by directly including the [browser files](dist):\n\n```html\n\u003chead\u003e\n  \u003ctitle\u003eMy A-Frame Scene\u003c/title\u003e\n  \u003cscript src=\"https://cdn.jsdelivr.net/gh/aframevr/aframe@8d60730f449ae0e50976b0dbe58bad4ce25f6602/dist/aframe-master.min.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://unpkg.com/aframe-controller-cursor-component@0.2.7/dist/aframe-controller-cursor-component.min.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n  \u003ca-scene\u003e\n    \u003ca-entity vive-controls=\"hand: left\"\u003e\u003c/a-entity\u003e\n    \u003ca-entity vive-controls=\"hand: right\" controller-cursor\u003e\u003c/a-entity\u003e\n  \u003c/a-scene\u003e\n\u003c/body\u003e\n```\n\n#### npm\n\nInstall via npm:\n\n```bash\nnpm install aframe-controller-cursor-component\n```\n\nThen register and use.\n\n```js\nrequire('aframe');\nrequire('aframe-controller-cursor-component');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Faframe-controller-cursor-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryik%2Faframe-controller-cursor-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Faframe-controller-cursor-component/lists"}