From 61a99a57ef980e461b470d0b52952aedf7130220 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 15 Apr 2026 02:05:24 +0200 Subject: [PATCH] Allow null link in applyControlEffect --- src/runtime-three/runtime-host.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index 3a51ab11..538dc9b3 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -1677,7 +1677,10 @@ export class RuntimeHost { this.setControlPauseActive(paused); } - private applyControlEffect(effect: ControlEffect, link: InteractionLink) { + private applyControlEffect( + effect: ControlEffect, + link: InteractionLink | null = null + ) { switch (effect.type) { case "setProjectTimePaused": this.applyProjectTimePausedControl(effect.paused); @@ -1752,7 +1755,9 @@ export class RuntimeHost { this.runtimeScene.control.resolved = applyControlEffectToResolvedState( this.runtimeScene.control.resolved, effect, - createInteractionLinkResolvedControlSource(link.id) + link === null + ? createDefaultResolvedControlSource() + : createInteractionLinkResolvedControlSource(link.id) ); }