Struct ambient_api_core::animation::AnimationPlayerRef
source · pub struct AnimationPlayerRef(pub EntityId);
Expand description
This plays animations, and can handle blending and masking of animations together to create complex effects. A single animation player can be attached to multiple entities in the scene.
This is just a reference to an entity which lives in the ecs. You need to call despawn
to
remove it.
Tuple Fields§
§0: EntityId
Implementations§
source§impl AnimationPlayerRef
impl AnimationPlayerRef
sourcepub fn new(root: impl AsRef<AnimationNodeRef>) -> Self
pub fn new(root: impl AsRef<AnimationNodeRef>) -> Self
Create a new animation player, with root
as the currently playing node
sourcepub fn play(
&self,
node: impl AsRef<AnimationNodeRef>
) -> Option<AnimationNodeRef>
pub fn play( &self, node: impl AsRef<AnimationNodeRef> ) -> Option<AnimationNodeRef>
Replaces the current root node of the animation player with a new node
Trait Implementations§
source§impl Clone for AnimationPlayerRef
impl Clone for AnimationPlayerRef
source§fn clone(&self) -> AnimationPlayerRef
fn clone(&self) -> AnimationPlayerRef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnimationPlayerRef
impl Debug for AnimationPlayerRef
impl Copy for AnimationPlayerRef
Auto Trait Implementations§
impl RefUnwindSafe for AnimationPlayerRef
impl Send for AnimationPlayerRef
impl Sync for AnimationPlayerRef
impl Unpin for AnimationPlayerRef
impl UnwindSafe for AnimationPlayerRef
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