mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Lantern tweaks, remove unused bones
This commit is contained in:
parent
f81f91162d
commit
2c4c006396
@ -5,11 +5,11 @@
|
||||
),
|
||||
map: {
|
||||
Green0: (
|
||||
vox_spec: ("armor.lantern.green-0", (0.0, 0.0, 0.0)),
|
||||
vox_spec: ("lantern.green-0", (0.0, 0.0, 0.0)),
|
||||
color: None
|
||||
),
|
||||
Black0: (
|
||||
vox_spec: ("armor.lantern.black-0", (0.0, 0.0, 0.0)),
|
||||
vox_spec: ("lantern.black-0", (0.0, 0.0, 0.0)),
|
||||
color: None
|
||||
),
|
||||
},
|
@ -47,7 +47,7 @@ impl BipedLargeSkeleton {
|
||||
impl Skeleton for BipedLargeSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let upper_torso_mat = self.upper_torso.compute_base_matrix();
|
||||
let shoulder_l_mat = self.shoulder_l.compute_base_matrix();
|
||||
let shoulder_r_mat = self.shoulder_r.compute_base_matrix();
|
||||
@ -78,9 +78,6 @@ impl Skeleton for BipedLargeSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ impl BirdMediumSkeleton {
|
||||
impl Skeleton for BirdMediumSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let torso_mat = self.torso.compute_base_matrix();
|
||||
|
||||
[
|
||||
@ -47,9 +47,6 @@ impl Skeleton for BirdMediumSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ impl BirdSmallSkeleton {
|
||||
impl Skeleton for BirdSmallSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let torso_mat = self.torso.compute_base_matrix();
|
||||
|
||||
[
|
||||
@ -51,9 +51,6 @@ impl Skeleton for BirdSmallSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ impl CharacterSkeleton {
|
||||
impl Skeleton for CharacterSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let chest_mat = self.chest.compute_base_matrix();
|
||||
let torso_mat = self.torso.compute_base_matrix();
|
||||
let l_hand_mat = self.l_hand.compute_base_matrix();
|
||||
@ -90,10 +90,7 @@ impl Skeleton for CharacterSkeleton {
|
||||
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),
|
||||
FigureBoneData::new(control_mat),
|
||||
FigureBoneData::new(l_control_mat),
|
||||
FigureBoneData::new(r_control_mat),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ impl Animation for StandAnimation {
|
||||
|
||||
next.lantern.offset = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.lantern.ori = Quaternion::rotation_x(0.0);
|
||||
next.lantern.scale = Vec3::one() * 50.0;
|
||||
next.lantern.scale = Vec3::one() * 1.0;
|
||||
|
||||
next.torso.offset = Vec3::new(0.0, -0.1, 0.1) * skeleton_attr.scaler;
|
||||
next.torso.ori = Quaternion::rotation_x(0.0);
|
||||
|
@ -32,7 +32,7 @@ impl CritterSkeleton {
|
||||
impl Skeleton for CritterSkeleton {
|
||||
type Attr = CritterAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
[
|
||||
FigureBoneData::new(self.head.compute_base_matrix()),
|
||||
FigureBoneData::new(self.chest.compute_base_matrix()),
|
||||
@ -50,9 +50,6 @@ impl Skeleton for CritterSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ impl DragonSkeleton {
|
||||
impl Skeleton for DragonSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let chest_front_mat = self.chest_front.compute_base_matrix();
|
||||
let wing_in_l_mat = self.wing_in_l.compute_base_matrix();
|
||||
let wing_in_r_mat = self.wing_in_r.compute_base_matrix();
|
||||
@ -72,9 +72,6 @@ impl Skeleton for DragonSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ impl FishMediumSkeleton {
|
||||
impl Skeleton for FishMediumSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let torso_mat = self.torso.compute_base_matrix();
|
||||
let rear_mat = self.rear.compute_base_matrix();
|
||||
|
||||
@ -56,9 +56,6 @@ impl Skeleton for FishMediumSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ impl FishSmallSkeleton {
|
||||
impl Skeleton for FishSmallSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let torso_mat = self.torso.compute_base_matrix();
|
||||
|
||||
[
|
||||
@ -47,9 +47,6 @@ impl Skeleton for FishSmallSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ impl FixtureSkeleton {
|
||||
impl Skeleton for FixtureSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
[
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
@ -31,9 +31,6 @@ impl Skeleton for FixtureSkeleton {
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ impl Bone {
|
||||
pub trait Skeleton: Send + Sync + 'static {
|
||||
type Attr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19];
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16];
|
||||
|
||||
/// Change the current skeleton to be more like `target`.
|
||||
fn interpolate(&mut self, target: &Self, dt: f32);
|
||||
|
@ -15,7 +15,7 @@ const SCALE: f32 = 1.0 / 11.0;
|
||||
impl Skeleton for ObjectSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
[
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
@ -33,9 +33,6 @@ impl Skeleton for ObjectSkeleton {
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
FigureBoneData::new(Mat4::scaling_3d(Vec3::broadcast(SCALE))),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ impl QuadrupedMediumSkeleton {
|
||||
impl Skeleton for QuadrupedMediumSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
let ears_mat = self.ears.compute_base_matrix();
|
||||
let head_upper_mat = self.head_upper.compute_base_matrix();
|
||||
let head_lower_mat = self.head_lower.compute_base_matrix();
|
||||
@ -53,9 +53,6 @@ impl Skeleton for QuadrupedMediumSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ impl QuadrupedSmallSkeleton {
|
||||
impl Skeleton for QuadrupedSmallSkeleton {
|
||||
type Attr = SkeletonAttr;
|
||||
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 19] {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
[
|
||||
FigureBoneData::new(self.head.compute_base_matrix()),
|
||||
FigureBoneData::new(self.chest.compute_base_matrix()),
|
||||
@ -44,9 +44,6 @@ impl Skeleton for QuadrupedSmallSkeleton {
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
FigureBoneData::default(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -238,8 +238,8 @@ impl<Skel: Skeleton> FigureModelCache<Skel> {
|
||||
} else {
|
||||
None
|
||||
},
|
||||
Some(humanoid_armor_lantern_spec.mesh_lantern(&body, loadout)),
|
||||
None,
|
||||
Some(humanoid_armor_lantern_spec.mesh_lantern(&body, loadout)),
|
||||
None,
|
||||
]
|
||||
},
|
||||
|
@ -696,8 +696,7 @@ impl HumMainWeaponSpec {
|
||||
// Lantern
|
||||
impl HumArmorLanternSpec {
|
||||
pub fn load_watched(indicator: &mut ReloadIndicator) -> Arc<Self> {
|
||||
assets::load_watched::<Self>("voxygen.voxel.humanoid_armor_lantern_manifest", indicator)
|
||||
.unwrap()
|
||||
assets::load_watched::<Self>("voxygen.voxel.humanoid_lantern_manifest", indicator).unwrap()
|
||||
}
|
||||
|
||||
pub fn mesh_lantern(&self, body: &Body, loadout: &Loadout) -> Mesh<FigurePipeline> {
|
||||
|
Loading…
Reference in New Issue
Block a user