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

OrbitControls indentation clean up and example simplification.

上级 c2970416
......@@ -411,7 +411,8 @@ THREE.OrbitControls = function ( object, domElement ) {
}
scope.update();
scope.update();
}
function onKeyDown( event ) {
......@@ -501,7 +502,7 @@ THREE.OrbitControls = function ( object, domElement ) {
var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
var needUpdate = false;
var needUpdate = false;
switch ( event.touches.length ) {
......@@ -519,7 +520,7 @@ THREE.OrbitControls = function ( object, domElement ) {
rotateStart.copy( rotateEnd );
needUpdate = true;
needUpdate = true;
break;
case 2: // two-fingered touch: dolly
......@@ -545,7 +546,7 @@ THREE.OrbitControls = function ( object, domElement ) {
dollyStart.copy( dollyEnd );
needUpdate = true;
needUpdate = true;
break;
case 3: // three-fingered touch: pan
......@@ -559,7 +560,7 @@ THREE.OrbitControls = function ( object, domElement ) {
panStart.copy( panEnd );
needUpdate = true;
needUpdate = true;
break;
default:
......
......@@ -52,10 +52,8 @@
var camera, controls, scene, renderer;
var cross;
init();
animate();
render();
function init() {
......@@ -132,13 +130,6 @@
}
function animate() {
requestAnimationFrame( animate );
controls.update();
}
function render() {
renderer.render( scene, camera );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册