OrbitControls with Damping

Is there a way, a plugin, or an idea to give THREE.js OrbitControls an inertia effect during rotation?

I would like to rotate the world sphere with some damping like this: http://stemkoski.imtqy.com/Three.js/Polyhedra.html

The original behavior of OrbitControls as follows: http://threejs.org/examples/#misc_controls_orbit

+6
source share
1 answer

OrbitControls now supports damping / inertia.

 controls = new THREE.OrbitControls( camera, renderer.domElement ); controls.enableDamping = true; controls.dampingFactor = 0.05; 

Then in the animation loop add

 controls.update(); // required if controls.enableDamping = true, or if controls.autoRotate = true 

three.js r.108

+14
source

All Articles