Script Live Demo
Overview
This page points to a full docs live demo focused on script capability simulation:
- pre-seeded scene with multiple objects and multiple timelines
- one state machine with
boolean,number, andtriggerinputs - one bound script with typed script inputs (
boolean,number,trigger,string) - a validated command dispatcher reused by both UI controls and external API calls
- runtime diagnostics/log panel for both command execution and script hook execution
For script API/hook details, see /help/animation/script-overview.
Validation Contract
The demo dispatches commands through the shared @designful/animation-manager script command path.
- supported command kinds:
set-input,fire-trigger,set-object-property,seek-timeline,play-state-machine - all numeric payloads must be finite numbers (
NaN/Infinityare rejected) set-object-propertyvalidates value type by animation property:visible-> boolean- numeric animation properties -> number
style.fill/style.stroke-> RGBA object
- script trigger input pulses are deterministic (
true -> false)
Open Live Demo
- Script demo route: /help/animation/script-live-demo-app
- Standard animation route: /help/animation/live-demo-app
Verification Checklist
- Open
/help/animation/script-live-demo-appand confirm machine state starts atidle. - Click Run Script Chain (UI Path).
- Confirm machine state reaches
armedduring the chain before final completion. - Confirm final machine state is
activeand diagnostics/log entries are updated. - Click Reset Demo Scene.
- Run the same chain through API path button and verify the final state/diagnostics match the UI path.
API Bridge
The demo exposes window.__animationScriptDemo in browser runtime:
resetScene()runScriptChain()dispatchCommand(rawCommand)getSnapshot()
All command executions still pass through the same validated dispatch path used by both UI and API triggers.
Related
- Script inputs: /help/animation/script-inputs
- Script listener actions: /help/animation/script-listener-actions
- Script testing: /help/animation/script-testing