veloren_voxygen_anim/biped_large/
mod.rs

1pub mod alpha;
2pub mod beam;
3pub mod beta;
4pub mod blink;
5pub mod charge;
6pub mod chargemelee;
7pub mod combomelee;
8pub mod dash;
9pub mod equip;
10pub mod idle;
11pub mod jump;
12pub mod leapmelee;
13pub mod leapshockwave;
14pub mod rapidmelee;
15pub mod run;
16pub mod selfbuff;
17pub mod shockwave;
18pub mod shoot;
19pub mod spin;
20pub mod spritesummon;
21pub mod stunned;
22pub mod summon;
23pub mod wield;
24
25// Reexports
26pub use self::{
27    alpha::AlphaAnimation, beam::BeamAnimation, beta::BetaAnimation, blink::BlinkAnimation,
28    charge::ChargeAnimation, chargemelee::ChargeMeleeAnimation, combomelee::ComboAnimation,
29    dash::DashAnimation, equip::EquipAnimation, idle::IdleAnimation, jump::JumpAnimation,
30    leapmelee::LeapAnimation, leapshockwave::LeapShockAnimation, rapidmelee::RapidMeleeAnimation,
31    run::RunAnimation, selfbuff::SelfBuffAnimation, shockwave::ShockwaveAnimation,
32    shoot::ShootAnimation, spin::SpinAnimation, spritesummon::SpriteSummonAnimation,
33    stunned::StunnedAnimation, summon::SummonAnimation, wield::WieldAnimation,
34};
35
36use super::{FigureBoneData, Offsets, Skeleton, make_bone, vek::*};
37use common::comp::{self};
38use core::{convert::TryFrom, f32::consts::PI};
39
40pub type Body = comp::biped_large::Body;
41
42skeleton_impls!(struct BipedLargeSkeleton {
43    + head,
44    + jaw,
45    + upper_torso,
46    + lower_torso,
47    + tail,
48    + main,
49    + second,
50    + shoulder_l,
51    + shoulder_r,
52    + hand_l,
53    + hand_r,
54    + leg_l,
55    + leg_r,
56    + foot_l,
57    + foot_r,
58    + hold,
59    torso,
60    control,
61    control_l,
62    control_r,
63    weapon_l,
64    weapon_r,
65    leg_control_l,
66    leg_control_r,
67    arm_control_l,
68    arm_control_r,
69});
70
71impl Skeleton for BipedLargeSkeleton {
72    type Attr = SkeletonAttr;
73    type Body = Body;
74
75    const BONE_COUNT: usize = 16;
76    #[cfg(feature = "use-dyn-lib")]
77    const COMPUTE_FN: &'static [u8] = b"biped_large_compute_mats\0";
78
79    #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_compute_mats")]
80    fn compute_matrices_inner(
81        &self,
82        base_mat: Mat4<f32>,
83        buf: &mut [FigureBoneData; super::MAX_BONE_COUNT],
84        body: Self::Body,
85    ) -> Offsets {
86        let base_mat = base_mat * Mat4::scaling_3d(SkeletonAttr::from(&body).scaler / 8.0);
87
88        let torso_mat = base_mat * Mat4::<f32>::from(self.torso);
89        let upper_torso_mat = torso_mat * Mat4::<f32>::from(self.upper_torso);
90        let control_mat = Mat4::<f32>::from(self.control);
91        let control_l_mat = Mat4::<f32>::from(self.control_l);
92        let control_r_mat = Mat4::<f32>::from(self.control_r);
93        let weapon_l_mat = control_mat * Mat4::<f32>::from(self.weapon_l);
94        let weapon_r_mat = control_mat * Mat4::<f32>::from(self.weapon_r);
95        let lower_torso_mat = upper_torso_mat * Mat4::<f32>::from(self.lower_torso);
96
97        let leg_l = Mat4::<f32>::from(self.leg_l);
98        let leg_r = Mat4::<f32>::from(self.leg_r);
99
100        let leg_control_l = lower_torso_mat * Mat4::<f32>::from(self.leg_control_l);
101        let leg_control_r = lower_torso_mat * Mat4::<f32>::from(self.leg_control_r);
102
103        let arm_control_l = upper_torso_mat * Mat4::<f32>::from(self.arm_control_l);
104        let arm_control_r = upper_torso_mat * Mat4::<f32>::from(self.arm_control_r);
105
106        let head_mat = upper_torso_mat * Mat4::<f32>::from(self.head);
107        let hand_l_mat = Mat4::<f32>::from(self.hand_l);
108
109        let jaw_mat = head_mat * Mat4::<f32>::from(self.jaw);
110
111        *(<&mut [_; Self::BONE_COUNT]>::try_from(&mut buf[0..Self::BONE_COUNT]).unwrap()) = [
112            make_bone(head_mat),
113            make_bone(jaw_mat),
114            make_bone(upper_torso_mat),
115            make_bone(lower_torso_mat),
116            make_bone(lower_torso_mat * Mat4::<f32>::from(self.tail)),
117            make_bone(upper_torso_mat * weapon_l_mat * Mat4::<f32>::from(self.main)),
118            make_bone(upper_torso_mat * weapon_r_mat * Mat4::<f32>::from(self.second)),
119            make_bone(arm_control_l * Mat4::<f32>::from(self.shoulder_l)),
120            make_bone(arm_control_r * Mat4::<f32>::from(self.shoulder_r)),
121            make_bone(
122                arm_control_l * weapon_l_mat * control_l_mat * Mat4::<f32>::from(self.hand_l),
123            ),
124            make_bone(
125                arm_control_r * weapon_r_mat * control_r_mat * Mat4::<f32>::from(self.hand_r),
126            ),
127            make_bone(leg_control_l * leg_l),
128            make_bone(leg_control_r * leg_r),
129            make_bone(leg_control_l * Mat4::<f32>::from(self.foot_l)),
130            make_bone(leg_control_r * Mat4::<f32>::from(self.foot_r)),
131            // FIXME: Should this be control_l_mat?
132            make_bone(upper_torso_mat * control_mat * hand_l_mat * Mat4::<f32>::from(self.hold)),
133        ];
134
135        use comp::biped_large::Species::*;
136        // NOTE: We apply the ori from base_mat externally so we don't need to worry
137        // about it here for now.
138        let (mount_mat, mount_orientation) = match (body.species, body.body_type) {
139            (Dullahan | Occultsaurok | Mightysaurok | Slysaurok | Tidalwarrior, _) => (
140                upper_torso_mat,
141                self.torso.orientation * self.upper_torso.orientation,
142            ),
143            _ => (
144                arm_control_r * Mat4::<f32>::from(self.shoulder_r),
145                self.torso.orientation
146                    * self.upper_torso.orientation
147                    * self.arm_control_r.orientation
148                    * self.shoulder_r.orientation,
149            ),
150        };
151
152        // Offset from the mounted bone's origin.
153        // Note: This could be its own bone if we need to animate it independently.
154        let mount_position = mount_mat.mul_point(mount_point(&body));
155
156        Offsets {
157            viewpoint: Some((jaw_mat * Vec4::new(0.0, 4.0, 0.0, 1.0)).xyz()),
158            mount_bone: Transform {
159                position: mount_position,
160                orientation: mount_orientation,
161                scale: Vec3::one(),
162            },
163            ..Default::default()
164        }
165    }
166}
167
168pub struct SkeletonAttr {
169    head: (f32, f32),
170    jaw: (f32, f32),
171    upper_torso: (f32, f32),
172    lower_torso: (f32, f32),
173    tail: (f32, f32),
174    shoulder: (f32, f32, f32),
175    hand: (f32, f32, f32),
176    leg: (f32, f32, f32),
177    foot: (f32, f32, f32),
178    scaler: f32,
179    tempo: f32,
180    grip: (f32, f32),
181    shl: (f32, f32, f32, f32, f32, f32),
182    shr: (f32, f32, f32, f32, f32, f32),
183    sc: (f32, f32, f32, f32, f32, f32),
184    hhl: (f32, f32, f32, f32, f32, f32),
185    hhr: (f32, f32, f32, f32, f32, f32),
186    hc: (f32, f32, f32, f32, f32, f32),
187    sthl: (f32, f32, f32, f32, f32, f32),
188    sthr: (f32, f32, f32, f32, f32, f32),
189    stc: (f32, f32, f32, f32, f32, f32),
190    bhl: (f32, f32, f32, f32, f32, f32),
191    bhr: (f32, f32, f32, f32, f32, f32),
192    bc: (f32, f32, f32, f32, f32, f32),
193    beast: bool,
194    float: bool,
195    height: f32,
196}
197
198impl<'a> TryFrom<&'a comp::Body> for SkeletonAttr {
199    type Error = ();
200
201    fn try_from(body: &'a comp::Body) -> Result<Self, Self::Error> {
202        match body {
203            comp::Body::BipedLarge(body) => Ok(SkeletonAttr::from(body)),
204            _ => Err(()),
205        }
206    }
207}
208
209impl Default for SkeletonAttr {
210    fn default() -> Self {
211        Self {
212            head: (0.0, 0.0),
213            jaw: (0.0, 0.0),
214            upper_torso: (0.0, 0.0),
215            lower_torso: (0.0, 0.0),
216            tail: (0.0, 0.0),
217            shoulder: (0.0, 0.0, 0.0),
218            hand: (0.0, 0.0, 0.0),
219            leg: (0.0, 0.0, 0.0),
220            foot: (0.0, 0.0, 0.0),
221            scaler: 0.0,
222            tempo: 0.0,
223            grip: (0.0, 0.0),
224            shl: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
225            shr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
226            sc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
227            hhl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
228            hhr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
229            hc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
230            sthl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
231            sthr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
232            stc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
233            bhl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
234            bhr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
235            bc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
236            beast: false,
237            float: false,
238            height: 0.0,
239        }
240    }
241}
242
243impl<'a> From<&'a Body> for SkeletonAttr {
244    fn from(body: &'a Body) -> Self {
245        use comp::biped_large::{BodyType::*, Species::*};
246        Self {
247            head: match (body.species, body.body_type) {
248                (Ogre, Male) => (5.0, 6.0),
249                (Ogre, Female) => (1.0, 7.5),
250                (Cyclops, _) => (9.5, 7.5),
251                (Wendigo, _) => (3.0, 7.5),
252                (Cavetroll, _) => (9.0, 7.0),
253                (Mountaintroll, _) => (13.0, 2.0),
254                (Swamptroll, _) => (11.0, 2.0),
255                (Dullahan, _) => (3.0, 6.0),
256                (Werewolf, _) => (11.5, 1.0),
257                (Occultsaurok, _) => (6.0, 3.5),
258                (Mightysaurok, _) => (6.0, 3.5),
259                (Slysaurok, _) => (6.0, 3.5),
260                (Mindflayer, _) => (5.0, 5.5),
261                (Minotaur, _) => (6.0, 3.0),
262                (Tidalwarrior, _) => (6.5, 5.0),
263                (Yeti, _) => (8.5, 4.0),
264                (Harvester, _) => (6.0, 11.0),
265                (Blueoni, _) => (10.5, -3.0),
266                (Redoni, _) => (10.5, -3.0),
267                (Cultistwarlord, _) => (0.5, 14.5),
268                (Cultistwarlock, _) => (0.5, 11.0),
269                (Huskbrute, _) => (8.5, 4.0),
270                (Tursus, _) => (-4.5, -14.0),
271                (Gigasfrost, _) => (-1.5, 5.0),
272                (AdletElder, _) => (-8.0, 10.0),
273                (SeaBishop, _) => (0.0, 9.5),
274                (HaniwaGeneral, _) => (-1.5, 10.0),
275                (TerracottaBesieger, _) => (-2.5, 16.0),
276                (TerracottaDemolisher, _) => (-2.5, 10.0),
277                (TerracottaPunisher, _) => (-2.5, 10.0),
278                (TerracottaPursuer, _) => (-2.0, 13.5),
279                (Cursekeeper, _) => (2.0, 6.5),
280                (Forgemaster, _) => (5.0, 6.0),
281                (Strigoi, _) => (10.0, 8.0),
282                (Executioner, _) => (0.0, 10.0),
283            },
284            jaw: match (body.species, body.body_type) {
285                (Ogre, _) => (0.0, 0.0),
286                (Cyclops, _) => (-4.5, -6.0),
287                (Wendigo, _) => (0.0, 0.0),
288                (Cavetroll, _) => (0.0, -4.0),
289                (Mountaintroll, _) => (-1.0, -8.0),
290                (Swamptroll, _) => (-4.0, -4.5),
291                (Dullahan, _) => (0.0, 0.0),
292                (Werewolf, _) => (5.0, -4.5),
293                (Occultsaurok, _) => (1.0, -2.5),
294                (Mightysaurok, _) => (1.0, -2.5),
295                (Slysaurok, _) => (1.0, -2.5),
296                (Mindflayer, _) => (0.0, 0.0),
297                (Minotaur, _) => (2.0, -4.0),
298                (Tidalwarrior, _) => (0.0, 0.0),
299                (Yeti, _) => (-5.0, -5.0),
300                (Harvester, _) => (-2.0, -7.0),
301                (Blueoni, _) => (0.0, 3.5),
302                (Redoni, _) => (0.0, 3.5),
303                (Cultistwarlord, _) => (0.0, 3.5),
304                (Cultistwarlock, _) => (0.0, 3.5),
305                (Huskbrute, _) => (-5.0, -5.0),
306                (Tursus, _) => (4.0, 10.5),
307                (Gigasfrost, _) => (-1.0, 5.5),
308                (AdletElder, _) => (10.5, -7.0),
309                (SeaBishop, _) => (5.0, -4.5),
310                (HaniwaGeneral, _) => (10.5, -7.0),
311                (TerracottaBesieger, _) => (10.5, -7.0),
312                (TerracottaDemolisher, _) => (10.5, -7.0),
313                (TerracottaPunisher, _) => (10.5, -7.0),
314                (TerracottaPursuer, _) => (10.5, -7.0),
315                (Cursekeeper, _) => (10.5, -7.0),
316                (Forgemaster, _) => (-1.0, 5.5),
317                (Strigoi, _) => (-2.0, -4.0),
318                (Executioner, _) => (-2.0, -4.0),
319            },
320            upper_torso: match (body.species, body.body_type) {
321                (Ogre, Male) => (0.0, 27.5),
322                (Ogre, Female) => (0.0, 28.0),
323                (Cyclops, _) => (-2.0, 31.0),
324                (Wendigo, _) => (-1.0, 29.0),
325                (Cavetroll, _) => (-1.0, 26.5),
326                (Mountaintroll, _) => (-1.0, 30.5),
327                (Swamptroll, _) => (-1.0, 28.5),
328                (Dullahan, _) => (0.0, 29.0),
329                (Werewolf, _) => (3.0, 26.0),
330                (Occultsaurok, _) => (3.0, 24.0),
331                (Mightysaurok, _) => (3.0, 24.0),
332                (Slysaurok, _) => (3.0, 24.0),
333                (Mindflayer, _) => (0.0, 30.5),
334                (Minotaur, _) => (-1.0, 31.5),
335                (Tidalwarrior, _) => (-1.0, 25.0),
336                (Yeti, _) => (-1.0, 23.5),
337                (Harvester, _) => (-1.0, 18.0),
338                (Blueoni, _) => (-1.0, 26.5),
339                (Redoni, _) => (-1.0, 26.5),
340                (Cultistwarlord, _) => (-1.0, 18.5),
341                (Cultistwarlock, _) => (-1.0, 17.5),
342                (Huskbrute, _) => (-1.0, 23.5),
343                (Tursus, _) => (3.0, 26.0),
344                (Gigasfrost, _) => (-1.0, 30.0),
345                (AdletElder, _) => (3.0, 19.0),
346                (SeaBishop, _) => (0.0, 15.0),
347                (HaniwaGeneral, _) => (3.0, 16.0),
348                (TerracottaBesieger, _) => (3.0, 21.5),
349                (TerracottaDemolisher, _) => (3.0, 16.5),
350                (TerracottaPunisher, _) => (3.0, 15.5),
351                (TerracottaPursuer, _) => (3.0, 15.5),
352                (Cursekeeper, _) => (-4.0, 20.0),
353                (Forgemaster, _) => (-1.0, 32.0),
354                (Strigoi, _) => (-4.0, 27.5),
355                (Executioner, _) => (0.0, 24.0),
356            },
357            lower_torso: match (body.species, body.body_type) {
358                (Ogre, Male) => (1.0, -7.0),
359                (Ogre, Female) => (0.0, -6.0),
360                (Cyclops, _) => (1.0, -8.5),
361                (Wendigo, _) => (-1.5, -6.0),
362                (Cavetroll, _) => (1.0, -9.5),
363                (Mountaintroll, _) => (1.0, -13.5),
364                (Swamptroll, _) => (1.5, -11.5),
365                (Dullahan, _) => (0.0, -6.5),
366                (Werewolf, _) => (1.0, -10.0),
367                (Occultsaurok, _) => (0.0, -5.0),
368                (Mightysaurok, _) => (0.0, -5.0),
369                (Slysaurok, _) => (0.0, -6.0),
370                (Mindflayer, _) => (3.5, -10.0),
371                (Minotaur, _) => (1.5, -8.5),
372                (Tidalwarrior, _) => (0.0, -9.5),
373                (Yeti, _) => (0.0, -6.5),
374                (Harvester, _) => (-1.0, -4.5),
375                (Blueoni, _) => (0.0, -8.5),
376                (Redoni, _) => (0.0, -8.5),
377                (Cultistwarlord, _) => (0.0, -1.5),
378                (Cultistwarlock, _) => (1.0, -2.5),
379                (Huskbrute, _) => (-0.5, -7.0),
380                (Tursus, _) => (-5.0, -9.0),
381                (Gigasfrost, _) => (0.0, -5.5),
382                (AdletElder, _) => (0.0, -4.0),
383                (SeaBishop, _) => (0.0, -1.0),
384                (HaniwaGeneral, _) => (-1.0, -3.5),
385                (TerracottaBesieger, _) => (-1.0, -4.5),
386                (TerracottaDemolisher, _) => (-2.0, -3.5),
387                (TerracottaPunisher, _) => (-1.5, -2.5),
388                (TerracottaPursuer, _) => (-1.5, -2.5),
389                (Cursekeeper, _) => (-1.5, -4.5),
390                (Forgemaster, _) => (0.0, -5.5),
391                (Strigoi, _) => (3.0, -9.0),
392                (Executioner, _) => (-3.0, -5.0),
393            },
394            tail: match (body.species, body.body_type) {
395                (Werewolf, _) => (-5.5, -2.0),
396                (Occultsaurok, _) => (-4.5, -6.0),
397                (Mightysaurok, _) => (-4.5, -6.0),
398                (Slysaurok, _) => (-4.5, -6.0),
399                (Minotaur, _) => (-3.0, -6.0),
400                (AdletElder, _) => (-4.5, -6.0),
401                (Strigoi, _) => (-4.5, -8.0),
402                _ => (0.0, 0.0),
403            },
404            shoulder: match (body.species, body.body_type) {
405                (Ogre, Male) => (12.0, 0.5, 3.0),
406                (Ogre, Female) => (8.0, 0.5, 2.0),
407                (Cyclops, _) => (15.0, 3.5, 1.5),
408                (Wendigo, _) => (9.0, 0.5, 2.5),
409                (Cavetroll, _) => (13.0, 0.0, 0.5),
410                (Mountaintroll, _) => (14.0, -0.5, -2.0),
411                (Swamptroll, _) => (14.0, 0.0, 0.0),
412                (Dullahan, _) => (14.0, 0.5, 3.5),
413                (Werewolf, _) => (9.0, 4.0, -3.0),
414                (Occultsaurok, _) => (7.5, 1.0, 1.5),
415                (Mightysaurok, _) => (7.5, 1.0, 1.5),
416                (Slysaurok, _) => (7.5, 1.0, 1.5),
417                (Mindflayer, _) => (8.0, 0.5, -1.0),
418                (Minotaur, _) => (10.0, 1.0, -1.0),
419                (Tidalwarrior, _) => (14.0, -0.5, 2.0),
420                (Yeti, _) => (10.5, 1.0, -2.5),
421                (Harvester, _) => (8.0, 1.0, -1.5),
422                (Blueoni, _) => (11.0, 2.0, -5.5),
423                (Redoni, _) => (11.0, 2.0, -5.5),
424                (Cultistwarlord, _) => (11.5, -1.0, 4.5),
425                (Cultistwarlock, _) => (8.0, 0.0, 3.5),
426                (Huskbrute, _) => (10.5, 0.0, -1.5),
427                (Tursus, _) => (12.5, -2.5, -2.0),
428                (Gigasfrost, _) => (10.5, 0.5, 0.0),
429                (AdletElder, _) => (8.5, 1.0, 2.5),
430                (SeaBishop, _) => (7.0, 0.0, 1.0),
431                (HaniwaGeneral, _) => (9.0, -1.0, 4.5),
432                (TerracottaBesieger, _) => (13.0, -1.0, 2.0),
433                (TerracottaDemolisher, _) => (9.0, -1.0, 3.0),
434                (TerracottaPunisher, _) => (9.0, -1.0, 4.0),
435                (TerracottaPursuer, _) => (9.0, -1.0, 4.0),
436                (Cursekeeper, _) => (9.5, -0.5, 2.5),
437                (Forgemaster, _) => (20.0, 4.0, 13.0),
438                (Strigoi, _) => (13.5, 2.0, 0.5),
439                (Executioner, _) => (8.5, 0.0, 4.0),
440            },
441            hand: match (body.species, body.body_type) {
442                (Ogre, Male) => (14.5, 0.0, -4.0),
443                (Ogre, Female) => (9.0, 0.5, -4.5),
444                (Cyclops, _) => (14.0, 2.0, -5.5),
445                (Wendigo, _) => (12.0, 0.0, -3.5),
446                (Cavetroll, _) => (13.5, 1.0, -6.0),
447                (Mountaintroll, _) => (13.5, 0.0, -10.0),
448                (Swamptroll, _) => (17.0, 1.0, -8.0),
449                (Dullahan, _) => (14.5, 0.0, -2.5),
450                (Werewolf, _) => (10.0, 2.5, -11.0),
451                (Occultsaurok, _) => (8.0, 1.5, -5.5),
452                (Mightysaurok, _) => (8.0, 1.5, -5.5),
453                (Slysaurok, _) => (8.0, 1.5, -5.5),
454                (Mindflayer, _) => (9.0, 0.5, -4.5),
455                (Minotaur, _) => (12.5, 0.5, -7.0),
456                (Tidalwarrior, _) => (15.5, -0.5, -3.0),
457                (Yeti, _) => (12.0, 1.5, -6.0),
458                (Harvester, _) => (11.5, 1.5, -5.5),
459                (Blueoni, _) => (13.5, 0.5, -8.0),
460                (Redoni, _) => (13.5, 0.5, -8.0),
461                (Cultistwarlord, _) => (11.5, -1.0, -1.0),
462                (Cultistwarlock, _) => (9.5, -1.0, 1.0),
463                (Huskbrute, _) => (13.0, 0.5, -4.0),
464                (Tursus, _) => (15.5, 0.0, -7.0),
465                (Gigasfrost, _) => (17.0, 0.5, -6.0),
466                (AdletElder, _) => (8.0, 1.5, -2.5),
467                (SeaBishop, _) => (10.0, 0.0, -3.0),
468                (HaniwaGeneral, _) => (10.0, -1.0, -3.0),
469                (TerracottaBesieger, _) => (13.5, -1.0, -3.5),
470                (TerracottaDemolisher, _) => (10.0, -1.0, -1.5),
471                (TerracottaPunisher, _) => (10.0, -1.0, -1.5),
472                (TerracottaPursuer, _) => (10.0, -1.0, -1.5),
473                (Cursekeeper, _) => (11.0, -1.0, -4.0),
474                (Forgemaster, _) => (19.0, 4.0, -1.0),
475                (Strigoi, _) => (17.0, 2.5, -5.5),
476                (Executioner, _) => (9.0, 0.5, -1.5),
477            },
478            leg: match (body.species, body.body_type) {
479                (Ogre, Male) => (0.0, 0.0, -4.0),
480                (Ogre, Female) => (0.0, 0.0, -2.0),
481                (Cyclops, _) => (4.5, 1.0, -8.5),
482                (Wendigo, _) => (2.0, 2.0, -2.5),
483                (Cavetroll, _) => (4.5, -1.0, -7.5),
484                (Mountaintroll, _) => (3.5, 0.0, -7.5),
485                (Swamptroll, _) => (4.5, -0.5, -7.5),
486                (Dullahan, _) => (0.0, 0.0, -5.0),
487                (Werewolf, _) => (4.5, 1.0, -5.0),
488                (Occultsaurok, _) => (3.0, 0.5, -4.0),
489                (Mightysaurok, _) => (3.0, 0.5, -4.0),
490                (Slysaurok, _) => (3.0, 0.5, -4.0),
491                (Mindflayer, _) => (6.0, -2.0, 6.5),
492                (Minotaur, _) => (5.0, 0.0, -10.0),
493                (Tidalwarrior, _) => (2.5, 0.0, -5.5),
494                (Yeti, _) => (4.0, 0.0, -5.5),
495                (Harvester, _) => (3.5, 1.0, -4.0),
496                (Blueoni, _) => (4.5, 2.0, -5.5),
497                (Redoni, _) => (4.5, 2.0, -5.5),
498                (Cultistwarlord, _) => (3.5, -1.0, -8.5),
499                (Cultistwarlock, _) => (3.5, -1.0, -8.5),
500                (Huskbrute, _) => (4.0, 0.0, -7.5),
501                (Tursus, _) => (4.5, 1.0, -9.0),
502                (Gigasfrost, _) => (6.0, 0.0, -10.0),
503                (AdletElder, _) => (3.0, -1.5, -4.0),
504                (SeaBishop, _) => (3.0, 1.0, -14.0),
505                (HaniwaGeneral, _) => (3.0, 0.0, -5.0),
506                (TerracottaBesieger, _) => (5.0, 0.5, -6.0),
507                (TerracottaDemolisher, _) => (3.5, 1.5, -5.0),
508                (TerracottaPunisher, _) => (3.5, 1.0, -5.0),
509                (TerracottaPursuer, _) => (3.5, 1.0, -5.0),
510                (Cursekeeper, _) => (5.0, 0.5, -6.0),
511                (Forgemaster, _) => (9.0, 0.0, -10.0),
512                (Strigoi, _) => (5.0, 1.0, -6.0),
513                (Executioner, _) => (3.0, 1.0, -7.0),
514            },
515            foot: match (body.species, body.body_type) {
516                (Ogre, Male) => (4.0, 1.0, -12.0),
517                (Ogre, Female) => (4.0, 0.5, -13.5),
518                (Cyclops, _) => (6.0, 3.5, -15.5),
519                (Wendigo, _) => (5.0, 2.5, -17.0),
520                (Cavetroll, _) => (5.5, 0.0, -14.0),
521                (Mountaintroll, _) => (4.5, 1.0, -14.0),
522                (Swamptroll, _) => (5.5, 0.0, -14.0),
523                (Dullahan, _) => (4.0, 2.5, -14.0),
524                (Werewolf, _) => (5.5, 3.0, -6.5),
525                (Occultsaurok, _) => (3.5, 3.5, -10.0),
526                (Mightysaurok, _) => (3.5, 3.5, -10.0),
527                (Slysaurok, _) => (3.5, 3.5, -10.0),
528                (Mindflayer, _) => (4.5, 1.5, -16.0),
529                (Minotaur, _) => (6.0, 4.5, -17.5),
530                (Tidalwarrior, _) => (3.5, 0.5, -10.5),
531                (Yeti, _) => (4.5, 0.5, -12.5),
532                (Harvester, _) => (4.5, 0.5, -9.5),
533                (Blueoni, _) => (5.0, 5.0, -12.5),
534                (Redoni, _) => (5.0, 5.0, -12.5),
535                (Cultistwarlord, _) => (3.5, 0.0, -12.5),
536                (Cultistwarlock, _) => (3.5, 0.0, -10.5),
537                (Huskbrute, _) => (4.5, 0.5, -12.5),
538                (Tursus, _) => (5.5, 3.0, -14.5),
539                (Gigasfrost, _) => (6.5, 2.0, -19.5),
540                (AdletElder, _) => (4.0, 3.5, -10.0),
541                (SeaBishop, _) => (5.5, 3.0, -6.5),
542                (HaniwaGeneral, _) => (3.0, 1.0, -10.0),
543                (TerracottaBesieger, _) => (5.5, 2.5, -13.0),
544                (TerracottaDemolisher, _) => (3.5, 3.0, -10.5),
545                (TerracottaPunisher, _) => (3.5, 2.0, -10.5),
546                (TerracottaPursuer, _) => (3.5, 2.5, -10.5),
547                (Cursekeeper, _) => (5.5, 2.5, -13.0),
548                (Forgemaster, _) => (8.5, 2.0, -19.5),
549                (Strigoi, _) => (6.0, 2.5, -14.0),
550                (Executioner, _) => (3.0, 7.5, -13.0),
551            },
552            scaler: match (body.species, body.body_type) {
553                (Ogre, Male) => 1.12,
554                (Ogre, Female) => 1.12,
555                (Cyclops, _) => 1.6,
556                (Wendigo, _) => 1.1,
557                (Cavetroll, _) => 1.1,
558                (Mountaintroll, _) => 1.1,
559                (Swamptroll, _) => 1.1,
560                (Dullahan, _) => 1.12,
561                (Werewolf, _) => 1.0,
562                (Occultsaurok, _) => 1.0,
563                (Mightysaurok, _) => 1.0,
564                (Slysaurok, _) => 1.0,
565                (Mindflayer, _) => 1.6,
566                (Minotaur, _) => 1.7,
567                (Tidalwarrior, _) => 1.7,
568                (Yeti, _) => 1.2,
569                (Harvester, _) => 1.2,
570                (Blueoni, _) => 1.2,
571                (Redoni, _) => 1.2,
572                (Cultistwarlord, _) => 1.0,
573                (Cultistwarlock, _) => 1.0,
574                (Huskbrute, _) => 1.2,
575                (Tursus, _) => 1.0,
576                (Gigasfrost, _) => 1.7,
577                (AdletElder, _) => 1.0,
578                (SeaBishop, _) => 1.0,
579                (HaniwaGeneral, _) => 1.0,
580                (TerracottaBesieger, _) => 1.0,
581                (TerracottaDemolisher, _) => 1.0,
582                (TerracottaPunisher, _) => 1.0,
583                (TerracottaPursuer, _) => 1.0,
584                (Cursekeeper, _) => 1.0,
585                (Forgemaster, _) => 1.0,
586                (Strigoi, _) => 1.0,
587                (Executioner, _) => 1.0,
588            },
589            tempo: match (body.species, body.body_type) {
590                (Ogre, Male) => 0.9,
591                (Ogre, Female) => 0.9,
592                (Cyclops, _) => 0.8,
593                (Cavetroll, _) => 0.9,
594                (Mountaintroll, _) => 0.9,
595                (Swamptroll, _) => 0.9,
596                (Dullahan, _) => 0.8,
597                (Minotaur, _) => 0.8,
598                (TerracottaBesieger, _) => 0.7,
599                (TerracottaDemolisher, _) => 0.8,
600                (TerracottaPunisher, _) => 0.8,
601                (TerracottaPursuer, _) => 0.7,
602                (Cursekeeper, _) => 0.8,
603                _ => 1.0,
604            },
605            grip: match (body.species, body.body_type) {
606                (Ogre, Male) => (13.0, 0.0),
607                (Ogre, Female) => (8.0, 0.0),
608                (Cyclops, _) => (12.0, 0.0),
609                (Wendigo, _) => (15.0, 0.0),
610                (Cavetroll, _) => (13.0, 1.5),
611                (Mountaintroll, _) => (13.0, 1.5),
612                (Swamptroll, _) => (15.0, 0.5),
613                (Dullahan, _) => (15.0, 0.0),
614                (Werewolf, _) => (13.0, 0.0),
615                (Occultsaurok, _) => (10.0, 0.0),
616                (Mightysaurok, _) => (10.0, 0.0),
617                (Slysaurok, _) => (10.0, 0.0),
618                (Mindflayer, _) => (12.0, 2.5),
619                (Minotaur, _) => (14.0, 0.0),
620                (Tidalwarrior, _) => (14.0, 0.0),
621                (Yeti, _) => (12.5, 0.0),
622                (Harvester, _) => (7.5, 0.0),
623                (Blueoni, _) => (12.5, 0.0),
624                (Redoni, _) => (12.5, 0.0),
625                (Cultistwarlord, _) => (8.0, 0.0),
626                (Cultistwarlock, _) => (8.0, 0.0),
627                (Huskbrute, _) => (12.5, 0.0),
628                (Tursus, _) => (13.0, 0.0),
629                (Gigasfrost, _) => (16.0, 0.0),
630                (AdletElder, _) => (10.0, 0.0),
631                (SeaBishop, _) => (6.0, 0.0),
632                (HaniwaGeneral, _) => (10.0, 0.0),
633                (TerracottaBesieger, _) => (5.0, 0.0),
634                (TerracottaDemolisher, _) => (6.0, 0.0),
635                (TerracottaPunisher, _) => (6.0, 0.0),
636                (TerracottaPursuer, _) => (6.0, 0.0),
637                (Cursekeeper, _) => (14.0, 0.0),
638                (Forgemaster, _) => (16.0, 0.0),
639                (Strigoi, _) => (12.5, 0.0),
640                (Executioner, _) => (8.0, 0.0),
641            },
642            shl: match (body.species, body.body_type) {
643                (Dullahan, _) => (-4.75, -11.0, 8.5, 1.47, -0.2, 0.0),
644                (Mightysaurok, _) => (-1.75, -9.0, 3.5, 1.47, -0.2, 0.0),
645                _ => (-4.75, -1.0, 2.5, 1.47, -0.2, 0.0),
646            },
647            shr: match (body.species, body.body_type) {
648                (Dullahan, _) => (5.75, -11.5, 4.5, 1.47, 0.3, 0.0),
649                (Mightysaurok, _) => (2.75, -9.5, -0.5, 1.47, 0.3, 0.0),
650                _ => (3.75, -1.5, -0.5, 1.47, 0.3, 0.0),
651            },
652            sc: match (body.species, body.body_type) {
653                (Dullahan, _) => (-7.0, 17.0, -16.0, -0.1, 0.0, 0.0),
654                (Mightysaurok, _) => (-7.0, 15.0, -11.0, -0.1, 0.0, 0.0),
655                _ => (-7.0, 7.0, -10.0, -0.1, 0.0, 0.0),
656            },
657            hhl: match (body.species, body.body_type) {
658                (Ogre, Male) => (-9.0, -10.0, 23.0, PI / 2.0, -0.57, 0.0),
659                _ => (-6.0, -10.0, 17.0, PI / 2.0, -0.57, 0.0),
660            },
661            hhr: match (body.species, body.body_type) {
662                (Ogre, Male) => (-5.0, -13.0, 0.0, PI / 2.0, -0.57, 0.0),
663                _ => (-6.0, -10.0, 0.0, PI / 2.0, -0.57, 0.0),
664            },
665            hc: match (body.species, body.body_type) {
666                (Ogre, Male) => (11.5, 9.0, -13.0, -0.57, -PI / 2.0, 1.0),
667                _ => (8.5, 6.0, -12.0, -0.57, -PI / 2.0, 1.0),
668            },
669            sthl: match (body.species, body.body_type) {
670                (Ogre, Female) => (-1.0, -5.0, 12.0, 1.27, 0.0, 0.0),
671                (Occultsaurok, _) => (-1.0, -7.0, 12.0, 1.27, 0.0, 0.0),
672                (Mindflayer, _) => (1.0, -10.5, 7.0, 1.27, 0.0, 0.0),
673                _ => (11.0, 5.0, -4.0, 1.27, 0.0, 0.0),
674            },
675            sthr: match (body.species, body.body_type) {
676                (Ogre, Female) => (5.0, -3.5, 18.0, PI / 2.0, 0.8, 0.0),
677                (Occultsaurok, _) => (7.0, -3.5, 18.0, PI / 2.0, 0.8, 0.0),
678                (Mindflayer, _) => (7.0, -9.0, 13.0, PI / 2.0, 0.8, 0.0),
679                _ => (17.0, 7.5, 2.0, PI / 2.0, 0.8, 0.0),
680            },
681            stc: match (body.species, body.body_type) {
682                (Ogre, Female) => (-10.0, 7.0, -23.0, -0.3, 0.15, 0.0),
683                (Occultsaurok, _) => (-10.0, 7.0, -22.0, -0.3, 0.15, 0.0),
684                (Mindflayer, _) => (-10.0, 12.5, -22.0, -0.3, 0.15, 0.0),
685                _ => (-18.0, 1.0, -2.0, -0.3, 0.15, 0.0),
686            },
687            bhl: match (body.species, body.body_type) {
688                (Slysaurok, _) => (-1.0, -12.0, 1.0, PI / 2.0, 0.0, 0.0),
689                _ => (3.0, 2.5, 0.0, 1.2, -0.6, -0.3),
690            },
691            bhr: match (body.species, body.body_type) {
692                (Slysaurok, _) => (0.0, -6.0, -2.0, PI / 2.0, 0.0, 0.0),
693                _ => (5.9, 5.5, -5.0, 1.2, -0.6, -0.3),
694            },
695            bc: match (body.species, body.body_type) {
696                (Slysaurok, _) => (1.0, 13.0, -8.0, 0.0, 1.2, -0.6),
697                _ => (-7.0, 3.0, -8.0, 0.0, 0.0, 0.0),
698            },
699            beast: matches!((body.species, body.body_type), (Werewolf, _)),
700            float: matches!(
701                (body.species, body.body_type),
702                (Mindflayer, _) | (Cursekeeper, _)
703            ),
704            height: comp::Body::BipedLarge(*body).dimensions().z,
705        }
706    }
707}
708
709fn mount_point(body: &Body) -> Vec3<f32> {
710    use comp::biped_large::{BodyType::*, Species::*};
711    match (body.species, body.body_type) {
712        (Ogre, Female) => (0.5, 0.0, 0.5),
713        (Ogre, Male) => (-1.0, -3.0, 2.5),
714        (Cyclops, _) => (0.0, 3.0, 1.0),
715        (Wendigo, _) => (0.0, -1.5, 0.5),
716        (Cavetroll, _) => (0.0, 1.0, 4.0),
717        (Mountaintroll, _) => (0.0, 3.5, 2.5),
718        (Swamptroll, _) => (0.0, 0.0, 3.5),
719        (Dullahan, _) => (0.0, -3.0, 4.0),
720        (Werewolf, _) => (-0.5, 0.0, 0.0),
721        (Occultsaurok, _) => (0.0, -1.0, 5.0),
722        (Mightysaurok, _) => (0.0, -1.0, 4.0),
723        (Slysaurok, _) => (0.0, -1.0, 4.0),
724        (Mindflayer, _) => (1.0, 1.5, 1.0),
725        (Minotaur, _) => (0.0, 1.0, 1.5),
726        (Tidalwarrior, _) => (0.0, -2.0, 10.5),
727        (Yeti, _) => (0.0, 2.0, 4.5),
728        (Harvester, _) => (0.5, 2.0, 2.0),
729        (Blueoni, _) => (0.5, 1.0, 4.0),
730        (Redoni, _) => (0.5, 1.0, 4.0),
731        (Cultistwarlord, _) => (-2.5, 3.0, 0.0),
732        (Cultistwarlock, _) => (0.0, 2.0, 2.0),
733        (Huskbrute, _) => (0.0, 1.0, 4.0),
734        (Tursus, _) => (0.0, 2.0, 4.0),
735        (Gigasfrost, _) => (1.0, 2.0, 4.5),
736        (AdletElder, _) => (1.0, 0.0, -1.0),
737        (SeaBishop, _) => (0.0, 0.0, 1.0),
738        (HaniwaGeneral, _) => (0.0, 0.0, 0.0),
739        (TerracottaBesieger, _) => (-1.5, -4.5, 4.0),
740        (TerracottaDemolisher, _) => (-0.5, -3.5, -1.0),
741        (TerracottaPunisher, _) => (-0.5, -3.5, -1.0),
742        (TerracottaPursuer, _) => (-0.5, -3.5, -1.0),
743        (Cursekeeper, _) => (0.5, 0.0, -1.0),
744        (Forgemaster, _) => (1.0, 2.0, 5.0),
745        (Strigoi, _) => (0.0, 0.0, 2.0),
746        (Executioner, _) => (0.0, 0.0, 0.0),
747    }
748    .into()
749}
750
751pub fn init_biped_large_alpha(
752    next: &mut BipedLargeSkeleton,
753    s_a: &SkeletonAttr,
754    speed: f32,
755    acc_vel: f32,
756    move1: f32,
757) -> f32 {
758    let lab: f32 = 0.65 * s_a.tempo;
759    let speednorm = (speed / 12.0).powf(0.4);
760    let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
761    let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
762    let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
763        * ((acc_vel * lab + PI * 1.4).sin());
764
765    let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
766        * ((acc_vel * lab + PI * 0.4).sin());
767    next.second.position = Vec3::new(0.0, 0.0, 0.0);
768    next.second.orientation = Quaternion::rotation_x(0.0);
769    next.shoulder_l.position = Vec3::new(
770        -s_a.shoulder.0,
771        s_a.shoulder.1,
772        s_a.shoulder.2 - foothorir * 1.0,
773    );
774    next.shoulder_l.orientation =
775        Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
776
777    next.shoulder_r.position = Vec3::new(
778        s_a.shoulder.0,
779        s_a.shoulder.1,
780        s_a.shoulder.2 - foothoril * 1.0,
781    );
782    next.shoulder_r.orientation =
783        Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
784
785    next.main.position = Vec3::new(0.0, 0.0, 0.0);
786    next.main.orientation = Quaternion::rotation_x(0.0);
787
788    next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
789    next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
790
791    next.hand_l.orientation = Quaternion::rotation_x(0.0);
792    next.hand_r.orientation = Quaternion::rotation_x(0.0);
793
794    foothorir
795}
796
797pub fn init_biped_large_beta(
798    next: &mut BipedLargeSkeleton,
799    s_a: &SkeletonAttr,
800    speed: f32,
801    acc_vel: f32,
802    move1: f32,
803) {
804    let lab: f32 = 0.65 * s_a.tempo;
805    let speednorm = (speed / 12.0).powf(0.4);
806    let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
807    let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
808    let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
809        * ((acc_vel * lab + PI * 1.4).sin());
810
811    let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
812        * ((acc_vel * lab + PI * 0.4).sin());
813
814    next.shoulder_l.position = Vec3::new(
815        -s_a.shoulder.0,
816        s_a.shoulder.1,
817        s_a.shoulder.2 - foothorir * 1.0,
818    );
819    next.shoulder_l.orientation =
820        Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
821
822    next.shoulder_r.position = Vec3::new(
823        s_a.shoulder.0,
824        s_a.shoulder.1,
825        s_a.shoulder.2 - foothoril * 1.0,
826    );
827    next.shoulder_r.orientation =
828        Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
829    next.torso.orientation = Quaternion::rotation_z(0.0);
830
831    next.main.position = Vec3::new(0.0, 0.0, 0.0);
832    next.main.orientation = Quaternion::rotation_x(0.0);
833
834    next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
835    next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
836
837    next.hand_l.orientation = Quaternion::rotation_x(0.0);
838    next.hand_r.orientation = Quaternion::rotation_x(0.0);
839}
840
841pub fn biped_large_alpha_hammer(
842    next: &mut BipedLargeSkeleton,
843    s_a: &SkeletonAttr,
844    move1: f32,
845    move2: f32,
846) {
847    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
848    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
849
850    next.control.position = Vec3::new(
851        4.0 + move1 * -12.0 + move2 * 20.0,
852        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
853        (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
854    );
855    next.head.orientation =
856        Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
857    next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
858    next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
859
860    next.control_l.orientation =
861        Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
862    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
863        * Quaternion::rotation_y(0.0)
864        * Quaternion::rotation_z(0.0);
865
866    next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
867        * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
868        * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
869}
870
871pub fn biped_large_beta_hammer(
872    next: &mut BipedLargeSkeleton,
873    s_a: &SkeletonAttr,
874    move1: f32,
875    move2: f32,
876) {
877    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
878    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
879
880    next.control.position = Vec3::new(
881        4.0 + move1 * -12.0 + move2 * 20.0,
882        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
883        (-s_a.grip.0 / 0.8) + move1 * 6.0 + move2 * 8.0,
884    );
885    next.head.orientation =
886        Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
887    next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -1.5);
888    next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 1.5);
889
890    next.control_l.orientation =
891        Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
892    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
893        * Quaternion::rotation_y(0.0)
894        * Quaternion::rotation_z(0.0);
895
896    next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -1.5 + move2 * -0.3)
897        * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
898        * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
899}
900
901pub fn biped_large_alpha_sword(
902    next: &mut BipedLargeSkeleton,
903    s_a: &SkeletonAttr,
904    move1: f32,
905    move2: f32,
906) {
907    next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
908    next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
909    next.head.orientation =
910        Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
911    next.control.position = Vec3::new(
912        -3.0 + move1 * -4.0 + move2 * 5.0,
913        5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
914        -4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
915    );
916    next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.5 + move2 * -0.7);
917    next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.7);
918    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
919        * Quaternion::rotation_y(-0.2);
920    next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
921        * Quaternion::rotation_y(0.2)
922        * Quaternion::rotation_z(0.0);
923
924    next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -2.0)
925        * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
926}
927
928pub fn biped_large_beta_sword(
929    next: &mut BipedLargeSkeleton,
930    s_a: &SkeletonAttr,
931    move1base: f32,
932    move1: f32,
933    move2: f32,
934) {
935    next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
936    next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
937    next.head.orientation =
938        Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
939    next.control.position = Vec3::new(
940        -3.0 + move1 * -4.0 + move2 * 5.0,
941        5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
942        -4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
943    );
944    next.upper_torso.orientation = Quaternion::rotation_z(move1base * 0.5 + move2 * -0.7);
945    next.lower_torso.orientation = Quaternion::rotation_z(move1base * -0.5 + move2 * 0.7);
946    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
947        * Quaternion::rotation_y(-0.2);
948    next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
949        * Quaternion::rotation_y(0.2)
950        * Quaternion::rotation_z(0.0);
951
952    next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5)
953        * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
954}
955
956pub fn biped_large_alpha_axe(
957    next: &mut BipedLargeSkeleton,
958    s_a: &SkeletonAttr,
959    move1: f32,
960    move2: f32,
961) {
962    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
963    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
964
965    next.control.position = Vec3::new(
966        4.0 + move1 * -12.0 + move2 * 28.0,
967        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
968        (-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * 8.0,
969    );
970    next.head.orientation =
971        Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
972    next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
973    next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
974
975    next.control_l.orientation =
976        Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
977    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
978        * Quaternion::rotation_y(0.0)
979        * Quaternion::rotation_z(0.0);
980
981    next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
982        * Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5)
983        * Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
984}
985
986pub fn biped_large_beta_axe(
987    next: &mut BipedLargeSkeleton,
988    s_a: &SkeletonAttr,
989    move1: f32,
990    move2: f32,
991) {
992    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
993    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
994
995    next.control.position = Vec3::new(
996        4.0 + move1 * -18.0 + move2 * 20.0,
997        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 12.0,
998        (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 4.0,
999    );
1000    next.head.orientation =
1001        Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.9 + move2 * 0.6);
1002    next.upper_torso.orientation = Quaternion::rotation_z(move1 * 1.2 + move2 * -1.0);
1003    next.lower_torso.orientation = Quaternion::rotation_z(move1 * -1.2 + move2 * 1.0);
1004
1005    next.control_l.orientation =
1006        Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
1007    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
1008        * Quaternion::rotation_y(0.0)
1009        * Quaternion::rotation_z(0.0);
1010
1011    next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * 0.0 + move2 * -0.8)
1012        * Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9)
1013        * Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5);
1014}