RUNE-1004: Story Shared-Sprite Transition Proposed
Summary
transition draws a visual bridge between two existing named sprite instances. It does not create, replace, rename, hide, or destroy either identity.
Form
- transition@openDetails:
from: $card1
to: $detailPanel
sizing: auto
with: $smooth
- wait: $openDetailsfrom and to reference existing sprites. When animated and named, transition@name creates a waitable completion source; wait: $name waits for that source from the visible completion-source scope.
Semantics
transition is only the visual bridge:
- it validates that both source and target sprites exist
- it interpolates position
- it cross-fades source and target visual presence by default
- it uses
sizingto decide how size mismatch is represented - it has no lifecycle side effects
Authors should express source or target visibility changes with explicit set or destroy actions around the transition.
- set:
detailPanel.opacity: 0
- transition@openDetails:
from: $card1
to: $detailPanel
sizing: clip
with: $smooth
- wait: $openDetails
- set:
card1.opacity: 0
detailPanel.opacity: 1Sizing
sizing | Meaning | Best for |
|---|---|---|
auto | sprite preference or fallback to resize | default authoring |
resize | interpolate real x/y/w/h and redraw at each sampled size | vector shapes, rounded rects, bars, panels |
scale | scale a visual snapshot to the target rect | images, thumbnails, video clips, complex snapshots |
clip | keep target at real size and reveal with clipping | text-heavy panels, drawers, detail views |
none | interpolate position and cross-fade only | labels, callouts, weak visual links |
Default sizing is auto. Without sprite metadata, auto falls back to resize.
Rationale
Shared-sprite transitions are about continuity between two identities, such as a card becoming visually connected to a detail panel. Keeping lifecycle policy out of transition avoids hidden state changes and keeps visibility decisions readable in the script.