gl-flyCamera
✈️ controls
Installation
$ npm install gl-flyCamera
Example
controls = domElement: document // default: document movementSpeed: 100 // default: 10 rollSpeed: MathPI // default: Math.PI / 3 dragToLook: true // default: false autoForward: true // default: false paused: true //default: false position: 1 2 5 //default: [0, 0, 0];controlsstart; var lastTimeStamp = 0;{ var delta = timeStamp - lastTimeStamp; lastTimeStamp = timeStamp; controls; var currentPosition = controlsposition; //current camera position var currentOrientation = controlsquaternion; //current camera orientation /* ...doing the actual rendering */ window;}window;
Badges