Add volume time update and material uniform handling in runtime-host.ts

This commit is contained in:
2026-04-06 09:16:39 +02:00
parent d6eba50dac
commit 9a5b48a02f

View File

@@ -682,6 +682,7 @@ export class RuntimeHost {
}
this.brushMeshes.clear();
this.volumeAnimatedMaterials.length = 0;
}
private clearModelInstances() {
@@ -729,6 +730,11 @@ export class RuntimeHost {
this.activeController?.update(dt);
this.audioSystem.updateListenerTransform();
this.volumeTime += dt;
for (const mat of this.volumeAnimatedMaterials) {
(mat.uniforms["time"] as { value: number }).value = this.volumeTime;
}
for (const mixer of this.animationMixers.values()) {
mixer.update(dt);
}