pub struct AnimationParams {
pub target: SkinnedMeshHandle,
pub values: Vec<f32>,
}Expand description
Runtime-only parameter block for one animation graph target.
AnimationSystem publishes one AnimationParams per AnimationGraph at init,
seeded to the graph’s declared parameter defaults. Gameplay systems write
values into it each frame (matching on target); AnimationSystem reads
it back during its step and evaluates the graph’s transitions against the
values. Entries are indexed by the graph’s parameter declaration order –
parameter names are compiled away at build time, so nothing resolves them
at runtime.
Not authored in world files: it has no args.
Fields§
§target: SkinnedMeshHandleThe SkinnedMesh resource whose graph these parameters drive.
values: Vec<f32>One value per graph parameter, in declaration order.
Implementations§
Trait Implementations§
Source§impl Clone for AnimationParams
impl Clone for AnimationParams
Source§fn clone(&self) -> AnimationParams
fn clone(&self) -> AnimationParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Component for AnimationParams
impl Component for AnimationParams
Source§const NAME: &'static str = "AnimationParams"
const NAME: &'static str = "AnimationParams"
The registry name a world authors this component under.
Source§fn from_baked(_bytes: &[u8]) -> Result<Self, CnResult>
fn from_baked(_bytes: &[u8]) -> Result<Self, CnResult>
Reconstruct this component from a blob record, whose bytes are the
serialized runtime component (cook already ran the asset -> component
translation). The default rejects: runtime-only components are never
stored in a blob, so only loadable types provide an implementation.
Source§fn inject_locator(&mut self, _locator: PayloadLocator)
fn inject_locator(&mut self, _locator: PayloadLocator)
Called after construction to inject the payload locator from the blob def.
Only meaningful for components with a compiled payload.
The default implementation does nothing (correct for most components).
Source§fn inject_name(&mut self, _id: AssetId)
fn inject_name(&mut self, _id: AssetId)
Called after construction to inject the asset’s identity from the blob
def. Only meaningful for components that look themselves up by id at
runtime. The default implementation does nothing.
Source§impl ComponentSlot for AnimationParams
impl ComponentSlot for AnimationParams
Source§const DISCRIMINANT: u8
const DISCRIMINANT: u8
The component type’s stable id, used as its
ComponentId.Source§fn slot(s: &ComponentStorage) -> &Column<Self>
fn slot(s: &ComponentStorage) -> &Column<Self>
Borrow this type’s column out of the storage.
Source§fn slot_mut(s: &mut ComponentStorage) -> &mut Column<Self>
fn slot_mut(s: &mut ComponentStorage) -> &mut Column<Self>
Mutably borrow this type’s column out of the storage.
Source§impl Debug for AnimationParams
impl Debug for AnimationParams
Source§impl From<AnimationParams> for ComponentAsset
impl From<AnimationParams> for ComponentAsset
Source§fn from(c: AnimationParams) -> Self
fn from(c: AnimationParams) -> Self
Converts to this type from the input type.
impl RuntimeComponent for AnimationParams
Auto Trait Implementations§
impl Freeze for AnimationParams
impl RefUnwindSafe for AnimationParams
impl Send for AnimationParams
impl Sync for AnimationParams
impl Unpin for AnimationParams
impl UnsafeUnpin for AnimationParams
impl UnwindSafe for AnimationParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more