{"id":14384435,"url":"https://github.com/gftruj/aframe-hand-tracking-controls-extras","last_synced_at":"2025-10-24T01:31:07.169Z","repository":{"id":39631323,"uuid":"319728134","full_name":"gftruj/aframe-hand-tracking-controls-extras","owner":"gftruj","description":"a-frame hand tracking extras","archived":false,"fork":false,"pushed_at":"2023-09-29T20:40:31.000Z","size":45373,"stargazers_count":52,"open_issues_count":2,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-30T22:17:12.930Z","etag":null,"topics":["aframe","aframevr","oculus-quest","vr","webxr"],"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/gftruj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-08T18:36:26.000Z","updated_at":"2025-01-07T12:20:02.000Z","dependencies_parsed_at":"2024-01-14T20:26:20.028Z","dependency_job_id":null,"html_url":"https://github.com/gftruj/aframe-hand-tracking-controls-extras","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gftruj%2Faframe-hand-tracking-controls-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gftruj%2Faframe-hand-tracking-controls-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gftruj%2Faframe-hand-tracking-controls-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gftruj%2Faframe-hand-tracking-controls-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gftruj","download_url":"https://codeload.github.com/gftruj/aframe-hand-tracking-controls-extras/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237901410,"owners_count":19384384,"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","aframevr","oculus-quest","vr","webxr"],"created_at":"2024-08-28T18:01:23.133Z","updated_at":"2025-10-24T01:31:02.111Z","avatar_url":"https://github.com/gftruj.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# hand-tracking-controls-extras\n\n\n### Disclaimer\n\nWhen I rushed at `a-frame`s finger tracking I wasn't aware, that I'm kinda reinventing the wheel.\nA great place with multiple examples is [Marlon Lückerts repository](https://github.com/marlon360/webxr-handtracking).\n\nAnother great repo with gesture detection is [Ada Rose Cannon handy-work](https://github.com/AdaRoseCannon/handy-work)\n\nOn the other hand, I've learned a lot doing this, and am fully willing to continue :)\nTo all starring, and forking people - thank You! Any ideas are more then welcome ( i.e. in form of an issue )\n\n----\n\n\n## Navigation components\n\nTeleport, drag yourself around, or rotate the world like this:\n\nhttps://user-images.githubusercontent.com/17348360/155236391-98df435e-2949-4ea1-8a72-b7ca017ada9a.mp4\n\nWith a simple setup like this:\n\n    \u003ca-entity id=\"rig\"\u003e\n      \u003ca-camera\u003e\u003c/a-camera\u003e\n      \u003c!-- left hand can teleport, and drag the world position --\u003e\n      \u003ca-entity hand-tracking-controls=\"hand: left\" hand-tracking-extras\n      hand-teleport=\"rig: #rig; origin: a-camera\" drag-move=\"rig: #rig; speed: 5\"\u003e\n      \u003c/a-entity\u003e\n     \n      \u003c!-- right hand can rotate the world by dragging --\u003e\n      \u003ca-entity hand-tracking-controls=\"hand: right\" hand-tracking-extras drag-rotate=\"rig: #rig\"\u003e\n      \u003c/a-entity\u003e\n    \u003c/a-entity\u003e\n\nMore info in the [docs](./components)\n\n## Simplified (?) Joints API\n\n### Hands in browser:\nImport the script:\n\n    \u003cscript src=\"https://gftruj.github.io/hand.tracking.controls.extras/dist/aframe-hand-tracking-controls-extras.js\"\u003e\u003c/script\u003e\n\nAdd the `hand-tracking-extras` to the hand:\n \n    \u003ca-entity id=\"left-hand\" hand-tracking-controls=\"hand: left; \" hand-tracking-extras\u003e\u003c/a-entity\u003e\n\nWait for the `hand-tracking-extras-ready` event:\n\n    var hand = document.getElementById(\"left-hand\");\n    hand.addEventListener(\"hand-tracking-extras-ready\", (evt) =\u003e {\n      var jointsAPI = evt.detail.data.jointsAPI;\n    });\n\nOr grab the joints manually:\n    \n    var joints = document.getElementById(\"left-hand\").components[\"hand-tracking-extras\"].jointsAPI\n    var Wrist = joints.getWrist();\n    console.log(Wrist.getPosition());\n    \nCheck out the API and the [XRHand docs](https://immersive-web.github.io/webxr-hand-input/#skeleton-joints-section).\n\n## API\n\nEach joint has its \"helper\" method:\n\nArguments are optional, but providing them will save memory (as otherwise internal helpers are cloned and returned);\n\nJoint object method  | Description\n---------------------| ------------- \n`getPosition(vector)` | fills the vector with the joint position\n`getDirection(vector)` | fills the vector with the normalized direction\n`getNormal(vector)` | fills the vector with the normal vector.\n`getQuaternion(quaternion)` | fills the quaternion with the joint orientation. \n`getRadius()` | get joint radius\n`isValid()` | whether we could read the pose data\n\nJoints\n\nGrab the joints with:\n   \n    // jointsAPI.get\u003cFinger\u003e\u003cBone\u003e()\n    // example: const index_tip = jointAPI.getIndexTip();\n    // \n    // Fingers: Wrist(special case, single bone), Index, Middle, Ring, Little\n    // Bones: Metacarpal, Proximal, Intermediate, Distal, Tip\n\nFrom the [WebXR hand docs](https://www.w3.org/TR/webxr-hand-input-1/#xrjointpose):\n\n![rawQ vs Q](https://immersive-web.github.io/webxr-hand-input/images/hand-layout.svg?raw=true \"Normals\")\n\n\nSimilar to the WebXR hand API, the joints are\n\nJoint name  | XRHand corresponding name (index)\n------------- | -------------   \nWrist | XRHand.WRIST (0)\nT_Metacarpal | XRHand.THUMB_METACARPAL (1)\nT_Proximal | XRHand.THUMB_PHALANX_PROXIMAL (2)\nT_Distal | XRHand.THUMB_PHALANX_DISTAL (3)\nT_Tip | XRHand.THUMB_PHALANX_TIP (4)\nI_Metacarpal | XRHand.INDEX_METACARPAL (5)\nI_Proximal | XRHand.INDEX_PHALANX_PROXIMAL (6)\nI_Intermediate | XRHand.INDEX_PHALANX_INTERMEDIATE (7)\nI_Distal | XRHand.INDEX_PHALANX_DISTAL (8)\nI_Tip | XRHand.INDEX_PHALANX_TIP (9)\nM_Metacarpal | XRHand.MIDDLE_METACARPAL (10)\nM_Proximal | XRHand.MIDDLE_PHALANX_PROXIMAL (11)\nM_Intermediate | XRHand.MIDDLE_PHALANX_INTERMEDIATE (12)\nM_Distal | XRHand.MIDDLE_PHALANX_DISTAL (13)\nM_Tip | XRHand.MIDDLE_PHALANX_TIP (14)\nR_Metacarpal | XRHand.RING_METACARPAL (15)\nR_Proximal | XRHand.RING_PHALANX_PROXIMAL (16)\nR_Intermediate | RHand.RING_PHALANX_INTERMEDIATE (17)\nR_Distal | XRHand.RING_PHALANX_DISTAL (18)\nR_Tip | XRHand.RING_PHALANX_TIP (19)\nL_Metacarpal | XRHand.LITTLE_METACARPAL (20)\nL_Proximal | XRHand.LITTLE_PHALANX_PROXIMAL (21)\nL_Intermediate | XRHand.LITTLE_PHALANX_INTERMEDIATE (22)\nL_Distal | XRHand.LITTLE_PHALANX_DISTAL (23)\nL_Tip | XRHand.LITTLE_PHALANX_TIP (24)\n\n### Roadmap - wishful thinking\n\nProvide:\n\n\n1. a simple API for Joints orientation and relations:\n    - `.islookingUp()`, `isHorizontallyAligned()`, `.isCloseTo(other)`, `orientedLike(other)`\n\n2. Integrate navigation components with Adas `handy-work`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgftruj%2Faframe-hand-tracking-controls-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgftruj%2Faframe-hand-tracking-controls-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgftruj%2Faframe-hand-tracking-controls-extras/lists"}