Add terrain material refresh functionality

This commit is contained in:
2026-04-18 19:52:20 +02:00
parent dd45f4588f
commit 5499c2fe51

View File

@@ -6747,6 +6747,24 @@ export class ViewportHost {
}
}
private refreshTerrainPresentation() {
if (this.currentDocument === null) {
return;
}
for (const terrain of Object.values(this.currentDocument.terrains)) {
const renderObjects = this.terrainRenderObjects.get(terrain.id);
if (renderObjects === undefined) {
continue;
}
const previousMaterial = renderObjects.mesh.material;
renderObjects.mesh.material = this.createTerrainMaterial(terrain.id);
previousMaterial.dispose();
}
}
private refreshPathPresentation() {
if (this.currentDocument === null) {
return;