pangolin and special pangolin variable

This commit is contained in:
jshipsey 2020-06-27 16:29:01 -04:00
parent d8fff8833e
commit 94ab3665d5
22 changed files with 181 additions and 16 deletions

View File

@ -601,6 +601,10 @@
"rocksnapper": {
"keyword": "rocksnapper",
"generic": "Rock Snapper"
},
"pangolin": {
"keyword": "pangolin",
"generic": "Pangolin"
}
}
}

BIN
assets/voxygen/voxel/npc/pangolin/female/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/female/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/female/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/female/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/female/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/female/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/female/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/female/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/pangolin/male/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -17,11 +17,11 @@
central: ("npc.crocodile.male.chest"),
),
tail_rear: (
offset: (-1.0, -9.0, -1.5),
offset: (-1.0, -9.0, -1.5),//full length of y dimension
central: ("npc.crocodile.male.tail_rear"),
),
tail_front: (
offset: (-3.0, -13.0, -2.5),
offset: (-3.0, -13.0, -2.5),//full length of y dimension
central: ("npc.crocodile.male.tail_front"),
),
),
@ -364,4 +364,56 @@
central: ("npc.rocksnapper.female.tail_front"),
),
),
(Pangolin, Male): (
upper: (
offset: (-2.5, 0.0, -3.0),
central: ("npc.pangolin.male.head_upper"),
),
lower: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
jaw: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
chest: (
offset: (-6.5, -8.0, -4.5),
central: ("npc.pangolin.male.chest"),
),
tail_rear: (
offset: (-3.5, -16.0, -1.5),
central: ("npc.pangolin.male.tail_rear"),
),
tail_front: (
offset: (-4.5, -8.0, -4.0),
central: ("npc.pangolin.male.tail_front"),
),
),
(Pangolin, Female): (
upper: (
offset: (-2.5, 0.0, -3.0),
central: ("npc.pangolin.female.head_upper"),
),
lower: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
jaw: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
chest: (
offset: (-6.5, -8.0, -4.5),
central: ("npc.pangolin.female.chest"),
),
tail_rear: (
offset: (-3.5, -16.0, -1.5),
central: ("npc.pangolin.female.tail_rear"),
),
tail_front: (
offset: (-4.5, -8.0, -4.0),
central: ("npc.pangolin.female.tail_front"),
),
),
})

View File

@ -251,4 +251,40 @@
lateral: ("npc.rocksnapper.female.foot_br"),
),
),
(Pangolin, Male): (
front_left: (
offset: (-1.5, 0.0, -6.0),//unique
lateral: ("npc.pangolin.male.foot_fl"),
),
front_right: (
offset: (-1.5, 0.0, -6.0),
lateral: ("npc.pangolin.male.foot_fr"),
),
back_left: (
offset: (-1.5, 0.0, -6.0),
lateral: ("npc.pangolin.male.foot_bl"),
),
back_right: (
offset: (-1.5, 0.0, -6.0),
lateral: ("npc.pangolin.male.foot_br"),
),
),
(Pangolin, Female): (
front_left: (
offset: (-1.5, 0.0, -6.0),
lateral: ("npc.pangolin.female.foot_fl"),
),
front_right: (
offset: (-1.5, 0.0, -6.0),
lateral: ("npc.pangolin.female.foot_fr"),
),
back_left: (
offset: (-1.5, 0.0, -6.0),//special case
lateral: ("npc.pangolin.female.foot_bl"),
),
back_right: (
offset: (-1.5, 0.0, -6.0),
lateral: ("npc.pangolin.female.foot_br"),
),
),
})

View File

