auto-git:

[change] src/viewport-three/viewport-host.ts
This commit is contained in:
2026-05-01 17:41:56 +02:00
parent 4a7f4c1111
commit e8bb60f484

View File

@@ -9122,6 +9122,26 @@ export class ViewportHost {
);
}
private mergeTerrainBrushDirtyBounds(
currentBounds: TerrainBrushDirtySampleBounds | null,
nextBounds: TerrainBrushDirtySampleBounds | null
): TerrainBrushDirtySampleBounds | null {
if (nextBounds === null) {
return currentBounds;
}
if (currentBounds === null) {
return { ...nextBounds };
}
return {
minSampleX: Math.min(currentBounds.minSampleX, nextBounds.minSampleX),
maxSampleX: Math.max(currentBounds.maxSampleX, nextBounds.maxSampleX),
minSampleZ: Math.min(currentBounds.minSampleZ, nextBounds.minSampleZ),
maxSampleZ: Math.max(currentBounds.maxSampleZ, nextBounds.maxSampleZ)
};
}
private refreshDisplayedTerrainDirtyBounds(
terrainId: string,
bounds: TerrainBrushDirtySampleBounds | null