From e8bb60f484161ff97ac026d343f5a36a69d799b5 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 1 May 2026 17:41:56 +0200 Subject: [PATCH] auto-git: [change] src/viewport-three/viewport-host.ts --- src/viewport-three/viewport-host.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index a3792e8c..8ae3940c 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -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