• Play Behavior

    index
    4
    status
    Draft

    Workbench supports simple animation behavior by letting numeric props animate back and forth between their configured min and max values. This is designed to invite learner curiosity, making it clear that values can change — and encouraging hands-on exploration.

    One play button per Workbench

    Each Workbench can have at most one play button, which controls whether the system is currently “playing” or not. This applies globally to all playable: true props.

    Autoplay behavior

    Authors can configure a Workbench to start in a playing state. In the future, autoplay behavior may also take into account visibility or focus (e.g., pausing animation when the browser tab is unfocused), but this is not implemented in v1.

    Playable props

    Only props of type: "number" can be marked as playable: true. Playable props require both min and max values, and may optionally define a duration in milliseconds — how long it takes to animate from one end of the range to the other. If no duration is specified, the default is 2000ms.

    Each playable prop animates independently, but they are all governed by the same play/pause toggle.

    Playable props animate independently. If they have different durations, they will desynchronize over time.

    Animation uses linear interpolation. No easing or curve control is supported.

    Direction and resuming

    Each playable prop tracks its own current direction (toward min or toward max). When playback is paused and resumed, each prop continues animating in the same direction it was headed. Props always begin by animating from their current value toward max.

    Interaction disables autoplay

    If a user directly interacts with a control linked to a playable prop (e.g., by dragging a slider), Workbench will automatically pause playback to prioritize manual control.

    Authors should choose which props are playable thoughtfully — often only one or two props are animated to start with, to avoid overwhelming the learner.