73.0.1 • Published 8 years ago

@fabienmotte/three-first-person-controls v73.0.1

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

Three.js / First person controls

NPM version Dependency Status

First person controls written in ES6 for Three.js as UMD.

Installation

npm install --save three @fabienmotte/three-first-person-controls

Usage

ES6

import THREE form 'three';
import FirstPersonControls from '@fabienmotte/three-first-person-controls';

const controls = new FirstPersonControls( camera );
controls.lookSpeed = 0.1;
controls.movementSpeed = 100;

const clock = new THREE.Clock( true );

const render = () => {
  requestAnimationFrame( render );

  controls.update( clock.getDelta() );
};

render();

ES5

var THREE = require( 'three' );
var FirstPersonControls = require( '@fabienmotte/three-first-person-controls' );

var controls = new FirstPersonControls( camera );
controls.lookSpeed = 0.1;
controls.movementSpeed = 100;

var clock = new THREE.Clock( true );

var render = function() {
  requestAnimationFrame( render );

  controls.update( clock.getDelta() );
};

render();

License

MIT © Mr.doob, AlteredQualia and Paul Irish.

73.0.1

8 years ago

73.0.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago