Adds new arthropod species

This commit is contained in:
Snowram 2021-07-28 01:07:27 +02:00
parent f67bf2a539
commit fa549eece7
81 changed files with 1898 additions and 168 deletions

View File

@ -1219,7 +1219,47 @@
tarantula: (
keyword: "tarantula",
generic: "Tarantula"
)
),
black_widow: (
keyword: "black_widow",
generic: "Blackwidow"
),
antlion: (
keyword: "antlion",
generic: "Antlion"
),
horn_beetle: (
keyword: "horn_beetle",
generic: "Hornbeetle"
),
leaf_beetle: (
keyword: "leaf_beetle",
generic: "Leafbeetle"
),
stag_beetle: (
keyword: "stag_beetle",
generic: "Stagbeetle"
),
weevil: (
keyword: "weevil",
generic: "Weevil"
),
cave_spider: (
keyword: "cave_spider",
generic: "Cave Spider"
),
crawler_molten: (
keyword: "crawler_molten",
generic: "Molten Crawler"
),
crawler_moss: (
keyword: "crawler_moss",
generic: "Moss Crawler"
),
crawler_sand: (
keyword: "crawler_sand",
generic: "Molten Crawler"
),
)
),
)

View File

@ -1,22 +1,222 @@
({
(Tarantula, Male): (
head: (
offset: (-4.5, 0.0, -5.0),
offset: (-4.5, 0.0, -2.5),
central: ("npc.tarantula.male.head"),
),
chest: (
offset: (-5.5, -2.0, -3.0),
offset: (-5.5, -7.0, -4.0),
central: ("npc.tarantula.male.chest"),
),
),
(Tarantula, Female): (
head: (
offset: (-4.5, 0.0, -5.0),
offset: (-4.5, 0.0, -2.5),
central: ("npc.tarantula.male.head"),
),
chest: (
offset: (-5.5, -2.0, -3.0),
offset: (-5.5, -7.0, -4.0),
central: ("npc.tarantula.male.chest"),
),
),
(Blackwidow, Male): (
head: (
offset: (-4.5, 0.0, -3.0),
central: ("npc.black_widow.male.head"),
),
chest: (
offset: (-4.5, -7.5, -6.0),
central: ("npc.black_widow.male.chest"),
),
),
(Blackwidow, Female): (
head: (
offset: (-4.5, 0.0, -3.0),
central: ("npc.black_widow.male.head"),
),
chest: (
offset: (-4.5, -7.5, -6.0),
central: ("npc.black_widow.male.chest"),
),
),
(Antlion, Male): (
head: (
offset: (-6.5, 0.0, -5.5),
central: ("npc.antlion.male.head"),
),
chest: (
offset: (-5.5, -7.5, -5.5),
central: ("npc.antlion.male.chest"),
),
),
(Antlion, Female): (
head: (
offset: (-6.5, 0.0, -5.5),
central: ("npc.antlion.male.head"),
),
chest: (
offset: (-5.5, -7.5, -5.5),
central: ("npc.antlion.male.chest"),
),
),
(Hornbeetle, Male): (
head: (
offset: (-5.5, 0.0, -7.5),
central: ("npc.horn_beetle.male.head"),
),
chest: (
offset: (-4.5, -6.0, -3.5),
central: ("npc.horn_beetle.male.chest"),
),
),
(Hornbeetle, Female): (
head: (
offset: (-5.5, 0.0, -7.5),
central: ("npc.horn_beetle.male.head"),
),
chest: (
offset: (-4.5, -6.0, -3.5),
central: ("npc.horn_beetle.male.chest"),
),
),
(Leafbeetle, Male): (
head: (
offset: (-5.5, 0.0, -3.0),
central: ("npc.leaf_beetle.male.head"),
),
chest: (
offset: (-4.5, -5.0, -3.0),
central: ("npc.leaf_beetle.male.chest"),
),
),
(Leafbeetle, Female): (
head: (
offset: (-5.5, 0.0, -3.0),
central: ("npc.leaf_beetle.male.head"),
),
chest: (
offset: (-4.5, -5.0, -3.0),
central: ("npc.leaf_beetle.male.chest"),
),
),
(Stagbeetle, Male): (
head: (
offset: (-8.5, 0.0, -4.5),
central: ("npc.stag_beetle.male.head"),
),
chest: (
offset: (-4.5, -6.0, -3.5),
central: ("npc.stag_beetle.male.chest"),
),
),
(Stagbeetle, Female): (
head: (
offset: (-8.5, 0.0, -4.5),
central: ("npc.stag_beetle.male.head"),
),
chest: (
offset: (-4.5, -6.0, -3.5),
central: ("npc.stag_beetle.male.chest"),
),
),
(Weevil, Male): (
head: (
offset: (-4.5, 0.0, -3.0),
central: ("npc.weevil.male.head"),
),
chest: (
offset: (-4.5, -5.0, -3.0),
central: ("npc.weevil.male.chest"),
),
),
(Weevil, Female): (
head: (
offset: (-4.5, 0.0, -3.0),
central: ("npc.weevil.male.head"),
),
chest: (
offset: (-4.5, -5.0, -3.0),
central: ("npc.weevil.male.chest"),
),
),
(Cavespider, Male): (
head: (
offset: (-4.5, 0.0, -2.5),
central: ("npc.cave_spider.male.head"),
),
chest: (
offset: (-5.5, -7.0, -4.0),
central: ("npc.cave_spider.male.chest"),
),
),
(Cavespider, Female): (
head: (
offset: (-4.5, 0.0, -2.5),
central: ("npc.cave_spider.male.head"),
),
chest: (
offset: (-5.5, -7.0, -4.0),
central: ("npc.cave_spider.male.chest"),
),
),
(Moltencrawler, Male): (
head: (
offset: (-7.5, 0.0, -4.0),
central: ("npc.crawler_molten.male.head"),
),
chest: (
offset: (-4.5, -5.0, -5.0),
central: ("npc.crawler_molten.male.chest"),
),
),
(Moltencrawler, Female): (
head: (
offset: (-7.5, 0.0, -4.0),
central: ("npc.crawler_molten.male.head"),
),
chest: (
offset: (-4.5, -5.0, -5.0),
central: ("npc.crawler_molten.male.chest"),
),
),
(Mosscrawler, Male): (
head: (
offset: (-5.5, 0.0, -4.0),
central: ("npc.crawler_moss.male.head"),
),
chest: (
offset: (-3.5, -5.0, -5.5),
central: ("npc.crawler_moss.male.chest"),
),
),
(Mosscrawler, Female): (
head: (
offset: (-5.5, 0.0, -4.0),
central: ("npc.crawler_moss.male.head"),
),
chest: (
offset: (-3.5, -5.0, -5.5),
central: ("npc.crawler_moss.male.chest"),
),
),
(Sandcrawler, Male): (
head: (
offset: (-5.5, 0.0, -4.0),
central: ("npc.crawler_sand.male.head"),
),
chest: (
offset: (-3.5, -5.0, -5.0),
central: ("npc.crawler_sand.male.chest"),
),
),
(Sandcrawler, Female): (
head: (
offset: (-5.5, 0.0, -4.0),
central: ("npc.crawler_sand.male.head"),
),
chest: (
offset: (-3.5, -5.0, -5.0),
central: ("npc.crawler_sand.male.chest"),
),
),
})

