three-camera-controller
v0.2.1
Published
Controller for Three.js camera, based on FlyControls
Downloads
3
Readme
three-camera-controller
ThreeCameraController
is a class that binds keyboard/mouse controls to a Three.js
camera. It comes with Stats.js
and its own display which shows the current position and rotation of the target camera.
ThreeCameraController
is based on FlyControls
.
Usage
import TCC from 'three-camera-controller';
const camera = new THREE.PerspectiveCamera(75, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 10000);
const tcc = new TCC(camera);
...
function render() {
this.renderer.render(this.scene, this.camera);
tcc.update();
}
...
License
This software is released under the MIT License.