{"id":18964121,"url":"https://github.com/janeliascicomp/three-orbit-unlimited-controls","last_synced_at":"2025-04-19T12:48:22.815Z","repository":{"id":38823187,"uuid":"250130113","full_name":"JaneliaSciComp/three-orbit-unlimited-controls","owner":"JaneliaSciComp","description":"A THREE.js camera controller that improves on OrbitControls and TrackballControls.","archived":false,"fork":false,"pushed_at":"2023-03-04T08:09:59.000Z","size":341,"stargazers_count":11,"open_issues_count":12,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T08:02:29.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JaneliaSciComp.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-26T01:17:14.000Z","updated_at":"2023-12-04T18:01:51.000Z","dependencies_parsed_at":"2024-11-08T14:24:15.059Z","dependency_job_id":"0f71a71b-cbbb-4386-ab91-ae75b4e0605a","html_url":"https://github.com/JaneliaSciComp/three-orbit-unlimited-controls","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneliaSciComp%2Fthree-orbit-unlimited-controls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneliaSciComp%2Fthree-orbit-unlimited-controls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneliaSciComp%2Fthree-orbit-unlimited-controls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneliaSciComp%2Fthree-orbit-unlimited-controls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaneliaSciComp","download_url":"https://codeload.github.com/JaneliaSciComp/three-orbit-unlimited-controls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249201117,"owners_count":21229004,"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-11-08T14:22:54.125Z","updated_at":"2025-04-16T05:31:47.417Z","avatar_url":"https://github.com/JaneliaSciComp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OrbitUnlimitedControls\n\nA camera controller for [THREE.js](https://threejs.org) that addresses some limitations of some other, widely used controllers:\n* https://threejs.org/docs/#examples/en/controls/OrbitControls\n* https://threejs.org/docs/#examples/en/controls/TrackballControls\n\nFor looking around a scene, OrbitControls is a common choice.  But it has a limit on the\nrotation that can be achieved by moving the mouse vertically: the camera cannot go \"over the\nnorth pole\" or \"under the south pole.\"\n\nTrackballControls does not have this limitation.  Yet it suffers from \"twist\" around the viewing\naxis, which gradually accumulates over the course of interaction and makes it difficult to\nreturn to an original orientation.  It also does not emit a `change` event on each camera\nmovement, so updating the rendering to reflect the camera movement requires the use of\n[Window.requestAnimationFrame()](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).\n\nOrbitUnlimitedControls is free of these limitations.  It is meant to implement the API of\nOrbitControls (or at least the most important parts of that API), so it can be used as a simple\nreplacement for that controller.\n\n## Constructor\n\n`OrbitUnlimitedControls(object : Camera, domElement : HTMLDOMElement)`\n\n`object`: The camera to be controlled.  \n`domElement`: The HTML element used for event listeners.\n\n\n## API Matching OrbitControls\n\n`.keyPanSpeed : Float`\n\n`.keys : Object`\n\n`.maxDistance : Float`\n\n`.minDistance : Float`\n\n`.rotateSpeed : Float`\n\n`.target : Vector3`\n\n`.zoomSpeed : Float`\n\n\n## New API\n\n`.clicked : Boolean`\n\nThe standard `click` event is sent by `this.domElement` for any `mousedown` followed by `mouseup`.  But a more useful definition of a `click` is whent he cursor moves less than a couple of pixels between the `mousedown` and the `mouseup`.  In that case, `this.clicked` will be `true`.\n\n`.usePanModAlt : Boolean`\n\n`.usePanModShift : Boolean`\n\n`.usePanModCtrl : Boolean`\n\n`.usePanModMeta : Boolean`\n\nThese booleans enable modifier keys to make a left-button mouse drag perform camera panning.  The default is `usePanModAlt` being `true` and the others `false`.  Note that on Apple keyboards, \"alt\" is \"option\", \"ctrl\" is \"control\", and \"meta\" is \"command\".\n\n\n## Installation\n\nThe simplest approach is to use the [npm module](https://www.npmjs.com/package/@janelia/three-orbit-unlimited-controls):\n```\nnpm install --save @janelia/three-orbit-unlimited-controls\n```\n\nFor development, clone the repository and build it:\n```\nnpm install\nnpm run build\nnpm link\n```\nThen use that build in an application:\n```\nnpm link @janelia/three-orbit-unlimited-controls\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaneliascicomp%2Fthree-orbit-unlimited-controls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaneliascicomp%2Fthree-orbit-unlimited-controls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaneliascicomp%2Fthree-orbit-unlimited-controls/lists"}