提交 9493db5f 编写于 作者: M Mr.doob

Merge branch 'smoother_orbit_controls' of https://github.com/lpsinger/three.js into dev

Conflicts:
	examples/js/controls/OrbitControls.js
......@@ -55,12 +55,20 @@
init();
render();
function animate() {
requestAnimationFrame(animate);
controls.update();
}
function init() {
camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.z = 500;
controls = new THREE.OrbitControls( camera );
controls.damping = 0.2;
controls.addEventListener( 'change', render );
scene = new THREE.Scene();
......@@ -117,6 +125,9 @@
window.addEventListener( 'resize', onWindowResize, false );
controls.addEventListener('change', render);
animate();
}
function onWindowResize() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册