auto-git:

[change] src/app/App.tsx
 [change] src/document/scene-document.ts
 [change] src/geometry/box-face-uvs.ts
 [change] src/materials/starter-material-textures.ts
 [change] src/runtime-three/runtime-host.ts
 [change] src/viewport-three/viewport-host.ts
This commit is contained in:
2026-04-15 04:05:05 +02:00
parent 34276718de
commit 1fdbf50d16
6 changed files with 258 additions and 129 deletions

View File

@@ -43,6 +43,22 @@ export function createFitToFaceBoxBrushFaceUvState(brush: BoxBrush, faceId: BoxF
};
}
export function createFitToMaterialTileBoxBrushFaceUvState(
brush: BoxBrush,
faceId: BoxFaceId,
tileSize: Vec2
): FaceUvState {
const faceSize = getBoxBrushFaceSize(brush, faceId);
return {
...createDefaultFaceUvState(),
scale: {
x: tileSize.x / faceSize.x,
y: tileSize.y / faceSize.y
}
};
}
export function projectBoxFaceVertexToUv(vertexPosition: Vec3, brush: BoxBrushUvProjectionSource, faceId: BoxFaceId): Vec2 {
const halfSize = {
x: brush.size.x * 0.5,