{"id":15204161,"url":"https://github.com/fibo/three-orbitcontrols","last_synced_at":"2025-10-02T21:30:43.070Z","repository":{"id":57141957,"uuid":"63338747","full_name":"fibo/three-orbitcontrols","owner":"fibo","description":"is the three.js OrbitControls from official repo examples","archived":true,"fork":false,"pushed_at":"2019-12-11T10:23:09.000Z","size":86,"stargazers_count":78,"open_issues_count":0,"forks_count":81,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T16:14:37.978Z","etag":null,"topics":["camera","orbitcontrols","threejs"],"latest_commit_sha":null,"homepage":"http://g14n.info/three-orbitcontrols","language":"JavaScript","has_issues":false,"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/fibo.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-14T13:26:30.000Z","updated_at":"2023-11-11T10:41:59.000Z","dependencies_parsed_at":"2022-09-05T18:50:57.613Z","dependency_job_id":null,"html_url":"https://github.com/fibo/three-orbitcontrols","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/fibo%2Fthree-orbitcontrols","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fthree-orbitcontrols/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fthree-orbitcontrols/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fthree-orbitcontrols/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fibo","download_url":"https://codeload.github.com/fibo/three-orbitcontrols/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235043606,"owners_count":18927006,"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":["camera","orbitcontrols","threejs"],"created_at":"2024-09-28T05:23:10.850Z","updated_at":"2025-10-02T21:30:43.064Z","avatar_url":"https://github.com/fibo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**DEPRECATED**\n\n[three.js] exposes real modules now via three/examples/jsm/...\nFor example to import the Orbit, do\n\n```js\nimport { OrbitControls } from \"three/examples/jsm/controls/OrbitControls\"\n```\n\n# three-orbitcontrols\n\n\u003e is the [three.js] OrbitControls from official repo examples\n\n## Installation\n\nTo install with npm do\n\n```bash\nnpm install three\nnpm install three-orbitcontrols\n```\n\n## Usage\n\nAll credit goes to [OrbitControls.js][original_orbitcontrols] contributors.\nSee also [official OrbitControls documentation][orbitcontrols_documentation].\n\nI have just **stolen** the code and modified to export it as a module so you can do something like\n\n```javascript\nconst THREE = require('three')\nconst OrbitControls = require('three-orbitcontrols')\n// ES6 also works, i.e.\n// import OrbitControls from 'three-orbitcontrols'\n\n// Init THREE scene (add your code)\n\nconst camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000)\ncamera.position.z = 5\n\nconst renderer = new THREE.WebGLRenderer({ canvas })\n\nconst controls = new OrbitControls(camera, renderer.domElement)\ncontrols.enableDamping = true\ncontrols.dampingFactor = 0.25\ncontrols.enableZoom = false\n```\n\nPlease note that:\n\n1. You call `OrbitControls` directly instead of `THREE.OrbitControls`.\n2. This package does not depend directly on [three.js], which is declared as a peer dependency.\n\nSee also examples:\n\n- [CommonJS example](https://github.com/fibo/three-orbitcontrols/tree/master/example.js): clone this repo, install deps and launch `npm run example_commonjs`.\n- [TypeScript example](https://github.com/fibo/three-orbitcontrols/tree/master/example.ts): clone this repo, install deps and launch `npm run example_typescript`.\n\n## Changelog\n\nSee [OrbiControls.js history here](https://github.com/mrdoob/three.js/commits/master/examples/js/controls/OrbitControls.js).\n\nPlease also note that this repo's minor version equals [three.js] release number.\n\n## Motivation\n\nThere is another package similar to this one: [three-orbit-controls].\nI decided to create another package with a different approach, see [this issue for the rationale](https://github.com/mattdesl/three-orbit-controls/issues/17).\n\nI am using this package for my [3d tic tac toe canvas](https://github.com/fibo/tris3d-canvas): see also online [demo](http://g14n.info/tris3d-canvas/example/).\n\n\u003c!--\nI am using this package for my [3d tic tac toe](http://tris3d.net) online game.\n--\u003e\n\n## License\n\nLicense is the same as [three.js], i.e. [MIT].\n\n[original_orbitcontrols]: https://github.com/mrdoob/three.js/tree/master/examples/js/controls/OrbitControls.js \"OrbitControls.js\"\n[orbitcontrols_documentation]: https://threejs.org/docs/#examples/controls/OrbitControls \"OrbitControls documentation\"\n[three.js]: http://threejs.org/ \"three.js\"\n[MIT]: https://github.com/mrdoob/three.js/blob/master/LICENSE \"three.js license\"\n[three-orbit-controls]: https://www.npmjs.com/package/three-orbit-controls \"three-orbit-controls\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibo%2Fthree-orbitcontrols","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffibo%2Fthree-orbitcontrols","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibo%2Fthree-orbitcontrols/lists"}