Using OrbitControl.js in Three.js revision 70

An example of using the OrbitControl.js library to manipulate the camera in Three.js rev. 70.
var controls = new THREE.OrbitControls( camera, webGLRenderer.domElement );
    controls.target.set( 0, -1400, 0 );

  // remember to put this inside the render function

function render() {

  // your code

  controls.update();

  // your code

}

Responses

0 Replies