1# llimphi-anim23A Rive-style, **clip-agnostic** animation state machine.
45It is the step above linear playback: instead of "play this animation", it models
6"given these *inputs*, which state am I in and which do I transition to, with what
7*blend*". That is what turns an animation *interactive* (hover, progress,
8triggers) rather than a fixed loop.
910## Why clip-agnostic1112The core **knows nothing about Lottie or vello**. A clip is a `ClipId` (u32) with
13a known duration; the machine sequences and blends clips by id and time, and
14emits a `RenderFrame` saying *what* to render (the primary clip plus an incoming
15clip with its 0..1 blend during a transition). The consumer maps
16`ClipId → asset` and paints. Today that consumer is `llimphi-lottie`; tomorrow it
17could be a native bone rig or a `llimphi-motion` tween — the same state engine
18serves them all.
1920## Model (mirroring Rive's)2122- **Inputs**: `bool`, `number`, `trigger` (triggers are consumed on each
23 `advance`).
24- **State**: a clip with speed and looping, plus its outgoing transitions.
25- **Transition**: a target + (AND-ed) conditions over inputs + a blend duration.
26 *Any-state* transitions are evaluated regardless of the current state.
2728---
2930Part of **llimphi** — see [llimphi](../README.md).
README.md
llimphi-anim
A Rive-style, clip-agnostic animation state machine.
It is the step above linear playback: instead of "play this animation", it models
"given these inputs, which state am I in and which do I transition to, with what
blend". That is what turns an animation interactive (hover, progress,
triggers) rather than a fixed loop.
Why clip-agnostic
The core knows nothing about Lottie or vello. A clip is a ClipId (u32) with
a known duration; the machine sequences and blends clips by id and time, and
emits a RenderFrame saying what to render (the primary clip plus an incoming
clip with its 0..1 blend during a transition). The consumer maps
ClipId → asset and paints. Today that consumer is llimphi-lottie; tomorrow it
could be a native bone rig or a llimphi-motion tween — the same state engine
serves them all.
Model (mirroring Rive's)
Inputs: bool, number, trigger (triggers are consumed on each
advance).
State: a clip with speed and looping, plus its outgoing transitions.
Transition: a target + (AND-ed) conditions over inputs + a blend duration.
Any-state transitions are evaluated regardless of the current state.