@ -34,6 +34,7 @@ pub enum Species {
Asp = 4,
Tortoise = 5,
Rocksnapper = 6,
Pangolin = 7,
}
/// Data representing per-species generic data.
@ -48,6 +49,7 @@ pub struct AllSpecies<SpeciesMeta> {
pub asp: SpeciesMeta,
pub tortoise: SpeciesMeta,
pub rocksnapper: SpeciesMeta,
pub pangolin: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -63,11 +65,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
Species::Asp => &self.asp,
Species::Tortoise => &self.tortoise,
Species::Rocksnapper => &self.rocksnapper,
Species::Pangolin => &self.pangolin,
}
}
}
pub const ALL_SPECIES: [Species; 7] = [
pub const ALL_SPECIES: [Species; 8] = [
Species::Crocodile,
Species::Alligator,
Species::Salamander,
@ -75,6 +78,7 @@ pub const ALL_SPECIES: [Species; 7] = [
Species::Asp,
Species::Tortoise,
Species::Rocksnapper,
Species::Pangolin,
];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {

View File

@ -92,6 +92,7 @@ pub struct SkeletonAttr {
tail_rear: (f32, f32),
feet_f: (f32, f32, f32),
feet_b: (f32, f32, f32),
lean: (f32, f32),
}
impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr {
@ -116,6 +117,7 @@ impl Default for SkeletonAttr {
tail_rear: (0.0, 0.0),
feet_f: (0.0, 0.0, 0.0),
feet_b: (0.0, 0.0, 0.0),
lean: (0.0, 0.0),
}
}
}
@ -132,6 +134,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (6.0, 5.5),
(Tortoise, _) => (5.0, 1.0),
(Rocksnapper, _) => (6.0, 0.5),
(Pangolin, _) => (-0.5, 8.0),
},
head_lower: match (body.species, body.body_type) {
(Crocodile, _) => (8.0, 0.0),
@ -141,6 +144,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (9.0, 2.5),
(Tortoise, _) => (12.0, -3.5),
(Rocksnapper, _) => (12.0, -9.0),
(Pangolin, _) => (8.0, -9.0),
},
jaw: match (body.species, body.body_type) {
(Crocodile, _) => (0.0, -3.0),
@ -150,6 +154,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (1.0, -2.0),
(Tortoise, _) => (0.5, -2.0),
(Rocksnapper, _) => (0.5, -1.5),
(Pangolin, _) => (0.5, -1.5),
},
chest: match (body.species, body.body_type) {
(Crocodile, _) => (0.0, 5.0),
@ -159,6 +164,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (0.0, 8.0),
(Tortoise, _) => (0.0, 11.0),
(Rocksnapper, _) => (0.0, 18.5),
(Pangolin, _) => (0.0, 7.0),
},
tail_rear: match (body.species, body.body_type) {
(Crocodile, _) => (-12.5, -1.0),
@ -168,6 +174,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (-14.0, -2.0),
(Tortoise, _) => (-7.0, -1.5),
(Rocksnapper, _) => (-14.5, -2.0),
(Pangolin, _) => (-7.0, -3.0),
},
tail_front: match (body.species, body.body_type) {
(Crocodile, _) => (-6.0, 0.0),
@ -177,6 +184,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (-6.0, -2.0),
(Tortoise, _) => (-10.0, -3.5),
(Rocksnapper, _) => (-13.5, -6.5),
(Pangolin, _) => (-7.5, -0.5),
},
feet_f: match (body.species, body.body_type) {
(Crocodile, _) => (3.5, 6.0, -1.0),
@ -186,6 +194,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (1.5, 4.0, -1.0),
(Tortoise, _) => (5.5, 6.5, -3.0),
(Rocksnapper, _) => (7.5, 5.0, -8.5),
(Pangolin, _) => (5.0, 5.0, -1.0),
},
feet_b: match (body.species, body.body_type) {
(Crocodile, _) => (3.5, -6.0, -1.0),
@ -195,6 +204,11 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Asp, _) => (2.5, -5.5, -1.0),
(Tortoise, _) => (7.0, -11.5, -3.0),
(Rocksnapper, _) => (8.0, -16.0, -9.5),
(Pangolin, _) => (6.0, -4.0, -1.0),
},
lean: match (body.species, body.body_type) {
(Pangolin, _) => (0.4, 0.0),
_ => (0.0, 1.0),
},
}
}

View File

