asdf state
This commit is contained in:
parent
7060e9a397
commit
0a06d7970d
@ -36,8 +36,8 @@ export class ThreeBuilder {
|
|||||||
static planeFaceNormals: Record<MsonFace, Vector3> = {
|
static planeFaceNormals: Record<MsonFace, Vector3> = {
|
||||||
up: new Vector3(0, 1, 0),
|
up: new Vector3(0, 1, 0),
|
||||||
down: new Vector3(0, -1, 0),
|
down: new Vector3(0, -1, 0),
|
||||||
east: new Vector3(1, 0, 0),
|
east: new Vector3(-1, 0, 0),
|
||||||
west: new Vector3(-1, 0, 0),
|
west: new Vector3(1, 0, 0),
|
||||||
south: new Vector3(0, 0, 1),
|
south: new Vector3(0, 0, 1),
|
||||||
north: new Vector3(0, 0, -1),
|
north: new Vector3(0, 0, -1),
|
||||||
};
|
};
|
||||||
@ -317,7 +317,7 @@ export class ThreeBuilder {
|
|||||||
);
|
);
|
||||||
planeGeom.lookAt(axisNormal);
|
planeGeom.lookAt(axisNormal);
|
||||||
planeGeom.translate(
|
planeGeom.translate(
|
||||||
adjustedTranslate.x,
|
-adjustedTranslate.x,
|
||||||
adjustedTranslate.y,
|
adjustedTranslate.y,
|
||||||
adjustedTranslate.z,
|
adjustedTranslate.z,
|
||||||
);
|
);
|
||||||
@ -430,7 +430,7 @@ export class ThreeBuilder {
|
|||||||
if (component?.rotate) {
|
if (component?.rotate) {
|
||||||
rotate.fromArray(
|
rotate.fromArray(
|
||||||
(component.rotate as Vec3).map((entry, index) =>
|
(component.rotate as Vec3).map((entry, index) =>
|
||||||
MathUtils.degToRad(index !== 1 ? entry * -1 : entry),
|
MathUtils.degToRad(index !== 2 ? entry * -1 : entry),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -440,6 +440,7 @@ export class ThreeBuilder {
|
|||||||
if (component?.pivot) {
|
if (component?.pivot) {
|
||||||
pos.fromArray(component.pivot as Vec3);
|
pos.fromArray(component.pivot as Vec3);
|
||||||
}
|
}
|
||||||
|
pos.setX(pos.x * -1);
|
||||||
pos.setY(pos.y * -1);
|
pos.setY(pos.y * -1);
|
||||||
wrapper.position.copy(pos);
|
wrapper.position.copy(pos);
|
||||||
wrapper.updateMatrix();
|
wrapper.updateMatrix();
|
||||||
|
@ -244,6 +244,8 @@ export class UVMapper {
|
|||||||
: [mirror, mirror]
|
: [mirror, mirror]
|
||||||
: [false, false];
|
: [false, false];
|
||||||
|
|
||||||
|
if (['up', 'down'].includes(face)) mirroring[0] = !mirroring[0];
|
||||||
|
|
||||||
for (let i = 0; i < index!.count; i += 3) {
|
for (let i = 0; i < index!.count; i += 3) {
|
||||||
const triIndex = Math.ceil((i / 6) % 1);
|
const triIndex = Math.ceil((i / 6) % 1);
|
||||||
const sizeU = size[UVMapper.planeWidthSide[face]];
|
const sizeU = size[UVMapper.planeWidthSide[face]];
|
||||||
|
Loading…
Reference in New Issue
Block a user