File diff suppressed because it is too large Load Diff

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

View File

@ -402,7 +402,7 @@ impl Body {
theropod::Species::Woodraptor => Vec3::new(2.0, 3.0, 2.6),
theropod::Species::Yale => Vec3::new(1.5, 3.2, 4.0),
},
Body::Arthropod(body) => Vec3::new(1.0, 1.0, 1.0),
Body::Arthropod(body) => Vec3::new(4.0, 4.0, 4.0),
}
}

View File

@ -29,12 +29,32 @@ impl From<Body> for super::Body {
#[repr(u32)]
pub enum Species {
Tarantula = 0,
Blackwidow = 1,
Antlion = 2,
Hornbeetle = 3,
Leafbeetle = 4,
Stagbeetle = 5,
Weevil = 6,
Cavespider = 7,
Moltencrawler = 8,
Mosscrawler = 9,
Sandcrawler = 10,
}
/// Data representing per-species generic data.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct AllSpecies<SpeciesMeta> {
pub tarantula: SpeciesMeta,
pub black_widow: SpeciesMeta,
pub antlion: SpeciesMeta,
pub horn_beetle: SpeciesMeta,
pub leaf_beetle: SpeciesMeta,
pub stag_beetle: SpeciesMeta,
pub weevil: SpeciesMeta,
pub cave_spider: SpeciesMeta,
pub crawler_molten: SpeciesMeta,
pub crawler_moss: SpeciesMeta,
pub crawler_sand: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -44,11 +64,33 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
fn index(&self, &index: &'a Species) -> &Self::Output {
match index {
Species::Tarantula => &self.tarantula,
Species::Blackwidow => &self.black_widow,
Species::Antlion => &self.antlion,
Species::Hornbeetle => &self.horn_beetle,
Species::Leafbeetle => &self.leaf_beetle,
Species::Stagbeetle => &self.stag_beetle,
Species::Weevil => &self.weevil,
Species::Cavespider => &self.cave_spider,
Species::Moltencrawler => &self.crawler_molten,
Species::Mosscrawler => &self.crawler_moss,
Species::Sandcrawler => &self.crawler_sand,
}
}
}
pub const ALL_SPECIES: [Species; 1] = [Species::Tarantula];
pub const ALL_SPECIES: [Species; 11] = [
Species::Tarantula,
Species::Blackwidow,
Species::Antlion,
Species::Hornbeetle,
Species::Leafbeetle,
Species::Stagbeetle,
Species::Weevil,
Species::Cavespider,
Species::Moltencrawler,
Species::Mosscrawler,
Species::Sandcrawler,
];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
type IntoIter = std::iter::Copied<std::slice::Iter<'static, Self::Item>>;

