graph
Generated Rust API reference for byte_engine.
byte_engine / animation / graph
Module graph
Code-authored skeletal animation state machines and asynchronous clip pooling.
Build an AnimationGraph with AnimationGraphBuilder, then create an
AnimationGraphPlayer for each animated skeleton. The player evaluates
synchronously from retained pose buffers while AnimationPool loads clip
resources on an application-owned async worker. Client code selects one
durable AnimationStateId with normal Rust control flow, then the player
reconciles its current playback toward that requested state. A state plays
one clip, or blends several placed on a line or a plane: build those with
AnimationGraphStateBuilder::linear and
AnimationGraphStateBuilder::planar, and request them with a position
through LinearStateId::at and PlanarStateId::at. Group states that
share one position, like a walk and its starts and stops, into a space with
AnimationGraphBuilder::planar_space. Connect state
handles with AnimationGraphState::to, then use
AnimationGraphTransitionConditionBuilder::when or
AnimationGraphTransitionConditionBuilder::anytime to choose whether a
one-shot transition clip can be interrupted.
Connection order
- During application setup, build the immutable graph and create one
AnimationPoolwith the application'sResourceManager. - Spawn the
AnimationLoadWorkerreturned byAnimationPool::newon the same async runtime that serves resource requests. The pool only enqueues work, so clips remain inLoadinguntil this worker runs. - Create one
AnimationGraphPlayerper animated instance withAnimationPool::create_player. The pool loads the initial clip, whose skeleton becomes the canonical target for every graph clip. As the player enters each state, it also requests clips in directly reachable states. - Each application tick, call
AnimationPool::updateonce, select an authoredAnimationStateId(or anAnimationRequestthat places a blend state), callAnimationGraphPlayer::advance, apply its root motion to the owning object, and sendAnimationGraphPose::global_poseto rendering. For many characters, set each player's request withAnimationGraphPlayer::requestand advance them together withAnimationPool::advance_players, which spreads them over the alley's lanes; then read each one'sAnimationGraphPlayer::pose.
Players share everything that isn't their own playback: the graph, the
clips' bindings to the canonical skeleton, the pool's clips, and the poses a
frame fills and reads, which belong to the thread that evaluates. The
renderer's UpdatePose message owns its transform vector, so copying at
that cross-system boundary is currently intentional. See
crates/byte-engine/examples/animation_graph.rs for the complete headed
application sequence.
Contents
- Structs
AnimationStateIdAnimationClipAnimationGraphAnimationGraphBuilderAnimationGraphStateBuilderAnimationGraphSpaceAnimationGraphStateAnimationGraphTransitionBuilderAnimationGraphTransitionConditionBuilderAnimationBlendAnimationMotionAnimationRequestLinearGraphStateLinearStateIdPlanarGraphStatePlanarStateIdAnimationGraphPlayerAnimationGraphPoseAnimationLoadWorkerAnimationPoolLookChainSettingsLookTargetRootMotionSettingsRootMotionTranslation
- Enums
- Constants
Quick Reference
| Item | Kind | Description |
|---|---|---|
AnimationStateId | struct | The AnimationStateId struct identifies one client-requestable state inside its originating [AnimationGraph]. |
AnimationClip | struct | The AnimationClip struct identifies the resource and playback behavior used by one state. |
AnimationGraph | struct | The AnimationGraph struct stores immutable routes used to reconcile requested animation states. |
AnimationGraphBuilder | struct | The AnimationGraphBuilder struct assembles named clip states and their ordered reconciliation routes. |
AnimationGraphStateBuilder | struct | The AnimationGraphStateBuilder struct assigns a clip to a named graph state. |
AnimationGraphSpace | struct | The AnimationGraphSpace struct groups states that share one blend position, like the idle, walk, starts, and stops of a character moving in one direction. |
AnimationGraphState | struct | The AnimationGraphState struct connects a state to other states during graph authoring. |
AnimationGraphTransitionBuilder | struct | The AnimationGraphTransitionBuilder struct assigns a clip to a route between two states. |
AnimationGraphTransitionConditionBuilder | struct | The AnimationGraphTransitionConditionBuilder struct holds unfinished one-shot route authoring so callers can choose its interruption policy. |
AnimationBlend | struct | |
AnimationMotion | struct | |
AnimationRequest | struct | |
LinearGraphState | struct | |
LinearStateId | struct | |
PlanarGraphState | struct | |
PlanarStateId | struct | |
AnimationGraphPlayer | struct | |
AnimationGraphPose | struct | |
AnimationLoadWorker | struct | |
AnimationPool | struct | |
LookChainSettings | struct | |
LookTarget | struct | |
RootMotionSettings | struct | |
RootMotionTranslation | struct | |
AnimationPlayback | enum | The AnimationPlayback enum selects whether a state clip repeats or stops at its final pose. |
AnimationGraphBuildError | enum | The AnimationGraphBuildError enum reports invalid graph authoring input. |
AnimationGraphPlayerError | enum | |
AnimationPoolEvent | enum | |
AnimationPoolRequest | enum | |
RootMotionRotation | enum | |
ANIMATION_LOAD_QUEUE_CAPACITY | const | Bounds asynchronous animation load requests independently from the clip byte budget. |
ANIMATION_POOL_EVENT_CAPACITY | const | Bounds retained load outcomes so diagnostics cannot outgrow the clip pool. |
Structs
AnimationStateId
struct AnimationStateId {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:57-60
The AnimationStateId struct identifies one client-requestable state inside its originating AnimationGraph.
Trait Implementations
impl ArchivePointee for AnimationStateId
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationStateId
impl Clone for AnimationStateId
-
fn clone(&self) -> AnimationStateIdRelated:
AnimationStateId
impl Copy for AnimationStateId
impl Debug for AnimationStateId
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationStateId
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationStateId
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for AnimationStateId
impl<K> Equivalent for AnimationStateId
-
fn equivalent(&self, key: &K) -> bool
impl Hash for AnimationStateId
-
fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for AnimationStateId
impl LayoutRaw for AnimationStateId
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationStateId
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationStateId
-
fn eq(&self, other: &AnimationStateId) -> boolRelated:
AnimationStateId
impl Pointee for AnimationStateId
-
type Metadata = ()
impl Read for AnimationStateId
impl StructuralPartialEq for AnimationStateId
impl WithSubscriber for AnimationStateId
AnimationClip
struct AnimationClip {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:76-80
The AnimationClip struct identifies the resource and playback behavior used by one state.
AnimationPool keys clips by their resource ID, so a clip keeps a stable identity across arena residency and
eviction.
Implementations
-
fn looping(resource_id: impl Into<Arc<str>>) -> SelfCreates a clip that restarts from its first sample after reaching its duration.
-
fn once(resource_id: impl Into<Arc<str>>) -> SelfCreates a clip that holds its final sample after reaching its duration.
-
fn resource_id(&self) -> &strReturns the resource ID requested by an
AnimationPool. -
const fn playback(&self) -> AnimationPlaybackRelated:
AnimationPlaybackReturns the playback behavior used after the clip reaches its duration.
Trait Implementations
impl ArchivePointee for AnimationClip
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationClip
impl Clone for AnimationClip
-
fn clone(&self) -> AnimationClipRelated:
AnimationClip
impl Debug for AnimationClip
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationClip
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationClip
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for AnimationClip
impl<K> Equivalent for AnimationClip
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for AnimationClip
impl LayoutRaw for AnimationClip
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationClip
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationClip
-
fn eq(&self, other: &AnimationClip) -> boolRelated:
AnimationClip
impl Pointee for AnimationClip
-
type Metadata = ()
impl Read for AnimationClip
impl StructuralPartialEq for AnimationClip
impl WithSubscriber for AnimationClip
AnimationGraph
struct AnimationGraph {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:263-274
The AnimationGraph struct stores immutable routes used to reconcile requested animation states.
Build the graph once with AnimationGraphBuilder, then share it between
any number of AnimationGraphPlayer instances. Client code selects one of
the graph's durable AnimationStateId values before each evaluation.
The graph also keeps its clips' pose maps, durations, and frame rates once players have resolved them against its canonical skeleton, so players that share a graph share that work too.
Implementations
-
const fn id(&self) -> u64Returns the number that tells this graph from every other, which its state IDs and the animators that play it
carry.
-
fn builder() -> AnimationGraphBuilderRelated:
AnimationGraphBuilderStarts a builder for an animation reconciliation graph.
-
const fn initial_state(&self) -> AnimationStateIdRelated:
AnimationStateIdReturns the graph's initial state.
-
fn state_count(&self) -> usizeReturns the number of authored states.
Trait Implementations
impl ArchivePointee for AnimationGraph
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraph
impl Downcast for AnimationGraph
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationGraph
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationGraph
impl LayoutRaw for AnimationGraph
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraph
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraph
-
type Metadata = ()
impl Read for AnimationGraph
impl WithSubscriber for AnimationGraph
AnimationGraphBuilder
struct AnimationGraphBuilder {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:445-448
The AnimationGraphBuilder struct assembles named clip states and their ordered reconciliation routes.
Start one with AnimationGraph::builder, then name states with Self::state.
Implementations
-
fn state(&self, name: impl Into<String>) -> AnimationGraphStateBuilder<'_>Related:
AnimationGraphStateBuilderNames a state. Call
AnimationGraphStateBuilder::withnext to assign its clip. -
fn planar_space(&self, name: impl Into<String>) -> AnimationGraphSpace<'_>Related:
AnimationGraphSpaceStarts a space whose states share one position on a plane, like the direction and speed a character moves at.
Add its states with
AnimationGraphSpace::state. -
fn linear_space(&self, name: impl Into<String>) -> AnimationGraphSpace<'_>Related:
AnimationGraphSpaceStarts a space whose states share one position on a line, like a speed. Add its states with
-
fn any_state_to<'builder>(self: &'builder Self, target: impl Into<AnimationGraphState<'builder>>, inertialization: MediaTime)Related:
AnimationGraphState,MediaTimeAdds a route from every state to
target, taken when the playing state has no route of its own to it. Use it fora state any moment can lead to, like a death, instead of a route from each state.
Like an
AnimationGraphTransitionBuilder::anytimeroute, it cuts short a one-shot clip or a blend inprogress, inertializing over
inertializationfrom the pose on screen. -
fn build<'builder>(self: &'builder Self, initial: impl Into<AnimationGraphState<'builder>>) -> Result<AnimationGraph, AnimationGraphBuildError>Related:
AnimationGraphState,AnimationGraph,AnimationGraphBuildErrorValidates the graph and selects the initial state.
Trait Implementations
impl ArchivePointee for AnimationGraphBuilder
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphBuilder
impl Downcast for AnimationGraphBuilder
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for AnimationGraphBuilder
impl LayoutRaw for AnimationGraphBuilder
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphBuilder
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphBuilder
-
type Metadata = ()
impl Read for AnimationGraphBuilder
impl WithSubscriber for AnimationGraphBuilder
AnimationGraphStateBuilder<'builder>
struct AnimationGraphStateBuilder<'builder> {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:541-547
The AnimationGraphStateBuilder struct assigns a clip to a named graph state.
Implementations
-
fn with(self, clip: AnimationClip) -> AnimationGraphState<'builder>Related:
AnimationClip,AnimationGraphStateAssigns the clip played while this state is active.
-
fn round_robin(self, clips: impl IntoIterator<Item = AnimationClip>) -> AnimationGraphState<'builder>Related:
AnimationClip,AnimationGraphStatePlays one of
clipsat a time, the next one each time a player enters the state, starting with the first andwrapping after the last. Use it to vary a state that plays again and again, like a death or a hit reaction,
without picking the clip in application code.
Every clip must loop, or every one must play once. Each player keeps its own turn. Request the state like a clip
state, with
AnimationGraphState::id, and connect it withAnimationGraphState::toor -
fn linear(self, blend: AnimationBlend<f32>) -> LinearGraphState<'builder>Related:
AnimationBlend,LinearGraphStatePlays a blend of clips placed on a line. Request it with a position through
LinearStateId::at.Named through
AnimationGraphSpace::state, it weighs its clips at the space's position, which must be linear.Otherwise it forms a space of its own, named after the state.
-
fn planar(self, blend: AnimationBlend<[f32; 2]>) -> PlanarGraphState<'builder>Related:
AnimationBlend,PlanarGraphStatePlays a blend of clips placed on a plane, like locomotion directions. Request it with a position through
Named through
AnimationGraphSpace::state, it weighs its clips at the space's position, which must be planar.Otherwise it forms a space of its own, named after the state.
Trait Implementations
impl ArchivePointee for AnimationGraphStateBuilder<'builder>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphStateBuilder<'builder>
impl Downcast for AnimationGraphStateBuilder<'builder>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for AnimationGraphStateBuilder<'builder>
impl LayoutRaw for AnimationGraphStateBuilder<'builder>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphStateBuilder<'builder>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphStateBuilder<'builder>
-
type Metadata = ()
impl Read for AnimationGraphStateBuilder<'builder>
impl WithSubscriber for AnimationGraphStateBuilder<'builder>
AnimationGraphSpace<'builder>
struct AnimationGraphSpace<'builder> {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:558-562
The AnimationGraphSpace struct groups states that share one blend position, like the idle, walk, starts, and
stops of a character moving in one direction.
Create one with AnimationGraphBuilder::planar_space or AnimationGraphBuilder::linear_space, then add its
states with Self::state. Requesting any blend state of the space with a position, like
PlanarStateId::at, moves the position for every blend of the space, and a one-shot blend on a route into the
space, like a stop, plays at the position the space had when it starts. Add routes every state of the space takes
with Self::any_state_to.
Implementations
-
fn state(self, name: impl Into<String>) -> AnimationGraphStateBuilder<'builder>Related:
AnimationGraphStateBuilderNames a state of this space. Call
AnimationGraphStateBuilder::withnext for a clip, orAnimationGraphStateBuilder::planarorAnimationGraphStateBuilder::linearfor a blend of the space's kind. -
fn any_state_to(self, target: impl Into<AnimationGraphState<'builder>>, inertialization: MediaTime)Related:
AnimationGraphState,MediaTimeAdds a route from every state of this space to
target, taken when the playing state has no route of its ownto it. Use it for a state the whole space leads to the same way, like settling back into the idle.
Like
AnimationGraphBuilder::any_state_to, it cuts short a one-shot clip leading into the space or a blend inprogress, inertializing over
inertializationfrom the pose on screen. The graph's any-state routes come afterit.
Trait Implementations
impl ArchivePointee for AnimationGraphSpace<'builder>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphSpace<'builder>
impl Clone for AnimationGraphSpace<'builder>
-
fn clone(&self) -> AnimationGraphSpace<'builder>Related:
AnimationGraphSpace
impl Copy for AnimationGraphSpace<'builder>
impl Downcast for AnimationGraphSpace<'builder>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for AnimationGraphSpace<'builder>
impl LayoutRaw for AnimationGraphSpace<'builder>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphSpace<'builder>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphSpace<'builder>
-
type Metadata = ()
impl Read for AnimationGraphSpace<'builder>
impl WithSubscriber for AnimationGraphSpace<'builder>
AnimationGraphState<'builder>
struct AnimationGraphState<'builder> {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:566-569
The AnimationGraphState struct connects a state to other states during graph authoring.
Implementations
-
const fn id(self) -> AnimationStateIdRelated:
AnimationStateIdReturns the durable state ID that client code can request after the graph is built.
-
fn to(self, target: impl Into<Self>) -> AnimationGraphTransitionBuilder<'builder>Related:
AnimationGraphTransitionBuilderStarts an authored route that reconciles toward
target, which may be any kind of state.
Trait Implementations
impl ArchivePointee for AnimationGraphState<'builder>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphState<'builder>
impl Clone for AnimationGraphState<'builder>
-
fn clone(&self) -> AnimationGraphState<'builder>Related:
AnimationGraphState
impl Copy for AnimationGraphState<'builder>
impl Downcast for AnimationGraphState<'builder>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for AnimationGraphState<'builder>
impl LayoutRaw for AnimationGraphState<'builder>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphState<'builder>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphState<'builder>
-
type Metadata = ()
impl Read for AnimationGraphState<'builder>
impl WithSubscriber for AnimationGraphState<'builder>
AnimationGraphTransitionBuilder<'builder>
struct AnimationGraphTransitionBuilder<'builder> {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:572-578
The AnimationGraphTransitionBuilder struct assigns a clip to a route between two states.
Implementations
-
fn matching_frames(self) -> SelfMakes this route one of several fitted alternatives to the same destination, so a single request, such as
idle, picks the stop that fits the playing blend soonest, like a stop off either foot.
An alternative is eligible only when it names frames on every contributing source clip that any alternative
names frames on; clips no alternative names don't constrain the choice. The eligible alternative whose frame
comes first wins, and equal times keep authoring order. While the source blends in, the route waits for it to
settle instead of taking a route of its space.
Next, name the clips' frames with
Self::at_frames, then assign the stop withSelf::with. -
fn at_frame(self, frame: u32) -> SelfWaits for the source's playback to reach
frameof its clip before taking the route. Use it to start a clipat the point of a loop it fits, like a jump off the right foot.
Frames count from the clip's first frame at its authored frame rate. The source must play one clip; for a blend,
use
Self::at_frames. A route that plays a one-shot throughSelf::withwaits before playing it. Requestinganother state while the route waits cancels it.
-
fn at_frames(self, clip: &str, frames: impl IntoIterator<Item = u32>) -> SelfWaits for the source's playback to reach any of
framesof its clipclip, the resource ID of one of thesource's clips. For a blend, its clips share one phase, so the frames of one clip place the moments for all.
Call it for several clips of a blend to fit each, like the walk loops a stop blend's clips were measured
against: the route waits for the frames of the named clip that weighs the most, the first named among equals.
-
fn at_time(self, time: MediaTime) -> SelfRelated:
MediaTimeWaits for the source's playback to reach
timeinto its clip, for clips without an authored frame rate. Thesource must play one clip.
-
fn entering_at_frame(self, clip: &str, frame: u32) -> SelfStarts the target at
frameof its clipclipinstead of at its beginning. Use it to pick up a loop at thepoint that fits the pose the route leaves from. On a route that plays a one-shot through
Self::with, thetarget starts there once the one-shot hands over, like landing into a walk mid-stride.
Call it for several clips of a blend to fit each: the named clip that weighs the most where the target starts
picks the frame, the first named among equals.
-
fn when(self, inertialization: MediaTime) -> AnimationGraphState<'builder>Related:
MediaTime,AnimationGraphStateAdds a direct route without playing an intermediate clip, taken only once the source has settled.
inertializationsmooths the switch with critically damped inertialization for that duration.Pass
MediaTime::ZEROto switch immediately. UseSelf::anytimefor a route that may also cut short ablend into the source or a one-shot clip that leads to it.
-
fn anytime(self, inertialization: MediaTime) -> AnimationGraphState<'builder>Related:
MediaTime,AnimationGraphStateAdds a direct route that is also taken while the source is still being blended in, or while a one-shot clip
that leads to the source plays, cutting either short from the pose on screen.
inertializationworks as inSelf::when. Responsive locomotion uses these routes so a change of inputnever waits for a blend or a start clip to finish.
-
fn with(self, motion: impl Into<AnimationMotion>) -> AnimationGraphTransitionConditionBuilder<'builder>Related:
AnimationMotion,AnimationGraphTransitionConditionBuilderAssigns the one-shot played between the source and target states: an
AnimationClip, or anAnimationBlendof clips that play once.A blend joins the target's space, or the source's when the target's space is of the other kind, and weighs its
clips at that space's position and follows the position while it plays, like a loop. Use it for a start or
a stop that follows the walk's direction; keep requesting it without a position to hold the direction it set
off in.
Trait Implementations
impl ArchivePointee for AnimationGraphTransitionBuilder<'builder>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphTransitionBuilder<'builder>
impl Downcast for AnimationGraphTransitionBuilder<'builder>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for AnimationGraphTransitionBuilder<'builder>
impl LayoutRaw for AnimationGraphTransitionBuilder<'builder>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphTransitionBuilder<'builder>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphTransitionBuilder<'builder>
-
type Metadata = ()
impl Read for AnimationGraphTransitionBuilder<'builder>
impl WithSubscriber for AnimationGraphTransitionBuilder<'builder>
AnimationGraphTransitionConditionBuilder<'builder>
struct AnimationGraphTransitionConditionBuilder<'builder> {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph.rs:581-590
The AnimationGraphTransitionConditionBuilder struct holds unfinished one-shot route authoring so callers can choose its interruption policy.
Implementations
-
fn exit(self, inertialization: MediaTime) -> SelfRelated:
MediaTimeInertializes from the one-shot clip's last pose into the target state over
inertializationonce the clipends, which hides small pose mismatches between the two clips. Without it the target starts immediately.
-
fn turning(self, yaw: f32) -> SelfHands
yaw, in radians about +Y, to the entity through root motion when the one-shot completes. Use it for aturn in place: pass the angle the clip turns the body in its pose, and make the target a state whose pose
faces where the clip started, so the entity takes over the turn in the frame the pose gives it up. The look
chain holds its direction across it on its own. A one-shot cut short hands over no turn.
-
fn when(self, inertialization: MediaTime) -> AnimationGraphState<'builder>Related:
MediaTime,AnimationGraphStateAdds a one-shot route that must complete before reconciling another request. Only an any-state route, added
with
AnimationGraphBuilder::any_state_to, cuts its clip short.inertializationworks as inAnimationGraphTransitionBuilder::when. -
fn anytime(self, inertialization: MediaTime) -> AnimationGraphState<'builder>Related:
MediaTime,AnimationGraphStateAdds a one-shot route that can reconcile another request before it completes.
inertializationworks as inAnimationGraphTransitionBuilder::when.
Trait Implementations
impl ArchivePointee for AnimationGraphTransitionConditionBuilder<'builder>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphTransitionConditionBuilder<'builder>
impl Downcast for AnimationGraphTransitionConditionBuilder<'builder>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for AnimationGraphTransitionConditionBuilder<'builder>
impl LayoutRaw for AnimationGraphTransitionConditionBuilder<'builder>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphTransitionConditionBuilder<'builder>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphTransitionConditionBuilder<'builder>
-
type Metadata = ()
impl Read for AnimationGraphTransitionConditionBuilder<'builder>
impl WithSubscriber for AnimationGraphTransitionConditionBuilder<'builder>
AnimationBlend<P>
struct AnimationBlend<P> {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph/motion.rs:105-108
The AnimationBlend struct collects the clips a blend state mixes and where each one sits.
Build one with Self::new and Self::sample, then give it to AnimationGraphStateBuilder::linear for
positions on a line (f32) or AnimationGraphStateBuilder::planar for positions on a plane ([f32; 2]).
Each frame, client code passes the position to play with LinearStateId::at or PlanarStateId::at.
Implementations
-
fn new() -> SelfStarts an empty blend. Add its clips with
Self::sample. -
fn sample(self, position: P, clip: AnimationClip) -> SelfRelated:
AnimationClipPlaces
clipatposition. Every clip of a blend must loop, or every one must play once.
Trait Implementations
impl ArchivePointee for AnimationBlend<P>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationBlend<P>
impl<P> Default for AnimationBlend<P>
-
fn default() -> Self
impl Downcast for AnimationBlend<P>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationBlend<P>
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationBlend<P>
impl LayoutRaw for AnimationBlend<P>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationBlend<P>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationBlend<P>
-
type Metadata = ()
impl Read for AnimationBlend<P>
impl<R, P> ReadPrimitive for AnimationBlend<P>
impl WithSubscriber for AnimationBlend<P>
AnimationMotion
struct AnimationMotion();Defined in crates/byte-engine/src/animation/graph/motion.rs:80
The AnimationMotion struct is what a one-shot route plays: one clip, or a blend of clips that play once.
Pass an AnimationClip, or an AnimationBlend on a line or a plane, to
AnimationGraphTransitionBuilder::with. A blend weighs its clips at its space's position when it starts, so a
stop can follow the direction the walk had.
Trait Implementations
impl ArchivePointee for AnimationMotion
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationMotion
impl Downcast for AnimationMotion
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationMotion
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationMotion
impl LayoutRaw for AnimationMotion
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationMotion
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationMotion
-
type Metadata = ()
impl Read for AnimationMotion
impl WithSubscriber for AnimationMotion
AnimationRequest
struct AnimationRequest {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph/motion.rs:329-334
The AnimationRequest struct is what client code asks a player for each frame: a state, and where to play its
blend.
Make one from any state ID, or with LinearStateId::at and PlanarStateId::at for blend states, then pass
it to AnimationGraphPlayer::advance. A position sets the position of the blend state's space, which every
looping blend of the space follows. A blend requested without a position keeps its space's position, and a blend
the player enters on its own starts there.
Implementations
-
const fn state(&self) -> AnimationStateIdRelated:
AnimationStateIdReturns the requested state.
-
const fn inertialized(self, duration: MediaTime) -> SelfRelated:
MediaTimeBlends a playing blend state to this request's position from the pose on screen over
duration, instead ofchanging its clips' weights at once.
Ask for it on the frame the position jumps, like a turnaround on a direction ring, where moving the weights in
one frame would pop the pose. Requests without it change the weights at once, which suits positions that move
a little each frame.
Trait Implementations
impl ArchivePointee for AnimationRequest
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationRequest
impl Clone for AnimationRequest
-
fn clone(&self) -> AnimationRequestRelated:
AnimationRequest
impl Copy for AnimationRequest
impl Debug for AnimationRequest
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationRequest
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationRequest
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationRequest
impl LayoutRaw for AnimationRequest
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationRequest
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationRequest
-
fn eq(&self, other: &AnimationRequest) -> boolRelated:
AnimationRequest
impl Pointee for AnimationRequest
-
type Metadata = ()
impl Read for AnimationRequest
impl StructuralPartialEq for AnimationRequest
impl WithSubscriber for AnimationRequest
LinearGraphState<'builder>
struct LinearGraphState<'builder>();Defined in crates/byte-engine/src/animation/graph/motion.rs:216
The LinearGraphState struct is a blend state whose clips sit on a line, as returned by
AnimationGraphStateBuilder::linear.
Connect it with routes like any AnimationGraphState, then keep Self::id to request it.
Implementations
-
const fn id(self) -> LinearStateIdRelated:
LinearStateIdReturns the ID client code requests with a position on the line, through
LinearStateId::at.
Trait Implementations
impl ArchivePointee for LinearGraphState<'builder>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for LinearGraphState<'builder>
impl Clone for LinearGraphState<'builder>
-
fn clone(&self) -> LinearGraphState<'builder>Related:
LinearGraphState
impl Copy for LinearGraphState<'builder>
impl Deref for LinearGraphState<'builder>
-
type Target = AnimationGraphState<'builder> -
fn deref(&self) -> &<Self as >::Target
impl Downcast for LinearGraphState<'builder>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for LinearGraphState<'builder>
impl LayoutRaw for LinearGraphState<'builder>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for LinearGraphState<'builder>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for LinearGraphState<'builder>
-
type Metadata = ()
impl Read for LinearGraphState<'builder>
impl Receiver for LinearGraphState<'builder>
-
type Target = T
impl WithSubscriber for LinearGraphState<'builder>
LinearStateId
struct LinearStateId();Defined in crates/byte-engine/src/animation/graph/motion.rs:269
The LinearStateId struct identifies a blend state on a line, so only a scalar position can be requested for it.
Implementations
-
const fn at(self, value: f32) -> AnimationRequestRelated:
AnimationRequestRequests this state played at
valueon its line. Pass the request toAnimationGraphPlayer::advance.
Trait Implementations
impl ArchivePointee for LinearStateId
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for LinearStateId
impl Clone for LinearStateId
-
fn clone(&self) -> LinearStateIdRelated:
LinearStateId
impl Copy for LinearStateId
impl Debug for LinearStateId
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for LinearStateId
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for LinearStateId
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for LinearStateId
impl<K> Equivalent for LinearStateId
-
fn equivalent(&self, key: &K) -> bool
impl Hash for LinearStateId
-
fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for LinearStateId
impl LayoutRaw for LinearStateId
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for LinearStateId
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for LinearStateId
-
fn eq(&self, other: &LinearStateId) -> boolRelated:
LinearStateId
impl Pointee for LinearStateId
-
type Metadata = ()
impl Read for LinearStateId
impl StructuralPartialEq for LinearStateId
impl WithSubscriber for LinearStateId
PlanarGraphState<'builder>
struct PlanarGraphState<'builder>();Defined in crates/byte-engine/src/animation/graph/motion.rs:244
The PlanarGraphState struct is a blend state whose clips sit on a plane, as returned by
AnimationGraphStateBuilder::planar.
Connect it with routes like any AnimationGraphState, then keep Self::id to request it.
Implementations
-
const fn id(self) -> PlanarStateIdRelated:
PlanarStateIdReturns the ID client code requests with a position on the plane, through
PlanarStateId::at.
Trait Implementations
impl ArchivePointee for PlanarGraphState<'builder>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for PlanarGraphState<'builder>
impl Clone for PlanarGraphState<'builder>
-
fn clone(&self) -> PlanarGraphState<'builder>Related:
PlanarGraphState
impl Copy for PlanarGraphState<'builder>
impl Deref for PlanarGraphState<'builder>
-
type Target = AnimationGraphState<'builder> -
fn deref(&self) -> &<Self as >::Target
impl Downcast for PlanarGraphState<'builder>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for PlanarGraphState<'builder>
impl LayoutRaw for PlanarGraphState<'builder>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for PlanarGraphState<'builder>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for PlanarGraphState<'builder>
-
type Metadata = ()
impl Read for PlanarGraphState<'builder>
impl Receiver for PlanarGraphState<'builder>
-
type Target = T
impl WithSubscriber for PlanarGraphState<'builder>
PlanarStateId
struct PlanarStateId();Defined in crates/byte-engine/src/animation/graph/motion.rs:296
The PlanarStateId struct identifies a blend state on a plane, so only a 2D position can be requested for it.
Implementations
-
const fn at(self, value: [f32; 2]) -> AnimationRequestRelated:
AnimationRequestRequests this state played at
valueon its plane. Pass the request toAnimationGraphPlayer::advance.
Trait Implementations
impl ArchivePointee for PlanarStateId
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for PlanarStateId
impl Clone for PlanarStateId
-
fn clone(&self) -> PlanarStateIdRelated:
PlanarStateId
impl Copy for PlanarStateId
impl Debug for PlanarStateId
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for PlanarStateId
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for PlanarStateId
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for PlanarStateId
impl<K> Equivalent for PlanarStateId
-
fn equivalent(&self, key: &K) -> bool
impl Hash for PlanarStateId
-
fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for PlanarStateId
impl LayoutRaw for PlanarStateId
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for PlanarStateId
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for PlanarStateId
-
fn eq(&self, other: &PlanarStateId) -> boolRelated:
PlanarStateId
impl Pointee for PlanarStateId
-
type Metadata = ()
impl Read for PlanarStateId
impl StructuralPartialEq for PlanarStateId
impl WithSubscriber for PlanarStateId
AnimationGraphPlayer
struct AnimationGraphPlayer {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph/runtime/player.rs:411-428
The AnimationGraphPlayer struct retains local playback while the pool resolves all graph data asynchronously.
Create players with AnimationPool::create_player. Call AnimationPool::update once per tick, then either
call Self::advance with the client-selected state, or set each player's state with Self::request and
advance them all together with AnimationPool::advance_players. The initial clip supplies the canonical
skeleton used by every graph clip.
Implementations
-
fn set_stream(&mut self, stream: Option<DebugDataStreamWriter>)Related:
DebugDataStreamWriterAttaches a stream the player writes a record to after every advance, or detaches it with
None.The animation system attaches writers created from world-spawned
DebugDataStreamrequests. A player without a writer does no reporting work.
Trait Implementations
impl ArchivePointee for AnimationGraphPlayer
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphPlayer
impl Downcast for AnimationGraphPlayer
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationGraphPlayer
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationGraphPlayer
impl LayoutRaw for AnimationGraphPlayer
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphPlayer
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphPlayer
-
type Metadata = ()
impl Read for AnimationGraphPlayer
impl WithSubscriber for AnimationGraphPlayer
AnimationGraphPose<'a>
struct AnimationGraphPose<'a> {
pub skeleton: &'a resource_management::resources::skeleton::Skeleton,
pub local_pose: &'a [resource_management::resources::skeleton::LocalTransform],
pub global_pose: &'a [math::AffineMatrix],
pub root_motion: super::root_motion::RootMotionDelta,
pub state: Option<AnimationStateId>,
}Defined in crates/byte-engine/src/animation/graph/runtime/player.rs:391-403
The AnimationGraphPose struct borrows the latest player pose and frame root motion.
Apply Self::root_motion to the owning object, then submit Self::global_pose to rendering during the
current tick.
Fields
-
skeleton:&'a resource_management::resources::skeleton::SkeletonThe canonical skeleton that defines the pose's node and matrix order.
-
local_pose:&'a [resource_management::resources::skeleton::LocalTransform]Blendable local transforms with extracted root motion removed when configured.
-
global_pose:&'a [math::AffineMatrix]Renderer-facing global skeleton transforms, one affine matrix per node, as
UpdatePosecarries them. -
root_motion:super::root_motion::RootMotionDeltaThis frame's root translation and rotation delta.
-
state:Option<AnimationStateId>The state playing after this advance, as
AnimationGraphPlayer::statereports it. Use it to react to a route taken this frame, like taking over a turn clip's rotation, while still holding the pose.
Trait Implementations
impl ArchivePointee for AnimationGraphPose<'a>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphPose<'a>
impl Downcast for AnimationGraphPose<'a>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationGraphPose<'a>
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationGraphPose<'a>
impl LayoutRaw for AnimationGraphPose<'a>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphPose<'a>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationGraphPose<'a>
-
type Metadata = ()
impl Read for AnimationGraphPose<'a>
impl WithSubscriber for AnimationGraphPose<'a>
AnimationLoadWorker
struct AnimationLoadWorker {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph/runtime.rs:385-389
The AnimationLoadWorker struct loads and packs animation resources away from synchronous pose evaluation.
Implementations
-
async fn run(self)Loads queued clips until the animation pool drops its command channel.
Trait Implementations
impl ArchivePointee for AnimationLoadWorker
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationLoadWorker
impl Downcast for AnimationLoadWorker
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationLoadWorker
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationLoadWorker
impl LayoutRaw for AnimationLoadWorker
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationLoadWorker
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationLoadWorker
-
type Metadata = ()
impl Read for AnimationLoadWorker
impl WithSubscriber for AnimationLoadWorker
AnimationPool
struct AnimationPool {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/animation/graph/runtime.rs:83-97
The AnimationPool struct owns a preallocated word arena and byte-bounded LRU clip cache.
Graph clips keep their resource IDs as stable keys across eviction. Players only read the pool while they
evaluate, so any number of them can sample it at once, on any lanes; loads are admitted and clips evicted only
by the calls that take it mutably, Self::update and Self::request, between evaluations.
Implementations
-
fn create_player(&mut self, graph: &AnimationGraph, root_motion: Option<RootMotionSettings<'static>>) -> AnimationGraphPlayerRelated:
AnimationGraph,RootMotionSettings,AnimationGraphPlayerCreates a local player and queues the initial clip that supplies its canonical skeleton.
Continue calling
Self::updateonce per tick, then pass this pool toAnimationGraphPlayer::advanceso requested clips can load through thesame asynchronous worker.
-
fn advance_players(&mut self, players: &mut [AnimationGraphPlayer], graphs: &[AnimationGraph], delta: MediaTime, alley: &mut crate::core::alley::Alley) -> Result<(), AnimationGraphPlayerError>Related:
AnimationGraphPlayer,AnimationGraph,MediaTime,AnimationGraphPlayerErrorAdvances every player by
deltatoward its latest request, then requeststhe clips they found missing. Each player plays the one of
graphsit was created with.Players only read the pool while they evaluate, so large crowds spread over
alley's lanes, each lane takinga balanced share of the players; small ones stay on the calling thread. Read each player's result with
AnimationGraphPlayer::posenext. Returns the error of the first player rejected in this advance, such as aroot motion node its canonical skeleton lacks, after advancing the others.
Trait Implementations
impl ArchivePointee for AnimationPool
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationPool
impl Downcast for AnimationPool
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationPool
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for AnimationPool
impl LayoutRaw for AnimationPool
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationPool
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for AnimationPool
-
type Metadata = ()
impl Read for AnimationPool
impl WithSubscriber for AnimationPool
LookChainSettings<'a>
struct LookChainSettings<'a> {
pub nodes: &'a [(&'a str, f32)],
pub body_node: &'a str,
pub yaw_limit: f32,
pub up_limit: f32,
pub down_limit: f32,
pub response: Option<f32>,
}Defined in crates/byte-engine/src/animation/graph/runtime/player/look.rs:17-32
The LookChainSettings struct names the nodes a player turns toward its look target, from a spine to the head,
and how far and how fast they turn.
Give them to AnimationGraphPlayer::with_look_chain, then set where to look each frame with
AnimationGraphPlayer::set_look.
Fields
-
nodes:&'a [(&'a str, f32)]The chain's nodes from its base to its end, each with its share of the turn. Each node must exist once in the canonical skeleton and descend from the node before it; the shares normalize by their sum.
-
body_node:&'a strThe node whose animated yaw centers the yaw limit, such as the hips, so a clip that turns the body carries the look with it.
-
yaw_limit:f32How far the chain turns from the body node's yaw, in radians, up to π.
-
up_limit:f32How far the chain looks up, in radians, up to π/2.
-
down_limit:f32How far the chain looks down, in radians, up to π/2.
-
response:Option<f32>How quickly the chain follows the target, per second, or none to follow it at once.
Trait Implementations
impl ArchivePointee for LookChainSettings<'a>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for LookChainSettings<'a>
impl Clone for LookChainSettings<'a>
-
fn clone(&self) -> LookChainSettings<'a>Related:
LookChainSettings
impl Copy for LookChainSettings<'a>
impl Debug for LookChainSettings<'a>
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for LookChainSettings<'a>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for LookChainSettings<'a>
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for LookChainSettings<'a>
impl LayoutRaw for LookChainSettings<'a>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for LookChainSettings<'a>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for LookChainSettings<'a>
-
fn eq(&self, other: &LookChainSettings<'a>) -> boolRelated:
LookChainSettings
impl Pointee for LookChainSettings<'a>
-
type Metadata = ()
impl Read for LookChainSettings<'a>
impl StructuralPartialEq for LookChainSettings<'a>
impl WithSubscriber for LookChainSettings<'a>
LookTarget
struct LookTarget {
pub yaw: f32,
pub pitch: f32,
pub turned: f32,
}Defined in crates/byte-engine/src/animation/graph/runtime/player/look.rs:38-44
The LookTarget struct is where a player's look chain turns toward, in the entity's object space.
Yaw turns about +Y and pitch about +X, by the right-hand rule. The object faces -Z, so a positive pitch looks up.
Fields
-
turned:f32How far the entity turned about +Y since the last step. The eased yaw turns the other way by this much before it eases, so the chain holds its direction in the world when the entity takes over a turn clip's rotation.
Implementations
-
const fn new(yaw: f32, pitch: f32) -> SelfLooks along
yawandpitchin the entity's object space. -
const fn turned_by(self, turned: f32) -> SelfTells the chain the entity turned by
turnedabout +Y since the last step, so it holds its direction in theworld across the turn.
Trait Implementations
impl ArchivePointee for LookTarget
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for LookTarget
impl Clone for LookTarget
-
fn clone(&self) -> LookTargetRelated:
LookTarget
impl Copy for LookTarget
impl Debug for LookTarget
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for LookTarget
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for LookTarget
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for LookTarget
impl LayoutRaw for LookTarget
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for LookTarget
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for LookTarget
-
fn eq(&self, other: &LookTarget) -> boolRelated:
LookTarget
impl Pointee for LookTarget
-
type Metadata = ()
impl Read for LookTarget
impl StructuralPartialEq for LookTarget
impl WithSubscriber for LookTarget
RootMotionSettings<'a>
struct RootMotionSettings<'a> {
pub node_name: &'a str,
pub translation: RootMotionTranslation,
pub rotation: RootMotionRotation,
}Defined in crates/byte-engine/src/animation/graph/runtime/player.rs:359-366
The RootMotionSettings struct defines which motion a canonical-skeleton node contributes to its owning object.
Fields
-
node_name:&'a strNames the unique node that contains the authored motion.
-
translation:RootMotionTranslationSelects node-local translation axes to extract.
-
rotation:RootMotionRotationSelects whether to extract node-local rotation.
Implementations
-
const fn full(node_name: &'a str) -> SelfSelects all translation and rotation from a dedicated authored root node.
Trait Implementations
impl ArchivePointee for RootMotionSettings<'a>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for RootMotionSettings<'a>
impl Clone for RootMotionSettings<'a>
-
fn clone(&self) -> RootMotionSettings<'a>Related:
RootMotionSettings
impl Copy for RootMotionSettings<'a>
impl Debug for RootMotionSettings<'a>
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for RootMotionSettings<'a>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for RootMotionSettings<'a>
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for RootMotionSettings<'a>
impl<K> Equivalent for RootMotionSettings<'a>
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for RootMotionSettings<'a>
impl LayoutRaw for RootMotionSettings<'a>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for RootMotionSettings<'a>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for RootMotionSettings<'a>
-
fn eq(&self, other: &RootMotionSettings<'a>) -> boolRelated:
RootMotionSettings
impl Pointee for RootMotionSettings<'a>
-
type Metadata = ()
impl Read for RootMotionSettings<'a>
impl StructuralPartialEq for RootMotionSettings<'a>
impl WithSubscriber for RootMotionSettings<'a>
RootMotionTranslation
struct RootMotionTranslation();Defined in crates/byte-engine/src/animation/graph/runtime/player.rs:318
The RootMotionTranslation struct selects node-local translation axes for root motion.
Implementations
-
const NONE: Self -
const X: Self -
const Y: Self -
const Z: Self -
const XYZ: Self -
const fn union(self, other: Self) -> SelfCombines translation axes for clips that move along more than one local axis.
Trait Implementations
impl ArchivePointee for RootMotionTranslation
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for RootMotionTranslation
impl Clone for RootMotionTranslation
-
fn clone(&self) -> RootMotionTranslationRelated:
RootMotionTranslation
impl Copy for RootMotionTranslation
impl Debug for RootMotionTranslation
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for RootMotionTranslation
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for RootMotionTranslation
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for RootMotionTranslation
impl<K> Equivalent for RootMotionTranslation
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for RootMotionTranslation
impl LayoutRaw for RootMotionTranslation
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for RootMotionTranslation
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for RootMotionTranslation
-
fn eq(&self, other: &RootMotionTranslation) -> boolRelated:
RootMotionTranslation
impl Pointee for RootMotionTranslation
-
type Metadata = ()
impl Read for RootMotionTranslation
impl StructuralPartialEq for RootMotionTranslation
impl WithSubscriber for RootMotionTranslation
Enums
AnimationPlayback
enum AnimationPlayback {
Loop,
Once,
}Defined in crates/byte-engine/src/animation/graph.rs:64-69
The AnimationPlayback enum selects whether a state clip repeats or stops at its final pose.
Variants
-
LoopRestarts the clip from its first sample after it reaches its duration.
-
OnceHolds the clip's final sample after it reaches its duration.
Trait Implementations
impl ArchivePointee for AnimationPlayback
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationPlayback
impl Clone for AnimationPlayback
-
fn clone(&self) -> AnimationPlaybackRelated:
AnimationPlayback
impl Copy for AnimationPlayback
impl Debug for AnimationPlayback
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationPlayback
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationPlayback
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for AnimationPlayback
impl<K> Equivalent for AnimationPlayback
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for AnimationPlayback
impl LayoutRaw for AnimationPlayback
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationPlayback
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationPlayback
-
fn eq(&self, other: &AnimationPlayback) -> boolRelated:
AnimationPlayback
impl Pointee for AnimationPlayback
-
type Metadata = ()
impl Read for AnimationPlayback
impl StructuralPartialEq for AnimationPlayback
impl WithSubscriber for AnimationPlayback
AnimationGraphBuildError
enum AnimationGraphBuildError {
InitialStateOutOfRange {
state: usize,
state_count: usize,
},
EmptyStateName {
state: usize,
},
EmptyResourceId {
state: usize,
},
DuplicateStateName {
name: String,
},
EmptySpaceName {
space: usize,
},
DuplicateSpaceName {
name: String,
},
SpaceKindMismatch {
state: usize,
},
BlendOutsideSpace {
state: usize,
},
TransitionSourceOutOfRange {
state: usize,
state_count: usize,
},
TransitionTargetOutOfRange {
state: usize,
state_count: usize,
},
TransitionStateMustPlayOnce {
state: usize,
},
TransitionStateCompletionOutOfRange {
state: usize,
completion: usize,
state_count: usize,
},
NegativeTransitionDuration,
InvalidBlend {
state: usize,
error: super::blend::BlendSpaceError,
},
MixedBlendPlayback {
state: usize,
},
EmptyRoundRobin {
state: usize,
},
RoutePointClipMissing {
state: usize,
clip: String,
},
RoutePointNeedsClip {
state: usize,
},
}Defined in crates/byte-engine/src/animation/graph.rs:1136-1239
The AnimationGraphBuildError enum reports invalid graph authoring input.
Variants
-
InitialStateOutOfRangeThe selected initial state is outside the graph being built.
-
EmptyStateNameA state cannot be identified because its name is empty.
-
EmptyResourceIdA state cannot load its clip because its resource ID is empty.
-
DuplicateStateNameA state name cannot identify one state because another state uses it.
-
EmptySpaceNameA space cannot be identified because its name is empty.
-
DuplicateSpaceNameA space name cannot identify one space because another space uses it.
-
SpaceKindMismatchA blend state cannot weigh its clips at its space's position because the two are of different kinds.
-
BlendOutsideSpaceA one-shot blend has no position to weigh its clips at because neither end of its route is in a space of its kind.
-
TransitionSourceOutOfRangeA transition cannot start because its source is outside the graph.
-
TransitionTargetOutOfRangeA transition cannot complete because its target is outside the graph.
-
TransitionStateMustPlayOnceA transition state cannot complete because its clip uses looping playback.
-
TransitionStateCompletionOutOfRangeA transition state cannot complete because its completion state is outside the graph.
-
NegativeTransitionDurationA transition cannot be built with a duration before
MediaTime::ZERO. -
InvalidBlendA blend state cannot weigh its clips because their positions are invalid.
-
MixedBlendPlaybackA blend or round-robin state cannot keep its clips in step because some loop and others play once.
-
EmptyRoundRobinA round-robin state has no clip to play.
-
RoutePointClipMissingA route point names a clip that its state does not play.
-
RoutePointNeedsClipA route point does not say which clip it counts frames of, but its state plays several.
Trait Implementations
impl ArchivePointee for AnimationGraphBuildError
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphBuildError
impl Clone for AnimationGraphBuildError
-
fn clone(&self) -> AnimationGraphBuildErrorRelated:
AnimationGraphBuildError
impl Debug for AnimationGraphBuildError
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Display for AnimationGraphBuildError
-
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationGraphBuildError
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationGraphBuildError
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for AnimationGraphBuildError
impl<K> Equivalent for AnimationGraphBuildError
-
fn equivalent(&self, key: &K) -> bool
impl Error for AnimationGraphBuildError
impl Instrument for AnimationGraphBuildError
impl LayoutRaw for AnimationGraphBuildError
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphBuildError
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationGraphBuildError
-
fn eq(&self, other: &AnimationGraphBuildError) -> boolRelated:
AnimationGraphBuildError
impl Pointee for AnimationGraphBuildError
-
type Metadata = ()
impl Read for AnimationGraphBuildError
impl StructuralPartialEq for AnimationGraphBuildError
impl ToString for AnimationGraphBuildError
-
fn to_string(&self) -> String
impl WithSubscriber for AnimationGraphBuildError
AnimationGraphPlayerError
enum AnimationGraphPlayerError {
RootMotionNodeNotFound {
name: String,
},
DuplicateRootMotionNodeName {
name: String,
},
StateFromDifferentGraph,
NegativeDelta,
LookChainNodeNotFound {
name: String,
},
DuplicateLookChainNodeName {
name: String,
},
LookChainNodeNotDescendant {
name: String,
},
LookChainSettingOutOfRange {
setting: &'static str,
},
}Defined in crates/byte-engine/src/animation/graph/runtime/player.rs:1734-1769
The AnimationGraphPlayerError enum reports invalid player inputs.
Variants
-
RootMotionNodeNotFoundChoose a root-motion node that exists in the canonical skeleton.
-
DuplicateRootMotionNodeNameChoose a root-motion node name that is unique in the canonical skeleton.
-
StateFromDifferentGraphRequest a state created by the same graph as this player.
-
NegativeDeltaPass a nonnegative frame duration to
AnimationGraphPlayer::advance. -
LookChainNodeNotFoundName look chain and body nodes that exist in the canonical skeleton.
-
DuplicateLookChainNodeNameName look chain and body nodes that are unique in the canonical skeleton.
-
LookChainNodeNotDescendantList the look chain's nodes from its base to its end, each a descendant of the one before.
-
LookChainSettingOutOfRangeGive the look chain positive shares, limits within their range, and a positive response.
Trait Implementations
impl ArchivePointee for AnimationGraphPlayerError
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationGraphPlayerError
impl Clone for AnimationGraphPlayerError
-
fn clone(&self) -> AnimationGraphPlayerErrorRelated:
AnimationGraphPlayerError
impl Debug for AnimationGraphPlayerError
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Display for AnimationGraphPlayerError
-
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationGraphPlayerError
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationGraphPlayerError
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for AnimationGraphPlayerError
impl<K> Equivalent for AnimationGraphPlayerError
-
fn equivalent(&self, key: &K) -> bool
impl Error for AnimationGraphPlayerError
impl Instrument for AnimationGraphPlayerError
impl LayoutRaw for AnimationGraphPlayerError
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationGraphPlayerError
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationGraphPlayerError
-
fn eq(&self, other: &AnimationGraphPlayerError) -> boolRelated:
AnimationGraphPlayerError
impl Pointee for AnimationGraphPlayerError
-
type Metadata = ()
impl Read for AnimationGraphPlayerError
impl StructuralPartialEq for AnimationGraphPlayerError
impl ToString for AnimationGraphPlayerError
-
fn to_string(&self) -> String
impl WithSubscriber for AnimationGraphPlayerError
AnimationPoolEvent
enum AnimationPoolEvent {
LoadFailed {
resource_id: String,
error: resource_management::RequestError,
},
Oversized {
resource_id: String,
resident_bytes: usize,
byte_budget: usize,
},
Evicted {
resource_id: String,
},
}Defined in crates/byte-engine/src/animation/graph/runtime.rs:54-76
The AnimationPoolEvent enum reports load outcomes that require application-level handling.
Variants
-
LoadFailedHandle a resource that could not be loaded.
-
OversizedIncrease the pool budget or use a smaller animation resource.
-
EvictedRequest the resource again before its next use.
Trait Implementations
impl ArchivePointee for AnimationPoolEvent
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationPoolEvent
impl Clone for AnimationPoolEvent
-
fn clone(&self) -> AnimationPoolEventRelated:
AnimationPoolEvent
impl Debug for AnimationPoolEvent
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationPoolEvent
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationPoolEvent
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for AnimationPoolEvent
impl<K> Equivalent for AnimationPoolEvent
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for AnimationPoolEvent
impl LayoutRaw for AnimationPoolEvent
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationPoolEvent
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationPoolEvent
-
fn eq(&self, other: &AnimationPoolEvent) -> boolRelated:
AnimationPoolEvent
impl Pointee for AnimationPoolEvent
-
type Metadata = ()
impl Read for AnimationPoolEvent
impl StructuralPartialEq for AnimationPoolEvent
impl WithSubscriber for AnimationPoolEvent
AnimationPoolRequest
enum AnimationPoolRequest {
Ready,
Loading,
WaitingForCapacity,
Failed,
}Defined in crates/byte-engine/src/animation/graph/runtime.rs:41-50
The AnimationPoolRequest enum reports whether a clip can be sampled immediately.
Variants
-
ReadyThe clip is resident, so players sample it.
-
LoadingWait while the requested clip loads asynchronously.
-
WaitingForCapacityRetry when loading or residency capacity becomes available.
-
FailedHandle the load failure or call
AnimationPool::retry.
Trait Implementations
impl ArchivePointee for AnimationPoolRequest
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AnimationPoolRequest
impl Clone for AnimationPoolRequest
-
fn clone(&self) -> AnimationPoolRequestRelated:
AnimationPoolRequest
impl Copy for AnimationPoolRequest
impl Debug for AnimationPoolRequest
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for AnimationPoolRequest
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for AnimationPoolRequest
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for AnimationPoolRequest
impl<K> Equivalent for AnimationPoolRequest
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for AnimationPoolRequest
impl LayoutRaw for AnimationPoolRequest
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AnimationPoolRequest
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AnimationPoolRequest
-
fn eq(&self, other: &AnimationPoolRequest) -> boolRelated:
AnimationPoolRequest
impl Pointee for AnimationPoolRequest
-
type Metadata = ()
impl Read for AnimationPoolRequest
impl StructuralPartialEq for AnimationPoolRequest
impl WithSubscriber for AnimationPoolRequest
RootMotionRotation
enum RootMotionRotation {
None,
Full,
}Defined in crates/byte-engine/src/animation/graph/runtime/player.rs:350-355
The RootMotionRotation enum selects whether node-local rotation drives the owning object.
Variants
-
NoneKeeps rotation in the visual pose.
-
FullExtracts the node's full rotation.
Trait Implementations
impl ArchivePointee for RootMotionRotation
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for RootMotionRotation
impl Clone for RootMotionRotation
-
fn clone(&self) -> RootMotionRotationRelated:
RootMotionRotation
impl Copy for RootMotionRotation
impl Debug for RootMotionRotation
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for RootMotionRotation
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for RootMotionRotation
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for RootMotionRotation
impl<K> Equivalent for RootMotionRotation
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for RootMotionRotation
impl LayoutRaw for RootMotionRotation
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for RootMotionRotation
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for RootMotionRotation
-
fn eq(&self, other: &RootMotionRotation) -> boolRelated:
RootMotionRotation
impl Pointee for RootMotionRotation
-
type Metadata = ()
impl Read for RootMotionRotation
impl StructuralPartialEq for RootMotionRotation
impl WithSubscriber for RootMotionRotation
Constants
ANIMATION_LOAD_QUEUE_CAPACITY
const ANIMATION_LOAD_QUEUE_CAPACITY: usize = 64usize;Defined in crates/byte-engine/src/animation/graph.rs:50
Bounds asynchronous animation load requests independently from the clip byte budget.
ANIMATION_POOL_EVENT_CAPACITY
const ANIMATION_POOL_EVENT_CAPACITY: usize = 64usize;Defined in crates/byte-engine/src/animation/graph.rs:53
Bounds retained load outcomes so diagnostics cannot outgrow the clip pool.