Skip to content

Commit 74997bf

Browse files
committed
feat(terrain): avoid unnecessary matrix recalculation for terrain groups
1 parent 9ac8b57 commit 74997bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/terrain/TerrainManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class TerrainManager {
3535
async #loadArea(areaId: number, area: MapArea) {
3636
const group = new THREE.Group();
3737
group.name = 'terrain';
38+
group.matrixAutoUpdate = false;
39+
group.matrixWorldAutoUpdate = false;
3840

3941
for (const chunk of area.chunks) {
4042
const mesh = await this.#createMesh(chunk);

0 commit comments

Comments
 (0)