Ver código fonte

Fixed bug caused by incorrect use of Matrix4.decompose(). Also fixed bug in Animation - reference to deprecated Object3D.update() function.

Erik Kitson 13 anos atrás
pai
commit
09304ba87c

+ 1 - 1
src/extras/animation/Animation.js

@@ -361,7 +361,7 @@ THREE.Animation.prototype.update = function( deltaTimeMS ) {
 
 		if ( JIThierarchy[ 0 ][ frame ] === undefined ) {
 
-			this.hierarchy[ 0 ].update( null, true );
+			this.hierarchy[ 0 ].updateMatrixWorld( true );
 
 			for ( var h = 0; h < this.hierarchy.length; h++ ) {
 

+ 6 - 1
src/extras/loaders/ColladaLoader.js

@@ -677,7 +677,12 @@ THREE.ColladaLoader = function () {
 		}
 
 		obj.name = node.id || "";
-		node.matrix.decompose( obj.position, obj.rotation, obj.scale );
+		obj.matrix = node.matrix;
+		var props = node.matrix.decompose();
+		obj.position = props[ 0 ];
+		obj.quaternion = props[ 1 ];
+		obj.useQuaternion = true;
+		obj.scale = props[ 2 ];
 
 		for ( i = 0; i < node.nodes.length; i ++ ) {