From 9a5b48a02f63c7774035811101a8d7e388998b72 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 6 Apr 2026 09:16:39 +0200 Subject: [PATCH] Add volume time update and material uniform handling in runtime-host.ts --- src/runtime-three/runtime-host.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index f64093dc..88d227a3 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -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); }