@ -21,7 +21,7 @@ impl Animation for RunAnimation {
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let lab = 0.5;
let lab = 0.5 * (skeleton_attr.lean.0 + 1.0);
let center = (anim_time as f32 * lab as f32 + PI / 2.0).sin();
let centeroffset = (anim_time as f32 * lab as f32 + PI * 1.5).sin();
@ -99,7 +99,8 @@ impl Animation for RunAnimation {
next.head_upper.offset =
Vec3::new(0.0, skeleton_attr.head_upper.0, skeleton_attr.head_upper.1);
next.head_upper.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_z(short * -0.06);
next.head_upper.ori =
Quaternion::rotation_x(-skeleton_attr.lean.0) * Quaternion::rotation_z(short * -0.06);
next.head_upper.scale = Vec3::one();
next.head_lower.offset =
@ -111,11 +112,14 @@ impl Animation for RunAnimation {
next.jaw.ori = Quaternion::rotation_x(0.0);
next.jaw.scale = Vec3::one() * 0.98;
next.tail_front.offset =
Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1);
next.tail_front.offset = Vec3::new(
0.0,
skeleton_attr.tail_front.0 + skeleton_attr.lean.0 * 2.0,
skeleton_attr.tail_front.1 + skeleton_attr.lean.0 * 2.0,
);
next.tail_front.ori = Quaternion::rotation_z(shortalt * 0.18)
* Quaternion::rotation_y(shortalt * 0.1)
* Quaternion::rotation_x(0.06);
* Quaternion::rotation_x(0.06 - skeleton_attr.lean.0 * 1.2);
next.tail_front.scale = Vec3::one();
next.tail_rear.offset = Vec3::new(
@ -129,8 +133,9 @@ impl Animation for RunAnimation {
next.tail_rear.scale = Vec3::one();
next.chest.offset = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1) / 6.0;
next.chest.ori =
Quaternion::rotation_z(short * 0.12) * Quaternion::rotation_y(shortalt * 0.12);
next.chest.ori = Quaternion::rotation_z(short * 0.12)
* Quaternion::rotation_y(shortalt * 0.12)
* Quaternion::rotation_x(skeleton_attr.lean.0);
next.chest.scale = Vec3::one() / 6.0;
next.foot_fl.offset = Vec3::new(
@ -139,7 +144,8 @@ impl Animation for RunAnimation {
skeleton_attr.feet_f.2 + 1.0 + ((footvertl * -0.8).max(-0.0)),
);
next.foot_fl.ori =
Quaternion::rotation_x(footrotl * -0.25) * Quaternion::rotation_z(footrotl * 0.4);
Quaternion::rotation_x(footrotl * -0.25 * skeleton_attr.lean.1 - skeleton_attr.lean.0)
* Quaternion::rotation_z(footrotl * 0.4 * skeleton_attr.lean.1);
next.foot_fl.scale = Vec3::one();
next.foot_fr.offset = Vec3::new(
@ -148,7 +154,8 @@ impl Animation for RunAnimation {
skeleton_attr.feet_f.2 + 1.0 + ((footvertr * -0.8).max(-0.0)),
);
next.foot_fr.ori =
Quaternion::rotation_x(footrotr * -0.25) * Quaternion::rotation_z(footrotr * -0.4);
Quaternion::rotation_x(footrotr * -0.25 * skeleton_attr.lean.1 - skeleton_attr.lean.0)
* Quaternion::rotation_z(footrotr * -0.4 * skeleton_attr.lean.1);
next.foot_fr.scale = Vec3::one();
next.foot_bl.offset = Vec3::new(
@ -156,8 +163,8 @@ impl Animation for RunAnimation {
skeleton_attr.feet_b.1 + foothorilb * -1.0,
skeleton_attr.feet_b.2 + 1.0 + ((footvertlb * -0.6).max(-0.0)),
);
next.foot_bl.ori =
Quaternion::rotation_x(footrotlb * -0.25) * Quaternion::rotation_z(footrotlb * 0.4);
next.foot_bl.ori = Quaternion::rotation_x(footrotlb * -0.25 - skeleton_attr.lean.0)
* Quaternion::rotation_z(footrotlb * 0.4);
next.foot_bl.scale = Vec3::one();
next.foot_br.offset = Vec3::new(
@ -165,8 +172,8 @@ impl Animation for RunAnimation {
skeleton_attr.feet_b.1 + foothorirb * -1.0,
skeleton_attr.feet_b.2 + 1.0 + ((footvertrb * -0.6).max(-0.0)),
);
next.foot_br.ori =
Quaternion::rotation_x(footrotrb * -0.25) * Quaternion::rotation_z(footrotrb * -0.4);
next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.25 - skeleton_attr.lean.0)
* Quaternion::rotation_z(footrotrb * -0.4);
next.foot_br.scale = Vec3::one();
next