0.2.1 • Published 8 years ago

three-camera-controller v0.2.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

three-camera-controller Circle CI npm version

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.