Explorar o código

Clean Up MMDHelper (#9784)

Takahiro %!s(int64=8) %!d(string=hai) anos
pai
achega
79f4f7df5d
Modificáronse 1 ficheiros con 4 adicións e 8 borrados
  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 ) {