{"id":15579640,"url":"https://github.com/schickling/three-vr","last_synced_at":"2025-04-24T01:28:00.208Z","repository":{"id":21129499,"uuid":"24430413","full_name":"schickling/three-vr","owner":"schickling","description":"Device controls and render steps for mobile virtual reality applications","archived":false,"fork":false,"pushed_at":"2014-10-10T09:34:15.000Z","size":924,"stargazers_count":30,"open_issues_count":2,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-14T12:01:34.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/schickling.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":"2014-09-24T19:59:57.000Z","updated_at":"2022-01-02T12:10:15.000Z","dependencies_parsed_at":"2022-08-27T00:10:46.651Z","dependency_job_id":null,"html_url":"https://github.com/schickling/three-vr","commit_stats":null,"previous_names":["schickling/three.js-vr"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Fthree-vr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Fthree-vr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Fthree-vr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Fthree-vr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schickling","download_url":"https://codeload.github.com/schickling/three-vr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250543287,"owners_count":21447865,"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":[],"created_at":"2024-10-02T19:20:21.846Z","updated_at":"2025-04-24T01:28:00.187Z","avatar_url":"https://github.com/schickling.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"three-vr [![](http://img.shields.io/npm/v/three-vr.svg?style=flat)](https://www.npmjs.org/package/gulp-webserver)\n===========\n\nDevice controls and render steps for mobile virtual reality applications\n\n## Installation\n\nNote: [three.js](https://github.com/mrdoob/three.js) has to be installed as well.\n\n```sh\n$ npm install three-vr\n```\n\n## Usage\n\nCan be loaded with [Browserify](http://browserify.org), RequireJS as `three-vr` or simply included via `\u003cscript\u003e` tag and accessed via global variable `THREE.VR`.\n\n```js\n// load three-vr extension\nvar threevr = require('three-vr');\n\n// init rendering\nthreevr.init({\n  renderer: renderer,\n  camera: camera,\n  scene: scene\n});\n\n// attach to your animation loop\nfunction animate() {\n  requestAnimationFrame(animate);\n  threevr.animate();\n}\n```\n\n## API\n\n### `init(options)`\n\nInitializes the extention. Pass the options below.\n\n##### `options.renderer` (required)\n\nSpecify your application's renderer.\n\n##### `options.camera` (required)\n\nSpecify your application's camera.\n\n##### `options.scene` (required)\n\nSpecify your application's scene.\n\n### `animate()`\n\nUpdates the renderer. Should be called within your animation loop.\n\n## How it works\n\nthree-vr takes the original `camera` and creates a [stereoscopic](http://en.wikipedia.org/wiki/Stereoscopy) effect by using two separated cameras. Each image is then rendered with a [Barrel Distrotion](http://en.wikipedia.org/wiki/Distortion_(optics)).\n\n![](https://raw.githubusercontent.com/schickling/three-vr/master/doc/resources/render-pipeline.png)\n\nEach camera has a slightly different position and thus a different perspective. The Barrel distrotion is implemented via a WebGL fragment shader which runs in parallel on the GPU.\n\n## Development\n\n### Build library\n\n```sh\n$ make build\n```\n\n### Run demo application\n\n```sh\n$ npm start # builds demo\n$ python -m SimpleHTTPServer # starts webserver\n```\n\nOpen `localhost:8000/demo` in your browser.\n\n## Authors\n\n* Johannes Schickling - [Github](https://github.com/schickling) - [Twitter](https://twitter.com/_schickling)\n* Tim Suchanek - [Github](https://github.com/timsuchanek) - [Twitter](https://twitter.com/timsuchanek)\n\n## License\n\n[MIT License](http://opensource.org/licenses/MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschickling%2Fthree-vr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschickling%2Fthree-vr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschickling%2Fthree-vr/lists"}