提交 c12e74b6 编写于 作者: R rchadwic

some light cleanup

上级 ac28e886
......@@ -155,7 +155,7 @@ THREE.Animation.prototype.update = function ( deltaTimeMS ) {
nextKey = animationCache.nextKey[ type ];
// switch keys?
if(!nextKey) debugger;
if ( nextKey.time <= unloopedCurrentTime ) {
// did we loop?
......@@ -168,7 +168,7 @@ THREE.Animation.prototype.update = function ( deltaTimeMS ) {
nextKey = this.getNextKeyWith( type, h, 1 );
//if(nextKey.index < prevKey.index ) then we have wrapped over the end, and nextKey.time < currentTime will loop forever
while( nextKey && nextKey.time < currentTime && nextKey.index > prevKey.index) {
while( nextKey !== null && nextKey.time < currentTime && nextKey.index > prevKey.index) {
prevKey = nextKey;
nextKey = this.getNextKeyWith( type, h, nextKey.index + 1 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册