diff --git a/src/model.ts b/src/model.ts index 6485f3d..caf4b2f 100644 --- a/src/model.ts +++ b/src/model.ts @@ -81,7 +81,7 @@ export class SkinObject extends Group { layer2MaterialBiased.polygonOffsetUnits = 1.0; // Head - const headBox = new BoxGeometry(8, 8, 8, 1, 1, 1); + const headBox = new BoxGeometry(8, 8, 8); setVertices(headBox, toSkinVertices(8, 0, 16, 8), toSkinVertices(16, 0, 24, 8), @@ -92,7 +92,7 @@ export class SkinObject extends Group { ); const headMesh = new Mesh(headBox, layer1Material); - const head2Box = new BoxGeometry(9, 9, 9, 1, 1, 1); + const head2Box = new BoxGeometry(9, 9, 9); setVertices(head2Box, toSkinVertices(40, 0, 48, 8), toSkinVertices(48, 0, 56, 8), @@ -110,7 +110,7 @@ export class SkinObject extends Group { this.add(this.head); // Body - const bodyBox = new BoxGeometry(8, 12, 4, 1, 1, 1); + const bodyBox = new BoxGeometry(8, 12, 4); setVertices(bodyBox, toSkinVertices(20, 16, 28, 20), toSkinVertices(28, 16, 36, 20), @@ -121,7 +121,7 @@ export class SkinObject extends Group { ); const bodyMesh = new Mesh(bodyBox, layer1Material); - const body2Box = new BoxGeometry(9, 13.5, 4.5, 1, 1, 1); + const body2Box = new BoxGeometry(9, 13.5, 4.5); setVertices(body2Box, toSkinVertices(20, 32, 28, 36), toSkinVertices(28, 32, 36, 36), @@ -139,7 +139,7 @@ export class SkinObject extends Group { this.add(this.body); // Right Arm - const rightArmBox = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related + const rightArmBox = new BoxGeometry(); const rightArmMesh = new Mesh(rightArmBox, layer1Material); this.modelListeners.push(() => { rightArmMesh.scale.x = this.slim ? 3 : 4; @@ -168,7 +168,7 @@ export class SkinObject extends Group { rightArmBox.elementsNeedUpdate = true; }); - const rightArm2Box = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related + const rightArm2Box = new BoxGeometry(); const rightArm2Mesh = new Mesh(rightArm2Box, layer2MaterialBiased); rightArm2Mesh.renderOrder = 1; this.modelListeners.push(() => { @@ -212,7 +212,7 @@ export class SkinObject extends Group { this.add(this.rightArm); // Left Arm - const leftArmBox = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related + const leftArmBox = new BoxGeometry(); const leftArmMesh = new Mesh(leftArmBox, layer1Material); this.modelListeners.push(() => { leftArmMesh.scale.x = this.slim ? 3 : 4; @@ -241,7 +241,7 @@ export class SkinObject extends Group { leftArmBox.elementsNeedUpdate = true; }); - const leftArm2Box = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related + const leftArm2Box = new BoxGeometry(); const leftArm2Mesh = new Mesh(leftArm2Box, layer2MaterialBiased); leftArm2Mesh.renderOrder = 1; this.modelListeners.push(() => { @@ -285,7 +285,7 @@ export class SkinObject extends Group { this.add(this.leftArm); // Right Leg - const rightLegBox = new BoxGeometry(4, 12, 4, 1, 1, 1); + const rightLegBox = new BoxGeometry(4, 12, 4); setVertices(rightLegBox, toSkinVertices(4, 16, 8, 20), toSkinVertices(8, 16, 12, 20), @@ -296,7 +296,7 @@ export class SkinObject extends Group { ); const rightLegMesh = new Mesh(rightLegBox, layer1Material); - const rightLeg2Box = new BoxGeometry(4.5, 13.5, 4.5, 1, 1, 1); + const rightLeg2Box = new BoxGeometry(4.5, 13.5, 4.5); setVertices(rightLeg2Box, toSkinVertices(4, 32, 8, 36), toSkinVertices(8, 32, 12, 36), @@ -320,7 +320,7 @@ export class SkinObject extends Group { this.add(this.rightLeg); // Left Leg - const leftLegBox = new BoxGeometry(4, 12, 4, 1, 1, 1); + const leftLegBox = new BoxGeometry(4, 12, 4); setVertices(leftLegBox, toSkinVertices(20, 48, 24, 52), toSkinVertices(24, 48, 28, 52), @@ -331,7 +331,7 @@ export class SkinObject extends Group { ); const leftLegMesh = new Mesh(leftLegBox, layer1Material); - const leftLeg2Box = new BoxGeometry(4.5, 13.5, 4.5, 1, 1, 1); + const leftLeg2Box = new BoxGeometry(4.5, 13.5, 4.5); setVertices(leftLeg2Box, toSkinVertices(4, 48, 8, 52), toSkinVertices(8, 48, 12, 52), @@ -395,7 +395,7 @@ export class CapeObject extends Group { // back = outside // front = inside - const capeBox = new BoxGeometry(10, 16, 1, 1, 1, 1); + const capeBox = new BoxGeometry(10, 16, 1); setVertices(capeBox, toCapeVertices(1, 0, 11, 1), toCapeVertices(11, 0, 21, 1),