From 8b797f6fa4c50aece9da1f1c211cda6212557413 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 2 May 2026 04:17:13 +0200 Subject: [PATCH] Add options parameter to terrain mesh building functions --- src/geometry/terrain-mesh.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/geometry/terrain-mesh.ts b/src/geometry/terrain-mesh.ts index 9e574136..72811b46 100644 --- a/src/geometry/terrain-mesh.ts +++ b/src/geometry/terrain-mesh.ts @@ -650,6 +650,7 @@ function buildTerrainLodLevelMeshData( export function buildTerrainLodMeshData( terrain: Terrain, + options: TerrainMeshBuildOptions = {}, chunkSizeCells = TERRAIN_LOD_CHUNK_SIZE_CELLS ): DerivedTerrainLodMeshData { const chunks: TerrainLodChunkMeshData[] = []; @@ -671,7 +672,8 @@ export function buildTerrainLodMeshData( terrain, startSampleX, startSampleZ, - chunkSizeCells + chunkSizeCells, + options ); if (chunk === null) { @@ -700,7 +702,8 @@ export function buildTerrainLodChunkMeshData( terrain: Terrain, startSampleX: number, startSampleZ: number, - chunkSizeCells = TERRAIN_LOD_CHUNK_SIZE_CELLS + chunkSizeCells = TERRAIN_LOD_CHUNK_SIZE_CELLS, + options: TerrainMeshBuildOptions = {} ): TerrainLodChunkMeshData | null { const maxCellX = terrain.sampleCountX - 1; const maxCellZ = terrain.sampleCountZ - 1; @@ -734,7 +737,8 @@ export function buildTerrainLodChunkMeshData( endSampleX, endSampleZ, level, - stride + stride, + options ) ); const localCenter = {