lesca-threejs-orbitcontrols
v1.1.2
Published
add set polar angle and azimuthal angle
Downloads
113
Maintainers
Readme
Why use it?
add OrbitControls setAzimuthalAngle and getPolarAngle methods.
Live Demo
Installation
npm install lesca-threejs-orbitcontrols --save
Usage
import * as THREE from 'three';
import { OrbitControls } from 'lesca-threejs-orbitcontrols';
const renderer = new THREE.WebGLRenderer();
const camera = new THREE.PerspectiveCamera(75, 16 / 9, 0.1, 1000);
// create controls object
const controls = new new OrbitControls(THREE)(camera, renderer.domElement);
// keep update
function animate() {
requestAnimationFrame(animate);
controls.update();
}
animate();
Development
Methods
| method | description | | :----------------------------------------- | :-----------------: | | .setPolarAngle(angle:number) | set Polar Angle | | .setAzimuthalAngle(angle:number) | set Azimuthal Angle |
Features
- maintain if necessary