update three.js to v0.119.1
previous commit broken with three.js v0.119.1 due to fc07f25be539af4888a7cfea790860eff18dc0b2
This commit is contained in:
parent
27605488eb
commit
3b7b9499cb
|
|
@ -2825,9 +2825,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"three": {
|
"three": {
|
||||||
"version": "0.118.3",
|
"version": "0.119.1",
|
||||||
"resolved": "https://registry.npmjs.org/three/-/three-0.118.3.tgz",
|
"resolved": "https://registry.npmjs.org/three/-/three-0.119.1.tgz",
|
||||||
"integrity": "sha512-ijECXrNzDkHieoeh2H69kgawTGH8DiamhR4uBN8jEM7VHSKvfTdEvOoHsA8Aq7dh7PHAxhlqBsN5arBI3KixSw=="
|
"integrity": "sha512-GHyh/RiUfQ5VTiWIVRRTANYoXc1PFB1y+jDVRTb649nif1uX1F06PT1TKU3k2+F/MN4UJ3PWvQB53fY2OqKqKw=="
|
||||||
},
|
},
|
||||||
"through": {
|
"through": {
|
||||||
"version": "2.3.8",
|
"version": "2.3.8",
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"skinview-utils": "^0.5.7",
|
"skinview-utils": "^0.5.7",
|
||||||
"three": "^0.118.3"
|
"three": "^0.119.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^9.0.0",
|
"@rollup/plugin-node-resolve": "^9.0.0",
|
||||||
|
|
|
||||||
26
src/model.ts
26
src/model.ts
|
|
@ -79,7 +79,7 @@ export class SkinObject extends Group {
|
||||||
const layer2Material = new MeshBasicMaterial(layer2);
|
const layer2Material = new MeshBasicMaterial(layer2);
|
||||||
|
|
||||||
// Head
|
// Head
|
||||||
const headBox = new BoxGeometry(8, 8, 8, 0, 0, 0);
|
const headBox = new BoxGeometry(8, 8, 8, 1, 1, 1);
|
||||||
setVertices(headBox,
|
setVertices(headBox,
|
||||||
toSkinVertices(8, 0, 16, 8),
|
toSkinVertices(8, 0, 16, 8),
|
||||||
toSkinVertices(16, 0, 24, 8),
|
toSkinVertices(16, 0, 24, 8),
|
||||||
|
|
@ -90,7 +90,7 @@ export class SkinObject extends Group {
|
||||||
);
|
);
|
||||||
const headMesh = new Mesh(headBox, layer1Material);
|
const headMesh = new Mesh(headBox, layer1Material);
|
||||||
|
|
||||||
const head2Box = new BoxGeometry(9, 9, 9, 0, 0, 0);
|
const head2Box = new BoxGeometry(9, 9, 9, 1, 1, 1);
|
||||||
setVertices(head2Box,
|
setVertices(head2Box,
|
||||||
toSkinVertices(40, 0, 48, 8),
|
toSkinVertices(40, 0, 48, 8),
|
||||||
toSkinVertices(48, 0, 56, 8),
|
toSkinVertices(48, 0, 56, 8),
|
||||||
|
|
@ -108,7 +108,7 @@ export class SkinObject extends Group {
|
||||||
this.add(this.head);
|
this.add(this.head);
|
||||||
|
|
||||||
// Body
|
// Body
|
||||||
const bodyBox = new BoxGeometry(8, 12, 4, 0, 0, 0);
|
const bodyBox = new BoxGeometry(8, 12, 4, 1, 1, 1);
|
||||||
setVertices(bodyBox,
|
setVertices(bodyBox,
|
||||||
toSkinVertices(20, 16, 28, 20),
|
toSkinVertices(20, 16, 28, 20),
|
||||||
toSkinVertices(28, 16, 36, 20),
|
toSkinVertices(28, 16, 36, 20),
|
||||||
|
|
@ -125,7 +125,7 @@ export class SkinObject extends Group {
|
||||||
polygonOffsetUnits: -1
|
polygonOffsetUnits: -1
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const body2Box = new BoxGeometry(9, 13.5, 4.5, 0, 0, 0);
|
const body2Box = new BoxGeometry(9, 13.5, 4.5, 1, 1, 1);
|
||||||
setVertices(body2Box,
|
setVertices(body2Box,
|
||||||
toSkinVertices(20, 32, 28, 36),
|
toSkinVertices(20, 32, 28, 36),
|
||||||
toSkinVertices(28, 32, 36, 36),
|
toSkinVertices(28, 32, 36, 36),
|
||||||
|
|
@ -148,7 +148,7 @@ export class SkinObject extends Group {
|
||||||
this.add(this.body);
|
this.add(this.body);
|
||||||
|
|
||||||
// Right Arm
|
// Right Arm
|
||||||
const rightArmBox = new BoxGeometry(1, 1, 1, 0, 0, 0); // w/d/h is model-related
|
const rightArmBox = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related
|
||||||
const rightArmMesh = new Mesh(rightArmBox, layer1Material);
|
const rightArmMesh = new Mesh(rightArmBox, layer1Material);
|
||||||
this.modelListeners.push(() => {
|
this.modelListeners.push(() => {
|
||||||
rightArmMesh.scale.x = this.slim ? 3 : 4;
|
rightArmMesh.scale.x = this.slim ? 3 : 4;
|
||||||
|
|
@ -177,7 +177,7 @@ export class SkinObject extends Group {
|
||||||
rightArmBox.elementsNeedUpdate = true;
|
rightArmBox.elementsNeedUpdate = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
const rightArm2Box = new BoxGeometry(1, 1, 1, 0, 0, 0); // w/d/h is model-related
|
const rightArm2Box = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related
|
||||||
const rightArm2Mesh = new Mesh(rightArm2Box, layer2Material);
|
const rightArm2Mesh = new Mesh(rightArm2Box, layer2Material);
|
||||||
rightArm2Mesh.renderOrder = 1;
|
rightArm2Mesh.renderOrder = 1;
|
||||||
this.modelListeners.push(() => {
|
this.modelListeners.push(() => {
|
||||||
|
|
@ -221,7 +221,7 @@ export class SkinObject extends Group {
|
||||||
this.add(this.rightArm);
|
this.add(this.rightArm);
|
||||||
|
|
||||||
// Left Arm
|
// Left Arm
|
||||||
const leftArmBox = new BoxGeometry(1, 1, 1, 0, 0, 0); // w/d/h is model-related
|
const leftArmBox = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related
|
||||||
const leftArmMesh = new Mesh(leftArmBox, layer1Material);
|
const leftArmMesh = new Mesh(leftArmBox, layer1Material);
|
||||||
this.modelListeners.push(() => {
|
this.modelListeners.push(() => {
|
||||||
leftArmMesh.scale.x = this.slim ? 3 : 4;
|
leftArmMesh.scale.x = this.slim ? 3 : 4;
|
||||||
|
|
@ -250,7 +250,7 @@ export class SkinObject extends Group {
|
||||||
leftArmBox.elementsNeedUpdate = true;
|
leftArmBox.elementsNeedUpdate = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
const leftArm2Box = new BoxGeometry(1, 1, 1, 0, 0, 0); // w/d/h is model-related
|
const leftArm2Box = new BoxGeometry(1, 1, 1, 1, 1, 1); // w/d/h is model-related
|
||||||
const leftArm2Mesh = new Mesh(leftArm2Box, layer2Material);
|
const leftArm2Mesh = new Mesh(leftArm2Box, layer2Material);
|
||||||
leftArm2Mesh.renderOrder = 1;
|
leftArm2Mesh.renderOrder = 1;
|
||||||
this.modelListeners.push(() => {
|
this.modelListeners.push(() => {
|
||||||
|
|
@ -294,7 +294,7 @@ export class SkinObject extends Group {
|
||||||
this.add(this.leftArm);
|
this.add(this.leftArm);
|
||||||
|
|
||||||
// Right Leg
|
// Right Leg
|
||||||
const rightLegBox = new BoxGeometry(4, 12, 4, 0, 0, 0);
|
const rightLegBox = new BoxGeometry(4, 12, 4, 1, 1, 1);
|
||||||
setVertices(rightLegBox,
|
setVertices(rightLegBox,
|
||||||
toSkinVertices(4, 16, 8, 20),
|
toSkinVertices(4, 16, 8, 20),
|
||||||
toSkinVertices(8, 16, 12, 20),
|
toSkinVertices(8, 16, 12, 20),
|
||||||
|
|
@ -305,7 +305,7 @@ export class SkinObject extends Group {
|
||||||
);
|
);
|
||||||
const rightLegMesh = new Mesh(rightLegBox, layer1Material);
|
const rightLegMesh = new Mesh(rightLegBox, layer1Material);
|
||||||
|
|
||||||
const rightLeg2Box = new BoxGeometry(4.5, 13.5, 4.5, 0, 0, 0);
|
const rightLeg2Box = new BoxGeometry(4.5, 13.5, 4.5, 1, 1, 1);
|
||||||
setVertices(rightLeg2Box,
|
setVertices(rightLeg2Box,
|
||||||
toSkinVertices(4, 32, 8, 36),
|
toSkinVertices(4, 32, 8, 36),
|
||||||
toSkinVertices(8, 32, 12, 36),
|
toSkinVertices(8, 32, 12, 36),
|
||||||
|
|
@ -329,7 +329,7 @@ export class SkinObject extends Group {
|
||||||
this.add(this.rightLeg);
|
this.add(this.rightLeg);
|
||||||
|
|
||||||
// Left Leg
|
// Left Leg
|
||||||
const leftLegBox = new BoxGeometry(4, 12, 4, 0, 0, 0);
|
const leftLegBox = new BoxGeometry(4, 12, 4, 1, 1, 1);
|
||||||
setVertices(leftLegBox,
|
setVertices(leftLegBox,
|
||||||
toSkinVertices(20, 48, 24, 52),
|
toSkinVertices(20, 48, 24, 52),
|
||||||
toSkinVertices(24, 48, 28, 52),
|
toSkinVertices(24, 48, 28, 52),
|
||||||
|
|
@ -340,7 +340,7 @@ export class SkinObject extends Group {
|
||||||
);
|
);
|
||||||
const leftLegMesh = new Mesh(leftLegBox, layer1Material);
|
const leftLegMesh = new Mesh(leftLegBox, layer1Material);
|
||||||
|
|
||||||
const leftLeg2Box = new BoxGeometry(4.5, 13.5, 4.5, 0, 0, 0);
|
const leftLeg2Box = new BoxGeometry(4.5, 13.5, 4.5, 1, 1, 1);
|
||||||
setVertices(leftLeg2Box,
|
setVertices(leftLeg2Box,
|
||||||
toSkinVertices(4, 48, 8, 52),
|
toSkinVertices(4, 48, 8, 52),
|
||||||
toSkinVertices(8, 48, 12, 52),
|
toSkinVertices(8, 48, 12, 52),
|
||||||
|
|
@ -404,7 +404,7 @@ export class CapeObject extends Group {
|
||||||
|
|
||||||
// back = outside
|
// back = outside
|
||||||
// front = inside
|
// front = inside
|
||||||
const capeBox = new BoxGeometry(10, 16, 1, 0, 0, 0);
|
const capeBox = new BoxGeometry(10, 16, 1, 1, 1, 1);
|
||||||
setVertices(capeBox,
|
setVertices(capeBox,
|
||||||
toCapeVertices(1, 0, 11, 1),
|
toCapeVertices(1, 0, 11, 1),
|
||||||
toCapeVertices(11, 0, 21, 1),
|
toCapeVertices(11, 0, 21, 1),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue