Browse Source

Fixed bug: bone.useQuaternions wasn't set, it is now.

Mikael Emtinger 14 years ago
parent
commit
0ee15104cb
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/objects/SkinnedMesh.js

+ 10 - 0
src/objects/SkinnedMesh.js

@@ -38,6 +38,7 @@ THREE.SkinnedMesh = function( geometry, materials ) {
 			bone.name = gbone.name;
 			bone.position.set( p[0], p[1], p[2] ); 
 			bone.quaternion.set( q[0], q[1], q[2], q[3] );
+			bone.useQuaternion = true;
 
 			if ( s !== undefined ) {
 
@@ -49,6 +50,8 @@ THREE.SkinnedMesh = function( geometry, materials ) {
 
 			}
 
+			bone.scale.set( 1, 1, 1 );
+
 		}
 
 		for ( b = 0; b < this.bones.length; b++ ) {
@@ -208,6 +211,11 @@ THREE.SkinnedMesh.prototype.pose = function() {
 
 			orgVertex = this.geometry.vertices[ i ].position;
 
+		// 20, 23
+
+//			this.geometry.skinIndices[ i ].x = 23;
+	//		this.geometry.skinIndices[ i ].y = 23;
+			
 			var indexA = this.geometry.skinIndices[ i ].x;
 			var indexB = this.geometry.skinIndices[ i ].y;
 
@@ -228,6 +236,8 @@ THREE.SkinnedMesh.prototype.pose = function() {
 				this.geometry.skinWeights[ i ].y += len;
 
 			}
+		//		this.geometry.skinWeights[ i ].x = 1;
+			//	this.geometry.skinWeights[ i ].y = 0;
 
 		}