From 46e6645a7a04b6dee42944567de90244936fa27d Mon Sep 17 00:00:00 2001 From: Konrad Heidler Date: Tue, 21 Jan 2025 13:28:16 +0100 Subject: [PATCH] Faster terrain loading --- src/components/ThreeViewer/Terrain.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ThreeViewer/Terrain.jsx b/src/components/ThreeViewer/Terrain.jsx index f8038e15..0e642041 100644 --- a/src/components/ThreeViewer/Terrain.jsx +++ b/src/components/ThreeViewer/Terrain.jsx @@ -138,17 +138,17 @@ const TerrainTile = (props) => { const y = y0 + (ty / divisions) * (y1 - y0) vertices.push(ElevationManager.toPoint3D(x, y)) // UV mapping for the texture - uvs = uvs.concat([tx / divisions, 1.0 - ty / divisions]) + uvs.push(tx / divisions, 1.0 - ty / divisions) // Triangle indices if (tx > 0 && ty > 0) { - indices = indices.concat([ + indices.push( i - row - 1, i - 1, i - row, // 1st triangle i - row, i - 1, i, // 2nd triangle - ]) + ) } i += 1 }