View File

@ -44,26 +44,26 @@ impl Animation for AlphaAnimation {
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1);
next.mandible_l.position = Vec3::new(-s_a.mandible_l.0, s_a.mandible_l.1, s_a.mandible_l.2);
next.mandible_r.position = Vec3::new(s_a.mandible_r.0, s_a.mandible_r.1, s_a.mandible_r.2);
next.mandible_l.position = Vec3::new(-s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.mandible_r.position = Vec3::new(s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.wing_fl.position = Vec3::new(-s_a.wing_fl.0, s_a.wing_fl.1, s_a.wing_fl.2);
next.wing_fr.position = Vec3::new(s_a.wing_fr.0, s_a.wing_fr.1, s_a.wing_fr.2);
next.wing_fl.position = Vec3::new(-s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_fr.position = Vec3::new(s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_bl.position = Vec3::new(-s_a.wing_bl.0, s_a.wing_bl.1, s_a.wing_bl.2);
next.wing_br.position = Vec3::new(s_a.wing_br.0, s_a.wing_br.1, s_a.wing_br.2);
next.wing_bl.position = Vec3::new(-s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.wing_br.position = Vec3::new(s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.leg_fl.position = Vec3::new(-s_a.leg_fl.0, s_a.leg_fl.1, s_a.leg_fl.2);
next.leg_fr.position = Vec3::new(s_a.leg_fr.0, s_a.leg_fr.1, s_a.leg_fr.2);
next.leg_fl.position = Vec3::new(-s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
next.leg_fr.position = Vec3::new(s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
next.leg_fcl.position = Vec3::new(-s_a.leg_fcl.0, s_a.leg_fcl.1, s_a.leg_fcl.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fcr.0, s_a.leg_fcr.1, s_a.leg_fcr.2);
next.leg_fcl.position = Vec3::new(-s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
next.leg_bcl.position = Vec3::new(-s_a.leg_bcl.0, s_a.leg_bcl.1, s_a.leg_bcl.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bcr.0, s_a.leg_bcr.1, s_a.leg_bcr.2);
next.leg_bcl.position = Vec3::new(-s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
next.leg_bl.position = Vec3::new(-s_a.leg_bl.0, s_a.leg_bl.1, s_a.leg_bl.2);
next.leg_br.position = Vec3::new(s_a.leg_br.0, s_a.leg_br.1, s_a.leg_br.2);
next.leg_bl.position = Vec3::new(-s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
next.leg_br.position = Vec3::new(s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
next
}

View File

@ -22,32 +22,40 @@ impl Animation for IdleAnimation {
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
next.chest.scale = Vec3::one() / s_a.scaler;
next.chest.scale = Vec3::one();
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1);
next.mandible_l.position = Vec3::new(-s_a.mandible_l.0, s_a.mandible_l.1, s_a.mandible_l.2);
next.mandible_r.position = Vec3::new(s_a.mandible_r.0, s_a.mandible_r.1, s_a.mandible_r.2);
next.mandible_l.position = Vec3::new(-s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.mandible_r.position = Vec3::new(s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.wing_fl.position = Vec3::new(-s_a.wing_fl.0, s_a.wing_fl.1, s_a.wing_fl.2);
next.wing_fr.position = Vec3::new(s_a.wing_fr.0, s_a.wing_fr.1, s_a.wing_fr.2);
next.wing_fl.position = Vec3::new(-s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_fr.position = Vec3::new(s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_bl.position = Vec3::new(-s_a.wing_bl.0, s_a.wing_bl.1, s_a.wing_bl.2);
next.wing_br.position = Vec3::new(s_a.wing_br.0, s_a.wing_br.1, s_a.wing_br.2);
next.wing_bl.position = Vec3::new(-s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.wing_br.position = Vec3::new(s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.leg_fl.position = Vec3::new(-s_a.leg_fl.0, s_a.leg_fl.1, s_a.leg_fl.2);
next.leg_fr.position = Vec3::new(s_a.leg_fr.0, s_a.leg_fr.1, s_a.leg_fr.2);
next.leg_fl.position = Vec3::new(-s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
next.leg_fr.position = Vec3::new(s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
//next.leg_fl.orientation = Quaternion::rotation_z(0.1);
//next.leg_fr.orientation = Quaternion::rotation_z(-0.1);
next.leg_fcl.position = Vec3::new(-s_a.leg_fcl.0, s_a.leg_fcl.1, s_a.leg_fcl.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fcr.0, s_a.leg_fcr.1, s_a.leg_fcr.2);
next.leg_fcl.position = Vec3::new(-s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
//next.leg_fcl.orientation = Quaternion::rotation_z(-0.3);
//next.leg_fcr.orientation = Quaternion::rotation_z(0.3);
next.leg_bcl.position = Vec3::new(-s_a.leg_bcl.0, s_a.leg_bcl.1, s_a.leg_bcl.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bcr.0, s_a.leg_bcr.1, s_a.leg_bcr.2);
next.leg_bcl.position = Vec3::new(-s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
//next.leg_bcl.orientation = Quaternion::rotation_z(0.0);
//next.leg_bcr.orientation = Quaternion::rotation_z(0.0);
next.leg_bl.position = Vec3::new(-s_a.leg_bl.0, s_a.leg_bl.1, s_a.leg_bl.2);
next.leg_br.position = Vec3::new(s_a.leg_br.0, s_a.leg_br.1, s_a.leg_br.2);
next.leg_bl.position = Vec3::new(-s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
next.leg_br.position = Vec3::new(s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
//next.leg_bl.orientation = Quaternion::rotation_z(0.4);
//next.leg_br.orientation = Quaternion::rotation_z(-0.4);
next
}

View File

@ -27,26 +27,26 @@ impl Animation for JumpAnimation {
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1);
next.mandible_l.position = Vec3::new(-s_a.mandible_l.0, s_a.mandible_l.1, s_a.mandible_l.2);
next.mandible_r.position = Vec3::new(s_a.mandible_r.0, s_a.mandible_r.1, s_a.mandible_r.2);
next.mandible_l.position = Vec3::new(-s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.mandible_r.position = Vec3::new(s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.wing_fl.position = Vec3::new(-s_a.wing_fl.0, s_a.wing_fl.1, s_a.wing_fl.2);
next.wing_fr.position = Vec3::new(s_a.wing_fr.0, s_a.wing_fr.1, s_a.wing_fr.2);
next.wing_fl.position = Vec3::new(-s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_fr.position = Vec3::new(s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_bl.position = Vec3::new(-s_a.wing_bl.0, s_a.wing_bl.1, s_a.wing_bl.2);
next.wing_br.position = Vec3::new(s_a.wing_br.0, s_a.wing_br.1, s_a.wing_br.2);
next.wing_bl.position = Vec3::new(-s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.wing_br.position = Vec3::new(s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.leg_fl.position = Vec3::new(-s_a.leg_fl.0, s_a.leg_fl.1, s_a.leg_fl.2);
next.leg_fr.position = Vec3::new(s_a.leg_fr.0, s_a.leg_fr.1, s_a.leg_fr.2);
next.leg_fl.position = Vec3::new(-s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
next.leg_fr.position = Vec3::new(s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
next.leg_fcl.position = Vec3::new(-s_a.leg_fcl.0, s_a.leg_fcl.1, s_a.leg_fcl.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fcr.0, s_a.leg_fcr.1, s_a.leg_fcr.2);
next.leg_fcl.position = Vec3::new(-s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
next.leg_bcl.position = Vec3::new(-s_a.leg_bcl.0, s_a.leg_bcl.1, s_a.leg_bcl.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bcr.0, s_a.leg_bcr.1, s_a.leg_bcr.2);
next.leg_bcl.position = Vec3::new(-s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
next.leg_bl.position = Vec3::new(-s_a.leg_bl.0, s_a.leg_bl.1, s_a.leg_bl.2);
next.leg_br.position = Vec3::new(s_a.leg_br.0, s_a.leg_br.1, s_a.leg_br.2);
next.leg_bl.position = Vec3::new(-s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
next.leg_br.position = Vec3::new(s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
next
}

View File

@ -49,6 +49,8 @@ impl Skeleton for ArthropodSkeleton {
buf: &mut [FigureBoneData; super::MAX_BONE_COUNT],
body: Self::Body,
) -> Offsets {
let base_mat = base_mat * Mat4::scaling_3d(SkeletonAttr::from(&body).scaler / 4.0);
let chest_mat = base_mat * Mat4::<f32>::from(self.chest);
let head_mat = chest_mat * Mat4::<f32>::from(self.head);
let mandible_l_mat = head_mat * Mat4::<f32>::from(self.mandible_l);
@ -112,20 +114,13 @@ impl Skeleton for ArthropodSkeleton {
pub struct SkeletonAttr {
head: (f32, f32),
chest: (f32, f32),
mandible_l: (f32, f32, f32),
mandible_r: (f32, f32, f32),
wing_fl: (f32, f32, f32),
wing_fr: (f32, f32, f32),
wing_bl: (f32, f32, f32),
wing_br: (f32, f32, f32),
leg_fl: (f32, f32, f32),
leg_fr: (f32, f32, f32),
leg_fcl: (f32, f32, f32),
leg_fcr: (f32, f32, f32),
leg_bcl: (f32, f32, f32),
leg_bcr: (f32, f32, f32),
leg_bl: (f32, f32, f32),
leg_br: (f32, f32, f32),
mandible: (f32, f32, f32),
wing_f: (f32, f32, f32),
wing_b: (f32, f32, f32),
leg_f: (f32, f32, f32),
leg_fc: (f32, f32, f32),
leg_bc: (f32, f32, f32),
leg_b: (f32, f32, f32),
scaler: f32,
}
@ -145,20 +140,13 @@ impl Default for SkeletonAttr {
Self {
head: (0.0, 0.0),
chest: (0.0, 0.0),
mandible_l: (0.0, 0.0, 0.0),
mandible_r: (0.0, 0.0, 0.0),
wing_fl: (0.0, 0.0, 0.0),
wing_fr: (0.0, 0.0, 0.0),
wing_bl: (0.0, 0.0, 0.0),
wing_br: (0.0, 0.0, 0.0),
leg_fl: (0.0, 0.0, 0.0),
leg_fr: (0.0, 0.0, 0.0),
leg_fcl: (0.0, 0.0, 0.0),
leg_fcr: (0.0, 0.0, 0.0),
leg_bcl: (0.0, 0.0, 0.0),
leg_bcr: (0.0, 0.0, 0.0),
leg_bl: (0.0, 0.0, 0.0),
leg_br: (0.0, 0.0, 0.0),
mandible: (0.0, 0.0, 0.0),
wing_f: (0.0, 0.0, 0.0),
wing_b: (0.0, 0.0, 0.0),
leg_f: (0.0, 0.0, 0.0),
leg_fc: (0.0, 0.0, 0.0),
leg_bc: (0.0, 0.0, 0.0),
leg_b: (0.0, 0.0, 0.0),
scaler: 0.0,
}
}
@ -169,55 +157,134 @@ impl<'a> From<&'a Body> for SkeletonAttr {
use comp::arthropod::Species::*;
Self {
head: match (body.species, body.body_type) {
(Tarantula, _) => (8.0, 4.0),
(Tarantula, _) => (6.0, 0.5),
(Blackwidow, _) => (5.5, -3.0),
(Antlion, _) => (4.5, 0.0),
(Hornbeetle, _) => (5.0, 3.0),
(Leafbeetle, _) => (4.0, 0.0),
(Stagbeetle, _) => (5.0, -1.0),
(Weevil, _) => (4.0, 0.0),
(Cavespider, _) => (6.0, 0.5),
(Moltencrawler, _) => (4.0, -1.0),
(Mosscrawler, _) => (4.0, -1.5),
(Sandcrawler, _) => (4.0, -1.0),
},
chest: match (body.species, body.body_type) {
(Tarantula, _) => (1.0, -7.0),
(Tarantula, _) => (-9.0, 6.0),
(Blackwidow, _) => (-9.0, 10.0),
(Antlion, _) => (-9.0, 8.5),
(Hornbeetle, _) => (-9.0, 7.5),
(Leafbeetle, _) => (-9.0, 6.0),
(Stagbeetle, _) => (-9.0, 6.5),
(Weevil, _) => (-9.0, 6.0),
(Cavespider, _) => (-9.0, 7.0),
(Moltencrawler, _) => (-9.0, 6.0),
(Mosscrawler, _) => (-9.0, 6.5),
(Sandcrawler, _) => (-9.0, 6.0),
},
mandible_l: match (body.species, body.body_type) {
mandible: match (body.species, body.body_type) {
(Tarantula, _) => (1.5, 7.0, -0.5),
(Blackwidow, _) => (2.5, 8.0, 0.0),
(Antlion, _) => (8.5, 9.0, -3.5),
(Hornbeetle, _) => (1.5, 7.0, -0.5),
(Leafbeetle, _) => (1.5, 7.0, -0.5),
(Stagbeetle, _) => (1.5, 10.0, 1.0),
(Weevil, _) => (1.5, 7.0, -0.5),
(Cavespider, _) => (2.5, 8.0, -0.5),
(Moltencrawler, _) => (2.5, 8.0, 0.0),
(Mosscrawler, _) => (2.5, 8.0, 0.0),
(Sandcrawler, _) => (2.5, 8.0, 0.0),
},
wing_f: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, 0.0, -4.0),
(Blackwidow, _) => (3.0, 0.0, -4.0),
(Antlion, _) => (3.0, 0.0, -4.0),
(Hornbeetle, _) => (-0.5, 5.0, 3.0),
(Leafbeetle, _) => (0.5, 5.0, 3.0),
(Stagbeetle, _) => (0.5, 6.0, 4.5),
(Weevil, _) => (0.5, 5.0, 3.0),
(Cavespider, _) => (3.0, 0.0, -4.0),
(Moltencrawler, _) => (3.0, 0.0, -4.0),
(Mosscrawler, _) => (3.0, 0.0, -4.0),
(Sandcrawler, _) => (3.0, 0.0, -4.0),
},
mandible_r: match (body.species, body.body_type) {
wing_b: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, 0.0, -4.0),
(Blackwidow, _) => (3.0, 0.0, -4.0),
(Antlion, _) => (3.0, 0.0, -4.0),
(Hornbeetle, _) => (0.0, 6.0, 2.0),
(Leafbeetle, _) => (0.5, 4.0, 2.0),
(Stagbeetle, _) => (0.5, -5.0, 3.0),
(Weevil, _) => (0.5, 4.0, 1.5),
(Cavespider, _) => (3.0, 0.0, -4.0),
(Moltencrawler, _) => (3.0, 0.0, -4.0),
(Mosscrawler, _) => (3.0, 0.0, -4.0),
(Sandcrawler, _) => (3.0, 0.0, -4.0),
},
wing_fl: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, 0.0, -4.0),
leg_f: match (body.species, body.body_type) {
(Tarantula, _) => (4.0, 11.0, -1.5),
(Blackwidow, _) => (4.0, 13.5, -6.0),
(Antlion, _) => (1.5, 12.0, -4.0),
(Hornbeetle, _) => (5.0, 6.0, -3.0),
(Leafbeetle, _) => (5.0, 6.0, -1.0),
(Stagbeetle, _) => (5.0, 6.0, -2.0),
(Weevil, _) => (5.0, 9.0, -2.0),
(Cavespider, _) => (4.0, 13.0, -3.0),
(Moltencrawler, _) => (2.5, 14.0, -3.0),
(Mosscrawler, _) => (1.5, 14.0, -3.5),
(Sandcrawler, _) => (1.5, 14.0, -3.0),
},
wing_fr: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, 0.0, -4.0),
leg_fc: match (body.species, body.body_type) {
(Tarantula, _) => (1.5, 13.5, -1.5),
(Blackwidow, _) => (2.5, 13.0, -5.5),
(Antlion, _) => (1.5, 8.0, -4.0),
(Hornbeetle, _) => (1.5, 7.5, -3.0),
(Leafbeetle, _) => (1.5, 6.5, -1.5),
(Stagbeetle, _) => (1.5, 7.5, -2.0),
(Weevil, _) => (1.5, 8.5, -2.0),
(Cavespider, _) => (2.5, 12.5, -2.5),
(Moltencrawler, _) => (3.5, 11.0, -3.0),
(Mosscrawler, _) => (2.5, 11.0, -3.5),
(Sandcrawler, _) => (2.5, 11.0, -3.0),
},
wing_bl: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, 0.0, -4.0),
leg_bc: match (body.species, body.body_type) {
(Tarantula, _) => (1.5, 10.5, -1.5),
(Blackwidow, _) => (2.5, 10.0, -5.5),
(Antlion, _) => (7.0, 7.5, -4.0),
(Hornbeetle, _) => (6.0, 6.0, -3.0),
(Leafbeetle, _) => (6.0, 5.0, -2.5),
(Stagbeetle, _) => (6.0, 6.0, -2.0),
(Weevil, _) => (6.0, 5.0, -2.5),
(Cavespider, _) => (2.5, 9.5, -2.5),
(Moltencrawler, _) => (2.5, 8.0, -3.0),
(Mosscrawler, _) => (1.5, 8.0, -3.5),
(Sandcrawler, _) => (1.5, 8.0, -3.0),
},
wing_br: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, 0.0, -4.0),
},
leg_fl: match (body.species, body.body_type) {
(Tarantula, _) => (2.5, -3.0, -4.0),
},
leg_fr: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, -0.5, -7.0),
},
leg_fcl: match (body.species, body.body_type) {
(Tarantula, _) => (2.5, -3.0, -4.0),
},
leg_fcr: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, -0.5, -7.0),
},
leg_bcl: match (body.species, body.body_type) {
(Tarantula, _) => (2.5, -3.0, -4.0),
},
leg_bcr: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, -0.5, -7.0),
},
leg_bl: match (body.species, body.body_type) {
(Tarantula, _) => (2.5, -3.0, -4.0),
},
leg_br: match (body.species, body.body_type) {
(Tarantula, _) => (3.0, -0.5, -7.0),
leg_b: match (body.species, body.body_type) {
(Tarantula, _) => (1.5, 7.5, -1.5),
(Blackwidow, _) => (2.5, 7.0, -5.5),
(Antlion, _) => (1.5, 7.5, -1.5),
(Hornbeetle, _) => (1.5, 7.5, -1.5),
(Leafbeetle, _) => (1.5, 7.5, -1.5),
(Stagbeetle, _) => (1.5, 7.5, -1.5),
(Weevil, _) => (1.5, 7.5, -1.5),
(Cavespider, _) => (2.5, 6.5, -2.5),
(Moltencrawler, _) => (2.5, 7.0, -5.5),
(Mosscrawler, _) => (2.5, 7.0, -5.5),
(Sandcrawler, _) => (2.5, 7.0, -5.5),
},
scaler: match (body.species, body.body_type) {
(Tarantula, _) => (1.0),
(Blackwidow, _) => (1.0),
(Antlion, _) => (1.0),
(Hornbeetle, _) => (1.0),
(Leafbeetle, _) => (1.0),
(Stagbeetle, _) => (1.0),
(Weevil, _) => (1.0),
(Cavespider, _) => (1.0),
(Moltencrawler, _) => (1.0),
(Mosscrawler, _) => (1.0),
(Sandcrawler, _) => (1.0),
},
}
}

View File

@ -68,26 +68,26 @@ impl Animation for RunAnimation {
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1);
next.mandible_l.position = Vec3::new(-s_a.mandible_l.0, s_a.mandible_l.1, s_a.mandible_l.2);
next.mandible_r.position = Vec3::new(s_a.mandible_r.0, s_a.mandible_r.1, s_a.mandible_r.2);
next.mandible_l.position = Vec3::new(-s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.mandible_r.position = Vec3::new(s_a.mandible.0, s_a.mandible.1, s_a.mandible.2);
next.wing_fl.position = Vec3::new(-s_a.wing_fl.0, s_a.wing_fl.1, s_a.wing_fl.2);
next.wing_fr.position = Vec3::new(s_a.wing_fr.0, s_a.wing_fr.1, s_a.wing_fr.2);
next.wing_fl.position = Vec3::new(-s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_fr.position = Vec3::new(s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
next.wing_bl.position = Vec3::new(-s_a.wing_bl.0, s_a.wing_bl.1, s_a.wing_bl.2);
next.wing_br.position = Vec3::new(s_a.wing_br.0, s_a.wing_br.1, s_a.wing_br.2);
next.wing_bl.position = Vec3::new(-s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.wing_br.position = Vec3::new(s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
next.leg_fl.position = Vec3::new(-s_a.leg_fl.0, s_a.leg_fl.1, s_a.leg_fl.2);
next.leg_fr.position = Vec3::new(s_a.leg_fr.0, s_a.leg_fr.1, s_a.leg_fr.2);
next.leg_fl.position = Vec3::new(-s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
next.leg_fr.position = Vec3::new(s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
next.leg_fcl.position = Vec3::new(-s_a.leg_fcl.0, s_a.leg_fcl.1, s_a.leg_fcl.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fcr.0, s_a.leg_fcr.1, s_a.leg_fcr.2);
next.leg_fcl.position = Vec3::new(-s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
next.leg_fcr.position = Vec3::new(s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
next.leg_bcl.position = Vec3::new(-s_a.leg_bcl.0, s_a.leg_bcl.1, s_a.leg_bcl.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bcr.0, s_a.leg_bcr.1, s_a.leg_bcr.2);
next.leg_bcl.position = Vec3::new(-s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
next.leg_bcr.position = Vec3::new(s_a.leg_bc.0, s_a.leg_bc.1, s_a.leg_bc.2);
next.leg_bl.position = Vec3::new(-s_a.leg_bl.0, s_a.leg_bl.1, s_a.leg_bl.2);
next.leg_br.position = Vec3::new(s_a.leg_br.0, s_a.leg_br.1, s_a.leg_br.2);
next.leg_bl.position = Vec3::new(-s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
next.leg_br.position = Vec3::new(s_a.leg_b.0, s_a.leg_b.1, s_a.leg_b.2);
next
}