Extract and use runtime water foam contact limit calculation in multiple methods

This commit is contained in:
2026-04-07 06:55:29 +02:00
parent 3be887d0aa
commit 5ec9099a02
2 changed files with 11 additions and 4 deletions

View File

@@ -3227,10 +3227,14 @@ export class ViewportHost {
size: waterBrush.size
},
contactBounds,
waterBrush.volume.water.foamContactLimit
this.getViewportWaterFoamContactLimit(waterBrush)
);
}
private getViewportWaterFoamContactLimit(brush: BoxBrush) {
return brush.volume.mode === "water" ? brush.volume.water.foamContactLimit : 0;
}
private createEdgeHelper(brush: BoxBrush, edgeId: BoxEdgeId): { id: BoxEdgeId; line: Line<BufferGeometry, LineBasicMaterial> } {
const segment = getBoxBrushEdgeWorldSegment(brush, edgeId);
const geometry = new BufferGeometry().setFromPoints([