Add play and stop animation methods to RuntimeHost and update tests

This commit is contained in:
2026-04-01 00:04:28 +02:00
parent caa0cef532
commit 04da7eb345
2 changed files with 9 additions and 1 deletions

View File

@@ -502,6 +502,12 @@ export class RuntimeHost {
}, },
toggleBrushVisibility: (brushId, visible) => { toggleBrushVisibility: (brushId, visible) => {
this.applyToggleBrushVisibilityAction(brushId, visible); this.applyToggleBrushVisibilityAction(brushId, visible);
},
playAnimation: (instanceId, clipName) => {
this.applyPlayAnimationAction(instanceId, clipName);
},
stopAnimation: (instanceId) => {
this.applyStopAnimationAction(instanceId);
} }
}; };
} }

View File

@@ -292,7 +292,9 @@ describe("RuntimeInteractionSystem", () => {
}, },
toggleBrushVisibility: () => { toggleBrushVisibility: () => {
throw new Error("Visibility should not dispatch for this click fixture."); throw new Error("Visibility should not dispatch for this click fixture.");
} },
playAnimation: () => {},
stopAnimation: () => {}
}); });
expect(dispatches).toEqual(["link-click-teleport:entity-teleport-main:8"]); expect(dispatches).toEqual(["link-click-teleport:entity-teleport-main:8"]);