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

Minor clean up.

上级 eb7da5e2
......@@ -55,7 +55,7 @@
var kfAnimations = [ ];
var kfAnimationsLength = 0;
var loader = new THREE.ColladaLoader();
var lastTimestamp;
var lastTimestamp = 0;
var progress = 0;
loader.load( './models/collada/pump/pump.dae', function ( collada ) {
......@@ -188,18 +188,17 @@
}
}
animation.loop = false;
animation.play();
lastTimestamp = Date.now();
}
}
function animate() {
function animate( timestamp ) {
var timestamp = Date.now();
var frameTime = ( timestamp - lastTimestamp ) * 0.001; // seconds
var frameTime = ( timestamp - lastTimestamp ) * 0.001;
if ( progress >= 0 && progress < 48 ) {
......
......@@ -3235,7 +3235,7 @@ THREE.WebGLRenderer = function ( parameters ) {
opaqueObjects.length = 0;
transparentObjects.length = 0;
projectObject( scene, scene, camera );
projectObject( scene, scene );
if ( _this.sortObjects === true ) {
......@@ -3333,7 +3333,7 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function projectObject(scene, object,camera){
function projectObject( scene, object ) {
if ( object.visible === false ) return;
......@@ -3390,7 +3390,7 @@ THREE.WebGLRenderer = function ( parameters ) {
for ( var i = 0, l = object.children.length; i < l; i ++ ) {
projectObject( scene, object.children[ i ], camera );
projectObject( scene, object.children[ i ] );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册