merging to branch

Former-commit-id: 991d4f298866f4b222090f9b62a3ba5adce38f0a
This commit is contained in:
jshipsey 2019-05-22 22:43:49 -04:00
commit a0c713ff23
6 changed files with 21 additions and 18 deletions

View File

@ -86,7 +86,7 @@ impl<'a> System<'a> for Sys {
if control.move_dir.magnitude() > 0.01 {
Animation::Run
} else {
Animation::Idle
Animation::Attack
}
} else if gliding {
Animation::Gliding

View File

@ -68,7 +68,6 @@ impl Animation for AttackAnimation {
4.0,
9.0,
) / 11.0;
next.l_hand.ori = Quaternion::rotation_x(0.0 + wave * 2.0 )* Quaternion::rotation_z(wave * 2.0);
next.l_hand.scale = Vec3::one() / 11.0;
@ -101,10 +100,10 @@ impl Animation for AttackAnimation {
next.r_shoulder.scale = Vec3::one() * 1.04;
next.draw.offset = Vec3::new(5.5, 0.0, 0.0);
next.draw.ori = Quaternion::rotation_y(0.0);
next.draw.scale = Vec3::one() * 0.0;
next.left_equip.offset = Vec3::new(-8.0, 4.0, 9.0) / 11.0;
next.left_equip.ori = Quaternion::rotation_x(0.0 + wave * 2.0)* Quaternion::rotation_z(1.57 + wave * 2.0);
next.left_equip.scale = Vec3::one() / 11.0;

View File

@ -67,6 +67,7 @@ impl Animation for GlidingAnimation {
-10.0,
6.0 - wave_very_slow * 1.50,
15.0 + wave_very_slow * 0.50,
) / 11.0;
next.l_hand.ori = Quaternion::rotation_x(0.2 + wave_very_slow_cos * 0.05);
next.l_hand.scale = Vec3::one() / 11.0;
@ -103,6 +104,7 @@ impl Animation for GlidingAnimation {
next.r_shoulder.ori = Quaternion::rotation_x(0.0);
next.r_shoulder.scale = Vec3::one() * 1.04;
next.draw.offset = Vec3::new(5.5, -9.0 + wave_very_slow * 0.10, 18.0);
next.draw.ori = Quaternion::rotation_x(0.95 - wave_very_slow * 0.15) * Quaternion::rotation_y(wave_very_slow_cos * 0.04);
next.draw.scale = Vec3::one();
@ -111,6 +113,7 @@ impl Animation for GlidingAnimation {
next.left_equip.ori = Quaternion::rotation_x(0.0);;
next.left_equip.scale = Vec3::one() *0.0;
next.torso.offset = Vec3::new(-0.5, -0.2, 0.0);
next.torso.ori = Quaternion::rotation_x(-0.8 + wave_very_slow * 0.10);
next.torso.scale = Vec3::one() / 11.0;

View File

@ -59,16 +59,18 @@ impl Animation for IdleAnimation {
-7.5,
-2.0 + wave_ultra_slow_cos * 0.15,
8.0 + wave_ultra_slow * 0.5,
) / 11.;
11.5 + wave_ultra_slow * 0.5,
) / 11.0;
next.l_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.06);
next.l_hand.scale = Vec3::one() / 11.;
next.l_hand.scale = Vec3::one() / 11.0;
next.r_hand.offset = Vec3::new(
7.5,
-2.0 + wave_ultra_slow_cos * 0.15,
8.0 + wave_ultra_slow * 0.5,
) / 11.;
) / 11.0;
next.r_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.06);
next.r_hand.scale = Vec3::one() / 11.;
@ -101,6 +103,11 @@ impl Animation for IdleAnimation {
next.left_equip.scale = Vec3::one() *0.0;
next.draw.offset = Vec3::new(13.5, 0.0, 0.0);
next.draw.ori = Quaternion::rotation_y(0.0);
next.draw.scale = Vec3::one() * 0.0;
next.torso.offset = Vec3::new(-0.5, -0.2, 0.1);
next.torso.ori = Quaternion::rotation_x(0.0);
next.torso.scale = Vec3::one() / 11.0;

View File

@ -21,15 +21,9 @@ impl Animation for JumpAnimation {
let mut next = (*skeleton).clone();
let wave = (anim_time as f32 * 14.0).sin();
let wave_slow = (anim_time as f32 * 7.0).sin();
let arc_wave = (1.0f32.ln_1p() - 1.5).abs();
let wave_test = (wave.cbrt());
let fuzz_wave = (anim_time as f32 * 12.0).sin();
let wave_cos = (anim_time as f32 * 14.0).cos();
let wave_stop = (anim_time as f32 * 4.5).min(PI / 2.0).sin();
let wave_stop_alt = (anim_time as f32 * 5.0).min(PI / 2.0).sin();
let wave_slow_test = (anim_time as f32).min(PI / 2.0).sin();
let wave_slow_cos = (anim_time as f32 * 8.0 + PI).cos();
next.head.offset = Vec3::new(5.5, 2.0, 12.0);
next.head.ori = Quaternion::rotation_x(0.25);
@ -83,6 +77,12 @@ impl Animation for JumpAnimation {
next.left_equip.ori = Quaternion::rotation_x(0.0);;
next.left_equip.scale = Vec3::one() *0.0;
next.draw.offset = Vec3::new(13.5, 0.0, 0.0);
next.draw.ori = Quaternion::rotation_y(0.0);
next.draw.scale = Vec3::one() * 0.0;
next.torso.offset = Vec3::new(-0.5, -0.2, 0.0);
next.torso.ori = Quaternion::rotation_x(-0.2);
next.torso.scale = Vec3::one() / 11.0;

View File

@ -21,13 +21,7 @@ impl Animation for RunAnimation {
let mut next = (*skeleton).clone();
let wave = (anim_time as f32 * 14.0).sin();
let wave_test = (wave.cbrt());
let fuzz_wave = (anim_time as f32 * 12.0).sin();
let wave_cos = (anim_time as f32 * 14.0).cos();
let wave_cosdouble = (anim_time as f32 * 28.0).cos();
let wave_slow = (anim_time as f32 * 7.0 + PI).sin();
let wave_slow_cos = (anim_time as f32 * 8.0 + PI).cos();
let wave_dip = (wave_slow.abs() - 0.5).abs();
let head_look = Vec2::new(
((global_time + anim_time) as f32 / 2.0)