浏览代码

Clean Up MMDHelper (#9784)

Takahiro 8 年之前
父节点
当前提交
79f4f7df5d
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. 4 8
      examples/js/loaders/MMDLoader.js

+ 4 - 8
examples/js/loaders/MMDLoader.js

@@ -4243,9 +4243,12 @@ THREE.MMDHelper.prototype = {
 
 		if ( mixer !== null && this.doAnimation === true ) {
 
+			// restore/backupBones are workaround
+			// until I make IK, Grant, and Physics Animation plugin
+			this.restoreBones( mesh );
+
 			mixer.update( delta );
 
-			// workaround until I make IK, Grant, and Physics Animation plugin
 			this.backupBones( mesh );
 
 		}
@@ -4307,13 +4310,6 @@ THREE.MMDHelper.prototype = {
 
 		}
 
-		// workaround until I make IK and Physics Animation plugin
-		for ( var i = 0; i < this.meshes.length; i++ ) {
-
-			this.restoreBones( this.meshes[ i ] );
-
-		}
-
 	},
 
 	renderMain: function ( scene, camera ) {