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
A node’s animation-driven style properties and what drives each: an open property→Binding map. Not a wire type — it is derived from the merged style’s inline { animated } wrappers by crate::style_bindings::derive_bindings after every style change, and stamped on the entity as AnimatedNode. 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. Derived from the merged style’s inline { animated } wrappers (crate::style_bindings), which is also where each variant’s style position is defined.
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.
Transform3dField
The addressable fields of AnimatableProperty::Transform3d. Origin animates as two px offsets (originX/originY) — a percent origin that must track the node’s size belongs in the static style instead.
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.