提交 15950876 编写于 作者: P Paul Masson 提交者: GitHub

Disable animation loop

This modification emphasizes that an animation loop is unnecessary for a static scene.
上级 700d80ea
......@@ -53,7 +53,7 @@
var camera, controls, scene, renderer;
init();
animate();
//animate();
function init() {
......@@ -72,9 +72,10 @@
camera.position.z = 500;
controls = new THREE.OrbitControls( camera, renderer.domElement );
//controls.addEventListener( 'change', render ); // add this only if there is no animation loop (requestAnimationFrame)
controls.enableDamping = true;
controls.dampingFactor = 0.25;
controls.addEventListener( 'change', render ); // remove when using animation loop (requestAnimationFrame)
// enable animation loop when using damping or autorotation
//controls.enableDamping = true;
//controls.dampingFactor = 0.25;
controls.enableZoom = false;
// world
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册