Skip to content

Commit

Permalink
feat(terrain): avoid unnecessary matrix recalculation for terrain groups
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Dec 29, 2023
1 parent 9ac8b57 commit 74997bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/terrain/TerrainManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class TerrainManager {
async #loadArea(areaId: number, area: MapArea) {
const group = new THREE.Group();
group.name = 'terrain';
group.matrixAutoUpdate = false;
group.matrixWorldAutoUpdate = false;

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

0 comments on commit 74997bf

Please sign in to comment.