Browse Source

Forgot the sqrt

Greg Tatum 10 years ago
parent
commit
1939065fdd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/objects/Skeleton.js

+ 2 - 2
src/objects/Skeleton.js

@@ -28,8 +28,8 @@ THREE.Skeleton = function ( bones, boneInverses, useVertexTexture ) {
 		//       32x32 pixel texture max  256 bones * 4 pixels = (32 * 32)
 		//       32x32 pixel texture max  256 bones * 4 pixels = (32 * 32)
 		//       64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)
 		//       64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)
 		
 		
-		var size = THREE.Math.nextPowerOfTwo( this.bones.length * 4 ); // 4 pixels needed for 1 matrix
-
+		var size = THREE.Math.nextPowerOfTwo( Math.sqrt( this.bones.length * 4 ) ); // 4 pixels needed for 1 matrix
+		
 		this.boneTextureWidth = size;
 		this.boneTextureWidth = size;
 		this.boneTextureHeight = size;
 		this.boneTextureHeight = size;