Add volume time update and material uniform handling in runtime-host.ts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user