Skip to content

Commit 1939065

Browse files
committed
Forgot the sqrt
1 parent 099a93f commit 1939065

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/objects/Skeleton.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ THREE.Skeleton = function ( bones, boneInverses, useVertexTexture ) {
2828
// 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32)
2929
// 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)
3030

31-
var size = THREE.Math.nextPowerOfTwo( this.bones.length * 4 ); // 4 pixels needed for 1 matrix
32-
31+
var size = THREE.Math.nextPowerOfTwo( Math.sqrt( this.bones.length * 4 ) ); // 4 pixels needed for 1 matrix
32+
3333
this.boneTextureWidth = size;
3434
this.boneTextureHeight = size;
3535

0 commit comments

Comments
 (0)