# freeman.three-orbit-controls **Repository Path**: ASun001/freeman.three-orbit-controls ## Basic Information - **Project Name**: freeman.three-orbit-controls - **Description**: three-orbit-controls - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-07 - **Last Updated**: 2024-11-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # three-orbit-controls-es Orbit Controls for three.js as an es module, with type definitions. This only works in environments where `import { X } from "y"` works (or is transpiled, e.g with webpack). ```javascript import { PerspectiveCamera, WebGLRenderer } from "three" import { OrbitControls } from "three-orbit-controls-es" // Init THREE scene (add your code) var camera = new PerspectiveCamera(75, width / height, 0.1, 1000) camera.position.z = 5 var renderer = new WebGLRenderer({ canvas }) var controls = new OrbitControls(camera, renderer.domElement) controls.enableDamping = true controls.dampingFactor = 0.25 controls.enableZoom = false ``` To install: ```bash npm install @asun01/three-orbit-controls --save ``` Note: License is the same as [three.js], i.e. [MIT]. [original_orbitcontrols]: https://github.com/mrdoob/three.js/tree/master/examples/js/controls/OrbitControls.js "OrbitControls.js" [three.js]: http://threejs.org/ "three.js" [MIT]: https://github.com/mrdoob/three.js/blob/master/LICENSE "three.js license"