veloren_voxygen_anim/item_drop/
idle.rs

1use super::{
2    super::{Animation, vek::*},
3    ItemDropSkeleton, SkeletonAttr,
4};
5
6pub struct IdleAnimation;
7
8impl Animation for IdleAnimation {
9    type Dependency<'a> = f32;
10    type Skeleton = ItemDropSkeleton;
11
12    #[cfg(feature = "use-dyn-lib")]
13    const UPDATE_FN: &'static [u8] = b"item_drop_idle\0";
14
15    #[cfg_attr(feature = "be-dyn-lib", export_name = "item_drop_idle")]
16    fn update_skeleton_inner(
17        skeleton: &Self::Skeleton,
18        _: Self::Dependency<'_>,
19        _anim_time: f32,
20        _rate: &mut f32,
21        s_a: &SkeletonAttr,
22    ) -> Self::Skeleton {
23        let mut next = (*skeleton).clone();
24
25        next.bone0.position = Vec3::new(s_a.bone0.0, s_a.bone0.1, s_a.bone0.2);
26
27        next
28    }
29}