lantern visuals, random cape flutter

This commit is contained in:
jshipsey 2020-04-11 21:02:23 -04:00 committed by Pfauenauge90
parent 2c4c006396
commit d7e605e658
17 changed files with 91 additions and 56 deletions

BIN
assets/voxygen/voxel/armor/lantern/black-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/armor/lantern/green-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -5,11 +5,11 @@
),
map: {
Green0: (
vox_spec: ("lantern.green-0", (0.0, 0.0, 0.0)),
vox_spec: ("armor.lantern.green-0", (-2.0, -2.0, -7.0)),
color: None
),
Black0: (
vox_spec: ("lantern.black-0", (0.0, 0.0, 0.0)),
vox_spec: ("armor.lantern.black-0", (-2.0, -2.0, -7.0)),
color: None
),
},

View File

@ -104,6 +104,10 @@ impl Animation for AlphaAnimation {
next.r_foot.ori = Quaternion::rotation_x(slow * -0.6)
* Quaternion::rotation_y((slow * 0.2).min(0.0));
next.r_foot.scale = Vec3::one();
next.lantern.ori =
Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4);
next.torso.offset = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
next.torso.ori = Quaternion::rotation_z(0.0)
* Quaternion::rotation_x(0.0)
@ -151,6 +155,9 @@ impl Animation for AlphaAnimation {
* Quaternion::rotation_z(-0.8);
next.main.scale = Vec3::one();
next.lantern.ori = Quaternion::rotation_x(slowax * -0.7 + 0.4)
* Quaternion::rotation_y(slowax * 0.4);
next.control.offset = Vec3::new(0.0, 0.0 + slowax * 8.2, 6.0);
next.control.ori = Quaternion::rotation_x(0.8)
* Quaternion::rotation_y(-0.3)
@ -197,6 +204,10 @@ impl Animation for AlphaAnimation {
next.shorts.offset = Vec3::new(0.0, 0.0, -5.0);
next.shorts.ori = next.chest.ori * -0.15;
next.shorts.scale = Vec3::one();
next.lantern.ori = Quaternion::rotation_x(slower * -0.7 + 0.4)
* Quaternion::rotation_y(slower * 0.4);
next.torso.offset = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
next.torso.ori = Quaternion::rotation_z(0.0)
* Quaternion::rotation_x(0.0)
@ -519,6 +530,8 @@ impl Animation for AlphaAnimation {
},
_ => {},
}
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.scale = Vec3::one() * 0.65;
next.l_shoulder.offset = Vec3::new(-5.0, 0.0, 4.7);
next.l_shoulder.ori = Quaternion::rotation_x(0.0);
@ -532,10 +545,6 @@ impl Animation for AlphaAnimation {
next.glider.ori = Quaternion::rotation_y(0.0);
next.glider.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.l_control.offset = Vec3::new(0.0, 0.0, 0.0);
next.l_control.ori = Quaternion::rotation_x(0.0);
next.l_control.scale = Vec3::one();

View File

@ -116,9 +116,10 @@ impl Animation for BetaAnimation {
next.glider.ori = Quaternion::rotation_y(0.0);
next.glider.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori =
Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4);
next.lantern.scale = Vec3::one() * 0.65;
next.l_control.offset = Vec3::new(0.0, 0.0, 0.0);
next.l_control.ori = Quaternion::rotation_x(0.0);

View File

@ -175,9 +175,9 @@ impl Animation for ChargeAnimation {
next.glider.ori = Quaternion::rotation_y(0.0);
next.glider.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1);
next.lantern.scale = Vec3::one() * 0.65;
next.l_control.offset = Vec3::new(0.0, 0.0, 0.0);
next.l_control.ori = Quaternion::rotation_x(0.0);

View File

@ -58,7 +58,7 @@ impl Animation for ClimbAnimation {
next.belt.scale = Vec3::one();
next.back.offset = Vec3::new(0.0, -2.8, 7.25);
next.back.ori = Quaternion::rotation_z(-0.2);
next.back.ori = Quaternion::rotation_x(-0.2);
next.back.scale = Vec3::one() * 1.02;
next.shorts.offset = Vec3::new(0.0, 1.0, -5.0);
@ -111,9 +111,10 @@ impl Animation for ClimbAnimation {
next.second.ori = Quaternion::rotation_y(0.0);
next.second.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori =
Quaternion::rotation_x(smooth * -0.3) * Quaternion::rotation_y(smooth * -0.3);
next.lantern.scale = Vec3::one() * 0.65;
next.torso.offset = Vec3::new(0.0, -0.2 + smooth * -0.08, 0.4) * skeleton_attr.scaler;
next.torso.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);

View File

@ -103,9 +103,10 @@ impl Animation for DashAnimation {
next.glider.ori = Quaternion::rotation_y(0.0);
next.glider.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori =
Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4);
next.lantern.scale = Vec3::one() * 0.65;
next.torso.offset = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
next.torso.ori =

View File

@ -98,9 +98,10 @@ impl Animation for JumpAnimation {
next.second.ori = Quaternion::rotation_y(0.0);
next.second.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori = Quaternion::rotation_x(stop * 1.2 + slow * 0.3)
* Quaternion::rotation_y(stop * 0.4 + slow * 0.3);
next.lantern.scale = Vec3::one() * 0.65;
next.torso.offset = Vec3::new(0.0, 0.0, 0.0) * skeleton_attr.scaler;
next.torso.ori = Quaternion::rotation_x(-0.2);

View File

@ -72,14 +72,14 @@ impl Skeleton for CharacterSkeleton {
let r_control_mat = self.r_control.compute_base_matrix();
let main_mat = self.main.compute_base_matrix();
let second_mat = self.second.compute_base_matrix();
let shorts_mat = self.shorts.compute_base_matrix();
let head_mat = self.head.compute_base_matrix();
[
FigureBoneData::new(torso_mat * chest_mat * head_mat),
FigureBoneData::new(torso_mat * chest_mat),
FigureBoneData::new(torso_mat * chest_mat * self.belt.compute_base_matrix()),
FigureBoneData::new(torso_mat * chest_mat * self.back.compute_base_matrix()),
FigureBoneData::new(torso_mat * chest_mat * self.shorts.compute_base_matrix()),
FigureBoneData::new(torso_mat * chest_mat * shorts_mat),
FigureBoneData::new(torso_mat * chest_mat * control_mat * l_control_mat * l_hand_mat),
FigureBoneData::new(torso_mat * chest_mat * control_mat * r_control_mat * r_hand_mat),
FigureBoneData::new(torso_mat * self.l_foot.compute_base_matrix()),
@ -89,7 +89,9 @@ impl Skeleton for CharacterSkeleton {
FigureBoneData::new(torso_mat * self.glider.compute_base_matrix()),
FigureBoneData::new(torso_mat * chest_mat * control_mat * l_control_mat * main_mat),
FigureBoneData::new(torso_mat * chest_mat * control_mat * r_control_mat * second_mat),
FigureBoneData::new(torso_mat * chest_mat * self.lantern.compute_base_matrix()),
FigureBoneData::new(
torso_mat * chest_mat * shorts_mat * self.lantern.compute_base_matrix(),
),
FigureBoneData::default(),
]
}

View File

@ -19,11 +19,11 @@ impl Animation for RollAnimation {
*rate = 1.0;
let mut next = (*skeleton).clone();
let wave = (anim_time as f32 * 5.5).sin();
let wave_quick = (anim_time as f32 * 9.5).sin();
let wave_quick_cos = (anim_time as f32 * 9.5).cos();
let wave_slow = (anim_time as f32 * 2.8 + PI).sin();
let wave_dub = (anim_time as f32 * 5.5).sin();
let wave = (anim_time as f32 * 4.5).sin();
let wave_quick = (anim_time as f32 * 7.5).sin();
let wave_quick_cos = (anim_time as f32 * 7.5).cos();
let wave_slow = (anim_time as f32 * 2.3 + PI).sin();
let wave_dub = (anim_time as f32 * 4.5).sin();
let ori = Vec2::from(orientation);
let last_ori = Vec2::from(last_ori);
@ -116,9 +116,9 @@ impl Animation for RollAnimation {
next.second.ori = Quaternion::rotation_y(0.0);
next.second.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1);
next.lantern.scale = Vec3::one() * 0.65;
next.torso.offset =
Vec3::new(0.0, 0.0, 0.1 + wave_dub * 16.0) / 11.0 * skeleton_attr.scaler;

View File

@ -31,6 +31,13 @@ impl Animation for RunAnimation {
/ (1.5 + 3.5 * ((anim_time as f32 * lab as f32 * 16.0).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 16.0).sin());
let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin();
let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin();
let shorte = (((5.0)
/ (4.0 + 1.0 * ((anim_time as f32 * lab as f32 * 16.0).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 16.0).sin());
let shortalt = (((5.0)
/ (1.5
@ -91,7 +98,7 @@ impl Animation for RunAnimation {
next.belt.scale = Vec3::one();
next.back.offset = Vec3::new(0.0, -2.8, 7.25);
next.back.ori = Quaternion::rotation_x(-0.2 + short * 0.2);
next.back.ori = Quaternion::rotation_x(-0.25 + short * 0.1 + noisea * 0.1 + noiseb * 0.1);
next.back.scale = Vec3::one() * 1.02;
next.shorts.offset = Vec3::new(0.0, 0.0, -5.0);
@ -152,9 +159,10 @@ impl Animation for RunAnimation {
next.second.ori = Quaternion::rotation_y(0.0);
next.second.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 5.0, 0.0);
next.lantern.ori = Quaternion::rotation_y(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori =
Quaternion::rotation_x(shorte * -0.7 + 0.4) * Quaternion::rotation_y(shorte * 0.4);
next.lantern.scale = Vec3::one() * 0.65;
next.torso.offset = Vec3::new(0.0, -0.3 + shortalt * -0.065, 0.0) * skeleton_attr.scaler;
next.torso.ori =

View File

@ -154,9 +154,10 @@ impl Animation for ShootAnimation {
next.glider.ori = Quaternion::rotation_y(0.0);
next.glider.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori =
Quaternion::rotation_x(exp * -0.7 + 0.4) * Quaternion::rotation_y(exp * 0.4);
next.lantern.scale = Vec3::one() * 0.65;
next.l_control.offset = Vec3::new(0.0, 0.0, 0.0);
next.l_control.ori = Quaternion::rotation_x(0.0);

View File

@ -106,9 +106,10 @@ impl Animation for SpinAnimation {
next.glider.ori = Quaternion::rotation_y(0.0);
next.glider.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori =
Quaternion::rotation_x(spin * -0.7 + 0.4) * Quaternion::rotation_y(spin * 0.4);
next.lantern.scale = Vec3::one() * 0.65;
next.l_control.offset = Vec3::new(0.0, 0.0, 0.0);
next.l_control.ori = Quaternion::rotation_x(0.0);

View File

@ -44,19 +44,19 @@ impl Animation for StandAnimation {
next.chest.offset = Vec3::new(0.0, 0.0, 7.0 + slow * 0.3);
next.chest.ori = Quaternion::rotation_z(head_look.x * 0.6);
next.chest.scale = Vec3::one() * 1.01 + breathe * 0.05;
next.chest.scale = Vec3::one() * 1.01 + breathe * 0.03;
next.belt.offset = Vec3::new(0.0, 0.0, -2.0); //5
next.belt.offset = Vec3::new(0.0, 0.0, -2.0);
next.belt.ori = Quaternion::rotation_z(head_look.x * -0.1);
next.belt.scale = Vec3::one() + breathe * -0.05;
next.belt.scale = Vec3::one() + breathe * -0.03;
next.back.offset = Vec3::new(0.0, -2.8, 7.25);
next.back.ori = Quaternion::rotation_z(0.0);
next.back.scale = Vec3::one() * 1.02;
next.shorts.offset = Vec3::new(0.0, 0.0, -5.0); //2
next.shorts.ori = Quaternion::rotation_x(head_look.x * -0.2);
next.shorts.scale = Vec3::one() + breathe * -0.05;
next.shorts.offset = Vec3::new(0.0, 0.0, -5.0);
next.shorts.ori = Quaternion::rotation_z(head_look.x * -0.2);
next.shorts.scale = Vec3::one() + breathe * -0.03;
next.l_hand.offset = Vec3::new(-7.0, -0.25 + slow * 0.15, 5.0 + slow * 0.5);
@ -103,9 +103,9 @@ impl Animation for StandAnimation {
next.second.ori = Quaternion::rotation_y(0.0);
next.second.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
next.lantern.ori = Quaternion::rotation_x(0.0);
next.lantern.scale = Vec3::one() * 1.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1);
next.lantern.scale = Vec3::one() * 0.65;
next.torso.offset = Vec3::new(0.0, -0.1, 0.1) * skeleton_attr.scaler;
next.torso.ori = Quaternion::rotation_x(0.0);

View File

@ -115,9 +115,9 @@ impl Animation for SwimAnimation {
next.second.ori = Quaternion::rotation_y(0.0);
next.second.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(0.0, 5.0, 0.0);
next.lantern.ori = Quaternion::rotation_y(0.0);
next.lantern.scale = Vec3::one() * 0.0;
next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5);
next.lantern.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
next.lantern.scale = Vec3::one() * 0.65;
next.torso.offset = Vec3::new(0.0, -0.3 + shortalt * -0.065, 0.4) * skeleton_attr.scaler;
next.torso.ori =

View File

@ -27,6 +27,8 @@ impl Animation for WieldAnimation {
/ (1.5 + 3.5 * ((anim_time as f32 * lab as f32 * 16.0).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 16.0).sin());
let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin();
let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin();
let wave = (anim_time as f32 * 16.0).sin();
match active_tool_kind {
//TODO: Inventory
@ -199,7 +201,9 @@ impl Animation for WieldAnimation {
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
next.back.offset = Vec3::new(0.0, -2.8, 7.25);
next.back.ori = Quaternion::rotation_x(-0.4 + short * 0.3);
next.back.ori = Quaternion::rotation_x(
(-0.25 + short * 0.3 + noisea * 0.4 + noiseb * 0.4).min(-0.1),
);
next.back.scale = Vec3::one() * 1.02;
next.l_control.offset = Vec3::new(0.0, 0.0, 0.0);