Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire types for the animation bridge — the Reanimated-style surface a React app declares once and the Bevy side drives every frame.

These are bevy-free and Deserialize-only: they travel JS → Bevy through the op_animate op (the main crate registers it), exactly like protocol::Op travels through op_flush. The JS side (js/src/animated.ts) hand-writes matching JSON shapes — keep the two in sync, just like bridge.tsOp.

Structs§

AnimatedBindings
The per-node animatedStyle: which style properties are animation-driven and by what. An open property→Binding map (mirrors the JS object shape: every camelCase style key maps to a binding). Decodes the same opaque-object way Style does — unknown keys are skipped (warn-and-continue) so a newer JS bundle never breaks an older binary’s whole node. A BTreeMap keeps iteration deterministic (stable transform-group rebuild and test assertions).

Enums§

AnimatableProperty
Identity of one continuous, animation-driveable style property. This is the open set the generic apply layer dispatches on — adding a new animatable property is a new variant here plus a row in the apply table (crate::animations), not a new named field on a fixed struct. The wire key is camelCase (see AnimatableProperty::from_wire); the JS side mirrors this set in js/src/animated.ts’s AnimatableProperty union.
AnimationCommand
An imperative animation command, carried by op_animate. Drains into the crate::animations::SharedValues table each frame.
Binding
Binds one animated style property to a shared value. Lives in the reconciler Props.animated (see AnimatedBindings); evaluated each frame by the orchestration system.
Driver
How a shared value should evolve over time — the thing assigned to sharedValue.value (withTiming, withSpring, withRepeat, withSequence). Drivers compose: Repeat/Sequence wrap other drivers.
Easing
Easing curve for Driver::Timing. Cubic in/out variants.
ValueKind
How an animated value resolves and where it lands. Pure metadata shared by the imperative apply layer and (for identity/precedence) the CSS-transition engine in core.

Type Aliases§

SharedId
Identity of a shared value (Reanimated’s useSharedValue). Allocated on the JS side; lives in the crate::animations::SharedValues table on the Bevy side. Its own namespace, unrelated to reconciler node ids.