Add water contact patch collection and material update in viewport-host.ts

This commit is contained in:
2026-04-06 17:32:26 +02:00
parent 592a062b32
commit ab88923c85

View File

@@ -3116,13 +3116,16 @@ export class ViewportHost {
);
const previousMaterials = renderObjects.mesh.material;
const contactPatches =
brush.volume.mode === "water" ? this.collectViewportWaterContactPatches(this.currentDocument, brush.id, brush.center, brush.rotationDegrees, brush.size) : [];
renderObjects.mesh.material = BOX_FACE_IDS.map((faceId) =>
this.createFaceMaterial(
brush,
faceId,
this.currentDocument?.materials[brush.faces[faceId].materialId ?? ""],
this.getFaceHighlightState(brush.id, faceId),
volumeRenderPaths
volumeRenderPaths,
contactPatches
)
);