Mar*_*nix 6 javascript three.js
是否有一种方法,插件或想法可以让THREE.js OrbitControls
在旋转时产生惯性效应?
我想用这样的阻尼旋转一个世界范围:http: //stemkoski.github.io/Three.js/Polyhedra.html
原始OrbitControls
行为如下所示:http:
//threejs.org/examples/#misc_controls_orbit
Wes*_*ley 14
OribtControls现在支持阻尼/惯性.
controls = new THREE.OrbitControls( camera, renderer.domElement );
controls.enableDamping = true;
controls.dampingFactor = 0.05;
Run Code Online (Sandbox Code Playgroud)
然后在动画循环中添加
controls.update(); // required if controls.enableDamping = true, or if controls.autoRotate = true
Run Code Online (Sandbox Code Playgroud)
three.js r.72