{"id":20066097,"url":"https://github.com/sean-bradley/grabvr","last_synced_at":"2025-09-07T16:36:32.618Z","repository":{"id":31867357,"uuid":"129616116","full_name":"Sean-Bradley/GrabVR","owner":"Sean-Bradley","description":"A module for grabbing objects in WebVR, Three.js and VRController.js projects","archived":false,"fork":false,"pushed_at":"2024-03-24T20:59:57.000Z","size":2087,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T02:13:48.175Z","etag":null,"topics":["grabvr","rift","threejs","vive","vrcontroller","webvr"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Sean-Bradley.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-04-15T14:06:00.000Z","updated_at":"2023-12-13T14:53:49.000Z","dependencies_parsed_at":"2024-01-10T09:41:03.828Z","dependency_job_id":null,"html_url":"https://github.com/Sean-Bradley/GrabVR","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/Sean-Bradley%2FGrabVR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sean-Bradley%2FGrabVR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sean-Bradley%2FGrabVR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sean-Bradley%2FGrabVR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sean-Bradley","download_url":"https://codeload.github.com/Sean-Bradley/GrabVR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224461885,"owners_count":17315116,"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":["grabvr","rift","threejs","vive","vrcontroller","webvr"],"created_at":"2024-11-13T13:54:31.292Z","updated_at":"2024-11-13T13:54:31.909Z","avatar_url":"https://github.com/Sean-Bradley.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GrabVR\n\nA module for grabbing objects in WebVR Three.js projects\n\nYou can download the project and view the examples.\n\n``` bash\ngit clone https://github.com/Sean-Bradley/GrabVR.git\ncd GrabVR\nnpm install\nnpm run dev\n```\n\nVisit https://127.0.0.1:3000/\n\n## How to import GrabVR\n\n```bash\nnpm install grabvr\n```\n\nImport into your code\n\n``` javascript\nimport GrabVR from 'grabvr'\n```\n\n## Instantiate And Use\n\nCreate a GrabVR object.\n\n```javascript\nconst grabVR = new GrabVR()\n```\n\nCreate some Object3Ds and add then to the GrabVR grabables.\n\n```javascript\nconst box = new THREE.Mesh(\n    new THREE.BoxGeometry(1.0, 1.0, 1.0),\n    new THREE.MeshBasicMaterial({\n        color: 0xff0066,\n        wireframe: true\n    })\n)\nscene.add(box)\ngrabVR.grabableObjects().push(box);\n```\n\nAdd your VR controllers to the scene (see example code for better understanding)\n\n```javascript\nconst controllerGrip0 = renderer.xr.getControllerGrip(0)\ncontrollerGrip0.addEventListener(\"connected\", (e: any) =\u003e {\n    controllerGrip0.add(lefthand)\n    grabVR.add(0, controllerGrip0, e.data.gamepad)\n    scene.add(controllerGrip0)\n})\n```\n\nUpdate in the render loop.\n\n```javascript\ngrabVR.update(clock.getDelta());\nrenderer.render(scene, camera)\n```\n\n## Example 1\n\nBasic GrabVR demo.\n\n[![GrabVR Example 1](./dist/client/img/grabvr-1.gif)](https://sbcode.net/threejs/grabvr-1/)\n\n## Example 2\n\nGrabVR demo using Cannonjs.\n\n[![GrabVR Example 2](./dist/client/img/grabvr-2.gif)](https://sbcode.net/threejs/grabvr-2/)\n\n## GrabVR Source Project\n\nThis is a typescript project consisting of two sub projects with there own *tsconfigs*.\n\nTo edit this example, then modify the files in `./src/client/` or `./src/server/`\n\nThe projects will auto recompile if you started it by using *npm run dev*\n\n## Threejs TypeScript Course\n\nVisit https://github.com/Sean-Bradley/Three.js-TypeScript-Boilerplate for a Threejs TypeScript boilerplate containing many extra branches that demonstrate many examples of Threejs.\n\n\u003e To help support this Threejs example, please take a moment to look at my official Threejs TypeScript course at \n\n[![Threejs TypeScript Course](threejs-course-image.png)](https://www.udemy.com/course/threejs-tutorials/?referralCode=4C7E1DE91C3E42F69D0F)\n\n  [Three.js and TypeScript](https://www.udemy.com/course/threejs-tutorials/?referralCode=4C7E1DE91C3E42F69D0F)\u003cbr/\u003e  \n  Discount Coupons for all my courses can be found at [https://sbcode.net/coupons](https://sbcode.net/coupons)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-bradley%2Fgrabvr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsean-bradley%2Fgrabvr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-bradley%2Fgrabvr/lists"}