scale based puppet size
This commit is contained in:
@@ -81,43 +81,50 @@ export class Puppet {
|
|||||||
private createRig(): PuppetRig {
|
private createRig(): PuppetRig {
|
||||||
const root = new THREE.Group();
|
const root = new THREE.Group();
|
||||||
const material = new THREE.MeshStandardMaterial();
|
const material = new THREE.MeshStandardMaterial();
|
||||||
|
const scale = 1;
|
||||||
|
|
||||||
const body = new THREE.Mesh(new THREE.BoxGeometry(16, 24, 8), material);
|
const body = new THREE.Mesh(
|
||||||
body.position.y = 36;
|
new THREE.BoxGeometry(16 * scale, 24 * scale, 8 * scale),
|
||||||
|
material,
|
||||||
|
);
|
||||||
|
body.position.y = 36 * scale;
|
||||||
|
|
||||||
const head = new THREE.Mesh(new THREE.BoxGeometry(16, 16, 16), material);
|
const head = new THREE.Mesh(
|
||||||
head.position.y = 56;
|
new THREE.BoxGeometry(16 * scale, 16 * scale, 16 * scale),
|
||||||
|
material,
|
||||||
|
);
|
||||||
|
head.position.y = 56 * scale;
|
||||||
|
|
||||||
const { pivot: leftArm, mesh: leftArmMesh } = this.createLimbPivot(
|
const { pivot: leftArm, mesh: leftArmMesh } = this.createLimbPivot(
|
||||||
-12,
|
-12 * scale,
|
||||||
48,
|
48 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
24,
|
24 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
material,
|
material,
|
||||||
);
|
);
|
||||||
const { pivot: rightArm, mesh: rightArmMesh } = this.createLimbPivot(
|
const { pivot: rightArm, mesh: rightArmMesh } = this.createLimbPivot(
|
||||||
12,
|
12 * scale,
|
||||||
48,
|
48 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
24,
|
24 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
material,
|
material,
|
||||||
);
|
);
|
||||||
const { pivot: leftLeg, mesh: leftLegMesh } = this.createLimbPivot(
|
const { pivot: leftLeg, mesh: leftLegMesh } = this.createLimbPivot(
|
||||||
-4,
|
-4 * scale,
|
||||||
24,
|
24 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
24,
|
24 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
material,
|
material,
|
||||||
);
|
);
|
||||||
const { pivot: rightLeg, mesh: rightLegMesh } = this.createLimbPivot(
|
const { pivot: rightLeg, mesh: rightLegMesh } = this.createLimbPivot(
|
||||||
4,
|
4 * scale,
|
||||||
24,
|
24 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
24,
|
24 * scale,
|
||||||
8,
|
8 * scale,
|
||||||
material,
|
material,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user