mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Char selection
Former-commit-id: 8da211b00dcd9a550a8f46e79164ece8f5c193e5
This commit is contained in:
parent
db2b823fe1
commit
2e7984ebc3
BIN
assets/voxygen/background/bg_creation.png
(Stored with Git LFS)
BIN
assets/voxygen/background/bg_creation.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/background/bg_selection.png
(Stored with Git LFS)
BIN
assets/voxygen/background/bg_selection.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/divider.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/divider.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/mmap.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/mmap.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/selection.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/selection.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/selection.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/selection.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/selection_frame.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/selection_frame.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/server_frame.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/server_frame.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/settings.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/settings.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/window.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/window.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/window_4.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/window_4.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/window_map.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/window_map.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/window_old.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/window_old.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_blue.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_blue.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_green.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_green.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_orange.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_orange.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_blue.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_blue.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_green.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_green.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_orange.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_orange.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/body.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/body.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_body.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_body.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_lfoot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_lfoot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_rfoot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_rfoot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_tail.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_tail.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingL_in.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingL_in.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingL_out.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingL_out.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingR_in.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingR_in.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingR_out.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingR_out.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragonhead.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragonhead.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/belt.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/belt.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/chest.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/chest.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/foot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/foot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/hand.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/hand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/head.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/head.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/pants.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/pants.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/sword.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/sword.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/belt_female.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/belt_female.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/belt_male.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/belt_male.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/chest_female.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/chest_female.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/chest_male.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/chest_male.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/foot.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/foot.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/hand.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/hand.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/pants_female.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/pants_female.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/pants_male.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/pants_male.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/eyes/eyes_male_1.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/eyes/eyes_male_1.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/head.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/fixture/selection_bg.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/fixture/selection_bg.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/foot_BL.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_BL.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/foot_BR.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_BR.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/foot_FL.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_FL.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/foot_FR.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_FR.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/hand.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/hand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/lionhead.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/lionhead.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/sabremale.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/sabremale.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/shoulder_l.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/shoulder_l.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/shoulder_r.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/shoulder_r.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/shoulders.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/shoulders.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/sword.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/sword.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -28,16 +28,27 @@ pub enum Head {
|
|||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum Chest {
|
pub enum Chest {
|
||||||
Default,
|
Default,
|
||||||
|
Blue,
|
||||||
|
Brown,
|
||||||
|
Dark,
|
||||||
|
Green,
|
||||||
|
Orange,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum Belt {
|
pub enum Belt {
|
||||||
Default,
|
//Default,
|
||||||
|
Dark,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum Pants {
|
pub enum Pants {
|
||||||
Default,
|
Default,
|
||||||
|
Blue,
|
||||||
|
Brown,
|
||||||
|
Dark,
|
||||||
|
Green,
|
||||||
|
Orange,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
@ -48,6 +59,7 @@ pub enum Hand {
|
|||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum Foot {
|
pub enum Foot {
|
||||||
Default,
|
Default,
|
||||||
|
Dark,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
@ -90,7 +102,7 @@ pub enum PigLegR {
|
|||||||
Default,
|
Default,
|
||||||
}
|
}
|
||||||
|
|
||||||
const ALL_RACES: [Race; 6] = [
|
pub const ALL_RACES: [Race; 6] = [
|
||||||
Race::Danari,
|
Race::Danari,
|
||||||
Race::Dwarf,
|
Race::Dwarf,
|
||||||
Race::Elf,
|
Race::Elf,
|
||||||
@ -98,14 +110,31 @@ const ALL_RACES: [Race; 6] = [
|
|||||||
Race::Orc,
|
Race::Orc,
|
||||||
Race::Undead,
|
Race::Undead,
|
||||||
];
|
];
|
||||||
const ALL_BODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified];
|
pub const ALL_BODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified];
|
||||||
const ALL_HEADS: [Head; 1] = [Head::Default];
|
pub const ALL_HEADS: [Head; 1] = [Head::Default];
|
||||||
const ALL_CHESTS: [Chest; 1] = [Chest::Default];
|
pub const ALL_CHESTS: [Chest; 6] = [
|
||||||
const ALL_BELTS: [Belt; 1] = [Belt::Default];
|
Chest::Default,
|
||||||
const ALL_PANTS: [Pants; 1] = [Pants::Default];
|
Chest::Blue,
|
||||||
const ALL_HANDS: [Hand; 1] = [Hand::Default];
|
Chest::Brown,
|
||||||
const ALL_FEET: [Foot; 1] = [Foot::Default];
|
Chest::Dark,
|
||||||
const ALL_WEAPONS: [Weapon; 7] = [
|
Chest::Green,
|
||||||
|
Chest::Orange,
|
||||||
|
];
|
||||||
|
pub const ALL_BELTS: [Belt; 1] = [
|
||||||
|
//Belt::Default,
|
||||||
|
Belt::Dark,
|
||||||
|
];
|
||||||
|
pub const ALL_PANTS: [Pants; 6] = [
|
||||||
|
Pants::Default,
|
||||||
|
Pants::Blue,
|
||||||
|
Pants::Brown,
|
||||||
|
Pants::Dark,
|
||||||
|
Pants::Green,
|
||||||
|
Pants::Orange,
|
||||||
|
];
|
||||||
|
pub const ALL_HANDS: [Hand; 1] = [Hand::Default];
|
||||||
|
pub const ALL_FEET: [Foot; 2] = [Foot::Default, Foot::Dark];
|
||||||
|
pub const ALL_WEAPONS: [Weapon; 7] = [
|
||||||
Weapon::Daggers,
|
Weapon::Daggers,
|
||||||
Weapon::SwordShield,
|
Weapon::SwordShield,
|
||||||
Weapon::Sword,
|
Weapon::Sword,
|
||||||
@ -114,8 +143,8 @@ const ALL_WEAPONS: [Weapon; 7] = [
|
|||||||
Weapon::Bow,
|
Weapon::Bow,
|
||||||
Weapon::Staff,
|
Weapon::Staff,
|
||||||
];
|
];
|
||||||
const ALL_SHOULDERS: [Shoulder; 1] = [Shoulder::Default];
|
pub const ALL_SHOULDERS: [Shoulder; 1] = [Shoulder::Default];
|
||||||
const ALL_DRAW: [Draw; 1] = [Draw::Default];
|
pub const ALL_DRAW: [Draw; 1] = [Draw::Default];
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub struct HumanoidBody {
|
pub struct HumanoidBody {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
trait_alias,
|
trait_alias,
|
||||||
bind_by_move_pattern_guards,
|
bind_by_move_pattern_guards,
|
||||||
option_flattening, // Converts Option<Option<Item>> into Option<Item> TODO: Remove this once this feature becomes stable
|
option_flattening, // Converts Option<Option<Item>> into Option<Item> TODO: Remove this once this feature becomes stable
|
||||||
|
copysign,
|
||||||
)]
|
)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -136,7 +136,6 @@ impl Server {
|
|||||||
body: comp::Body,
|
body: comp::Body,
|
||||||
) {
|
) {
|
||||||
state.write_component(entity, comp::Actor::Character { name, body });
|
state.write_component(entity, comp::Actor::Character { name, body });
|
||||||
state.write_component(entity, comp::Stats::default());
|
|
||||||
state.write_component(entity, comp::phys::Pos(Vec3::new(0.0, 0.0, 64.0)));
|
state.write_component(entity, comp::phys::Pos(Vec3::new(0.0, 0.0, 64.0)));
|
||||||
state.write_component(entity, comp::phys::Vel(Vec3::zero()));
|
state.write_component(entity, comp::phys::Vel(Vec3::zero()));
|
||||||
state.write_component(entity, comp::phys::Dir(Vec3::unit_y()));
|
state.write_component(entity, comp::phys::Dir(Vec3::unit_y()));
|
||||||
|
40
voxygen/src/anim/fixture/mod.rs
Normal file
40
voxygen/src/anim/fixture/mod.rs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Crate
|
||||||
|
use crate::render::FigureBoneData;
|
||||||
|
|
||||||
|
// Local
|
||||||
|
use super::{Bone, Skeleton};
|
||||||
|
|
||||||
|
const SCALE: f32 = 44.0;
|
||||||
|
|
||||||
|
pub struct FixtureSkeleton;
|
||||||
|
|
||||||
|
impl FixtureSkeleton {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Skeleton for FixtureSkeleton {
|
||||||
|
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||||
|
[
|
||||||
|
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()),
|
||||||
|
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()),
|
||||||
|
FigureBoneData::new(vek::Mat4::identity()),
|
||||||
|
FigureBoneData::new(vek::Mat4::identity()),
|
||||||
|
FigureBoneData::new(vek::Mat4::identity()),
|
||||||
|
FigureBoneData::new(vek::Mat4::identity()),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
fn interpolate(&mut self, target: &Self) {}
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
pub mod character;
|
pub mod character;
|
||||||
|
pub mod fixture;
|
||||||
pub mod quadruped;
|
pub mod quadruped;
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
use vek::*;
|
use vek::*;
|
||||||
|
|
||||||
|
@ -111,14 +111,14 @@ impl<'a> Widget for EscMenu<'a> {
|
|||||||
.w_h(170.0, 50.0)
|
.w_h(170.0, 50.0)
|
||||||
.hover_image(self.imgs.button_hover)
|
.hover_image(self.imgs.button_hover)
|
||||||
.press_image(self.imgs.button_press)
|
.press_image(self.imgs.button_press)
|
||||||
.label("Servers")
|
.label("Characters")
|
||||||
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
||||||
.label_color(TEXT_COLOR)
|
.label_color(TEXT_COLOR)
|
||||||
.label_font_size(17)
|
.label_font_size(17)
|
||||||
.set(state.ids.menu_button_3, ui)
|
.set(state.ids.menu_button_3, ui)
|
||||||
.was_clicked()
|
.was_clicked()
|
||||||
{
|
{
|
||||||
// TODO: Show servers window (needed in-game?).
|
return Some(Event::Logout); // TODO: Open Character Selection
|
||||||
};
|
};
|
||||||
// Logout
|
// Logout
|
||||||
if Button::image(self.imgs.button)
|
if Button::image(self.imgs.button)
|
||||||
|
@ -127,7 +127,6 @@ image_ids! {
|
|||||||
charwindow_gradient:"/voxygen/element/misc_bg/charwindow.png",
|
charwindow_gradient:"/voxygen/element/misc_bg/charwindow.png",
|
||||||
|
|
||||||
// Spell Book Window
|
// Spell Book Window
|
||||||
spellbook_bg: "/voxygen/element/misc_bg/small_bg.png",
|
|
||||||
spellbook_icon: "/voxygen/element/icons/spellbook.png",
|
spellbook_icon: "/voxygen/element/icons/spellbook.png",
|
||||||
|
|
||||||
// Bag
|
// Bag
|
||||||
@ -138,7 +137,6 @@ image_ids! {
|
|||||||
bag_open_hover: "/voxygen/element/buttons/bag/open_hover.png",
|
bag_open_hover: "/voxygen/element/buttons/bag/open_hover.png",
|
||||||
bag_open_press: "/voxygen/element/buttons/bag/open_press.png",
|
bag_open_press: "/voxygen/element/buttons/bag/open_press.png",
|
||||||
|
|
||||||
map_bg: "/voxygen/element/misc_bg/small_bg.png",
|
|
||||||
map_icon: "/voxygen/element/icons/map.png",
|
map_icon: "/voxygen/element/icons/map.png",
|
||||||
|
|
||||||
grid_button: "/voxygen/element/buttons/border.png",
|
grid_button: "/voxygen/element/buttons/border.png",
|
||||||
@ -159,10 +157,6 @@ image_ids! {
|
|||||||
|
|
||||||
window_frame_2: "/voxygen/element/frames/window_2.png",
|
window_frame_2: "/voxygen/element/frames/window_2.png",
|
||||||
|
|
||||||
settings_bg: "/voxygen/element/frames/settings.png",
|
|
||||||
settings_icon: "/voxygen/element/icons/settings.png",
|
|
||||||
settings_button_mo: "/voxygen/element/buttons/blue_mo.png",
|
|
||||||
|
|
||||||
// Char Window
|
// Char Window
|
||||||
charwindow: "/voxygen/element/misc_bg/charwindow.png",
|
charwindow: "/voxygen/element/misc_bg/charwindow.png",
|
||||||
charwindow_icon: "/voxygen/element/icons/charwindow.png",
|
charwindow_icon: "/voxygen/element/icons/charwindow.png",
|
||||||
@ -173,17 +167,12 @@ image_ids! {
|
|||||||
progress: "/voxygen/element/misc_bg/progress.png",
|
progress: "/voxygen/element/misc_bg/progress.png",
|
||||||
|
|
||||||
// Quest-Log Window
|
// Quest-Log Window
|
||||||
questlog_bg: "/voxygen/element/misc_bg/small_bg.png",
|
|
||||||
questlog_icon: "/voxygen/element/icons/questlog.png",
|
questlog_icon: "/voxygen/element/icons/questlog.png",
|
||||||
|
|
||||||
button_blue_mo: "/voxygen/element/buttons/blue_mo.png",
|
|
||||||
button_blue_press: "/voxygen/element/buttons/blue_press.png",
|
|
||||||
|
|
||||||
// Window BG
|
// Window BG
|
||||||
window_bg: "/voxygen/element/misc_bg/window_bg.png",
|
window_bg: "/voxygen/element/misc_bg/window_bg.png",
|
||||||
|
|
||||||
// Social Window
|
// Social Window
|
||||||
social_bg: "/voxygen/element/misc_bg/small_bg.png",
|
|
||||||
social_icon: "/voxygen/element/icons/social.png",
|
social_icon: "/voxygen/element/icons/social.png",
|
||||||
|
|
||||||
|
|
||||||
|
@ -229,8 +229,8 @@ impl Hud {
|
|||||||
new_messages: VecDeque::new(),
|
new_messages: VecDeque::new(),
|
||||||
inventory_space: 0,
|
inventory_space: 0,
|
||||||
show: Show {
|
show: Show {
|
||||||
help: true,
|
help: false,
|
||||||
debug: false,
|
debug: true,
|
||||||
bag: false,
|
bag: false,
|
||||||
esc_menu: false,
|
esc_menu: false,
|
||||||
open_windows: Windows::None,
|
open_windows: Windows::None,
|
||||||
|
@ -2,6 +2,7 @@ mod scene;
|
|||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
render::Renderer,
|
||||||
session::SessionState,
|
session::SessionState,
|
||||||
window::{Event, Window},
|
window::{Event, Window},
|
||||||
Direction, GlobalState, PlayState, PlayStateResult,
|
Direction, GlobalState, PlayState, PlayStateResult,
|
||||||
@ -78,7 +79,7 @@ impl PlayState for CharSelectionState {
|
|||||||
.postbox
|
.postbox
|
||||||
.send_message(ClientMsg::Character {
|
.send_message(ClientMsg::Character {
|
||||||
name: self.char_selection_ui.character_name.clone(),
|
name: self.char_selection_ui.character_name.clone(),
|
||||||
body: comp::Body::Humanoid(self.char_selection_ui.character_body), //body: comp::Body::Quadruped(comp::QuadrupedBody::random()),
|
body: comp::Body::Humanoid(self.char_selection_ui.character_body),
|
||||||
});
|
});
|
||||||
return PlayStateResult::Switch(Box::new(SessionState::new(
|
return PlayStateResult::Switch(Box::new(SessionState::new(
|
||||||
&mut global_state.window,
|
&mut global_state.window,
|
||||||
@ -93,9 +94,12 @@ impl PlayState for CharSelectionState {
|
|||||||
self.scene
|
self.scene
|
||||||
.maintain(global_state.window.renderer_mut(), &self.client.borrow());
|
.maintain(global_state.window.renderer_mut(), &self.client.borrow());
|
||||||
|
|
||||||
// Render the scene.
|
// Render the scene
|
||||||
self.scene
|
self.scene.render(
|
||||||
.render(global_state.window.renderer_mut(), &self.client.borrow());
|
global_state.window.renderer_mut(),
|
||||||
|
&self.client.borrow(),
|
||||||
|
self.char_selection_ui.character_body,
|
||||||
|
);
|
||||||
|
|
||||||
// Draw the UI to the screen.
|
// Draw the UI to the screen.
|
||||||
self.char_selection_ui
|
self.char_selection_ui
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
anim::{
|
anim::{
|
||||||
character::{CharacterSkeleton, IdleAnimation},
|
character::{CharacterSkeleton, IdleAnimation},
|
||||||
|
fixture::FixtureSkeleton,
|
||||||
Animation, Skeleton,
|
Animation, Skeleton,
|
||||||
},
|
},
|
||||||
render::{
|
render::{
|
||||||
@ -13,6 +14,7 @@ use crate::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
use client::Client;
|
use client::Client;
|
||||||
|
use common::comp::HumanoidBody;
|
||||||
use common::{comp, figure::Segment};
|
use common::{comp, figure::Segment};
|
||||||
use vek::*;
|
use vek::*;
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ pub struct Scene {
|
|||||||
skybox: Skybox,
|
skybox: Skybox,
|
||||||
postprocess: PostProcess,
|
postprocess: PostProcess,
|
||||||
backdrop_model: Model<FigurePipeline>,
|
backdrop_model: Model<FigurePipeline>,
|
||||||
backdrop_state: FigureState<CharacterSkeleton>,
|
backdrop_state: FigureState<FixtureSkeleton>,
|
||||||
|
|
||||||
figure_model_cache: FigureModelCache,
|
figure_model_cache: FigureModelCache,
|
||||||
figure_state: FigureState<CharacterSkeleton>,
|
figure_state: FigureState<CharacterSkeleton>,
|
||||||
@ -61,18 +63,21 @@ impl Scene {
|
|||||||
figure_state: FigureState::new(renderer, CharacterSkeleton::new()),
|
figure_state: FigureState::new(renderer, CharacterSkeleton::new()),
|
||||||
|
|
||||||
backdrop_model: renderer
|
backdrop_model: renderer
|
||||||
.create_model(&FigureModelCache::load_mesh("knight.vox", Vec3::zero()))
|
.create_model(&FigureModelCache::load_mesh(
|
||||||
|
"fixture/selection_bg.vox",
|
||||||
|
Vec3::new(-55.0, -50.0, -1.0),
|
||||||
|
))
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
backdrop_state: FigureState::new(renderer, CharacterSkeleton::new()),
|
backdrop_state: FigureState::new(renderer, FixtureSkeleton::new()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn maintain(&mut self, renderer: &mut Renderer, client: &Client) {
|
pub fn maintain(&mut self, renderer: &mut Renderer, client: &Client) {
|
||||||
self.camera.set_focus_pos(Vec3::unit_z() * 1.75);
|
self.camera.set_focus_pos(Vec3::unit_z() * 2.0);
|
||||||
self.camera.update(client.state().get_time());
|
self.camera.update(client.state().get_time());
|
||||||
self.camera.set_distance(4.0);
|
self.camera.set_distance(4.2);
|
||||||
self.camera
|
self.camera
|
||||||
.set_orientation(Vec3::new(client.state().get_time() as f32 * 0.2, 0.3, 0.0));
|
.set_orientation(Vec3::new(client.state().get_time() as f32 * 0.0, 0.0, 0.0));
|
||||||
|
|
||||||
let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents(client);
|
let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents(client);
|
||||||
|
|
||||||
@ -107,14 +112,15 @@ impl Scene {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render(&mut self, renderer: &mut Renderer, client: &Client) {
|
pub fn render(&mut self, renderer: &mut Renderer, client: &Client, body: HumanoidBody) {
|
||||||
renderer.render_skybox(&self.skybox.model, &self.globals, &self.skybox.locals);
|
renderer.render_skybox(&self.skybox.model, &self.globals, &self.skybox.locals);
|
||||||
|
|
||||||
let model = self.figure_model_cache.get_or_create_model(
|
let model = self.figure_model_cache.get_or_create_model(
|
||||||
renderer,
|
renderer,
|
||||||
comp::Body::Humanoid(comp::HumanoidBody::random()),
|
comp::Body::Humanoid(body),
|
||||||
client.get_tick(),
|
client.get_tick(),
|
||||||
);
|
);
|
||||||
|
|
||||||
renderer.render_figure(
|
renderer.render_figure(
|
||||||
model,
|
model,
|
||||||
&self.globals,
|
&self.globals,
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -137,6 +137,7 @@ impl MainMenuUi {
|
|||||||
Text::new(version)
|
Text::new(version)
|
||||||
.top_left_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
.top_left_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
||||||
.font_size(14)
|
.font_size(14)
|
||||||
|
.font_id(self.fonts.opensans)
|
||||||
.color(TEXT_COLOR)
|
.color(TEXT_COLOR)
|
||||||
.set(self.ids.version, ui_widgets);
|
.set(self.ids.version, ui_widgets);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ impl Camera {
|
|||||||
ori: Vec3::zero(),
|
ori: Vec3::zero(),
|
||||||
tgt_dist: 10.0,
|
tgt_dist: 10.0,
|
||||||
dist: 10.0,
|
dist: 10.0,
|
||||||
fov: 1.3,
|
fov: 1.1,
|
||||||
aspect,
|
aspect,
|
||||||
last_time: None,
|
last_time: None,
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ impl FigureModelCache {
|
|||||||
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match head {
|
match head {
|
||||||
Head::Default => "head.vox",
|
Head::Default => "figure/head.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-7.0, -5.5, -6.0),
|
Vec3::new(-7.0, -5.5, -6.0),
|
||||||
)
|
)
|
||||||
@ -141,7 +141,12 @@ impl FigureModelCache {
|
|||||||
fn load_chest(chest: Chest) -> Mesh<FigurePipeline> {
|
fn load_chest(chest: Chest) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match chest {
|
match chest {
|
||||||
Chest::Default => "chest.vox",
|
Chest::Default => "figure/body/chest_male.vox",
|
||||||
|
Chest::Blue => "armor/chest/chest_blue.vox",
|
||||||
|
Chest::Brown => "armor/chest/chest_brown.vox",
|
||||||
|
Chest::Dark => "armor/chest/chest_dark.vox",
|
||||||
|
Chest::Green => "armor/chest/chest_green.vox",
|
||||||
|
Chest::Orange => "armor/chest/chest_orange.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-6.0, -3.5, 0.0),
|
Vec3::new(-6.0, -3.5, 0.0),
|
||||||
)
|
)
|
||||||
@ -150,7 +155,8 @@ impl FigureModelCache {
|
|||||||
fn load_belt(belt: Belt) -> Mesh<FigurePipeline> {
|
fn load_belt(belt: Belt) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match belt {
|
match belt {
|
||||||
Belt::Default => "belt.vox",
|
//Belt::Default => "figure/body/belt_male.vox",
|
||||||
|
Belt::Dark => "armor/belt/belt_dark.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-5.0, -3.5, 0.0),
|
Vec3::new(-5.0, -3.5, 0.0),
|
||||||
)
|
)
|
||||||
@ -159,7 +165,12 @@ impl FigureModelCache {
|
|||||||
fn load_pants(pants: Pants) -> Mesh<FigurePipeline> {
|
fn load_pants(pants: Pants) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pants {
|
match pants {
|
||||||
Pants::Default => "pants.vox",
|
Pants::Default => "figure/body/pants_male.vox",
|
||||||
|
Pants::Blue => "armor/pants/pants_blue.vox",
|
||||||
|
Pants::Brown => "armor/pants/pants_brown.vox",
|
||||||
|
Pants::Dark => "armor/pants/pants_dark.vox",
|
||||||
|
Pants::Green => "armor/pants/pants_green.vox",
|
||||||
|
Pants::Orange => "armor/pants/pants_orange.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-5.0, -3.5, 0.0),
|
Vec3::new(-5.0, -3.5, 0.0),
|
||||||
)
|
)
|
||||||
@ -168,7 +179,7 @@ impl FigureModelCache {
|
|||||||
fn load_left_hand(hand: Hand) -> Mesh<FigurePipeline> {
|
fn load_left_hand(hand: Hand) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match hand {
|
match hand {
|
||||||
Hand::Default => "hand.vox",
|
Hand::Default => "figure/body/hand.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(2.0, 0.0, -7.0),
|
Vec3::new(2.0, 0.0, -7.0),
|
||||||
)
|
)
|
||||||
@ -177,7 +188,7 @@ impl FigureModelCache {
|
|||||||
fn load_right_hand(hand: Hand) -> Mesh<FigurePipeline> {
|
fn load_right_hand(hand: Hand) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match hand {
|
match hand {
|
||||||
Hand::Default => "hand.vox",
|
Hand::Default => "figure/body/hand.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(2.0, 0.0, -7.0),
|
Vec3::new(2.0, 0.0, -7.0),
|
||||||
)
|
)
|
||||||
@ -186,7 +197,8 @@ impl FigureModelCache {
|
|||||||
fn load_left_foot(foot: Foot) -> Mesh<FigurePipeline> {
|
fn load_left_foot(foot: Foot) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match foot {
|
match foot {
|
||||||
Foot::Default => "foot.vox",
|
Foot::Default => "figure/body/foot.vox",
|
||||||
|
Foot::Dark => "armor/foot/foot_dark.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(2.5, -3.5, -9.0),
|
Vec3::new(2.5, -3.5, -9.0),
|
||||||
)
|
)
|
||||||
@ -195,7 +207,8 @@ impl FigureModelCache {
|
|||||||
fn load_right_foot(foot: Foot) -> Mesh<FigurePipeline> {
|
fn load_right_foot(foot: Foot) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match foot {
|
match foot {
|
||||||
Foot::Default => "foot.vox",
|
Foot::Default => "figure/body/foot.vox",
|
||||||
|
Foot::Dark => "armor/foot/foot_dark.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(2.5, -3.5, -9.0),
|
Vec3::new(2.5, -3.5, -9.0),
|
||||||
)
|
)
|
||||||
@ -204,9 +217,9 @@ impl FigureModelCache {
|
|||||||
fn load_weapon(weapon: Weapon) -> Mesh<FigurePipeline> {
|
fn load_weapon(weapon: Weapon) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match weapon {
|
match weapon {
|
||||||
Weapon::Sword => "sword.vox",
|
Weapon::Sword => "weapon/sword/sword_wood_2h.vox",
|
||||||
// TODO actually match against other weapons and set the right model.
|
// TODO actually match against other weapons and set the right model
|
||||||
_ => "sword.vox",
|
_ => "weapon/sword/sword_wood_2h.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, 0.0, -4.0),
|
Vec3::new(0.0, 0.0, -4.0),
|
||||||
)
|
)
|
||||||
@ -215,24 +228,24 @@ impl FigureModelCache {
|
|||||||
fn load_left_shoulder(shoulder: Shoulder) -> Mesh<FigurePipeline> {
|
fn load_left_shoulder(shoulder: Shoulder) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match shoulder {
|
match shoulder {
|
||||||
Shoulder::Default => "shoulder_l.vox",
|
Shoulder::Default => "armor/shoulder/shoulder_l_brown.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(2.5, 0.0, 0.0),
|
Vec3::new(2.5, -0.5, 0.0),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_right_shoulder(shoulder: Shoulder) -> Mesh<FigurePipeline> {
|
fn load_right_shoulder(shoulder: Shoulder) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match shoulder {
|
match shoulder {
|
||||||
Shoulder::Default => "shoulder_r.vox",
|
Shoulder::Default => "armor/shoulder/shoulder_r_brown.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(2.5, 0.0, 0.0),
|
Vec3::new(2.5, -0.5, 0.0),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
fn load_draw(draw: Draw) -> Mesh<FigurePipeline> {
|
fn load_draw(draw: Draw) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match draw {
|
match draw {
|
||||||
Draw::Default => "glider.vox",
|
Draw::Default => "object/glider.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-26.0, -26.0, -5.0),
|
Vec3::new(-26.0, -26.0, -5.0),
|
||||||
)
|
)
|
||||||
@ -241,7 +254,7 @@ impl FigureModelCache {
|
|||||||
fn load_pig_head(pig_head: PigHead) -> Mesh<FigurePipeline> {
|
fn load_pig_head(pig_head: PigHead) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pig_head {
|
match pig_head {
|
||||||
PigHead::Default => "pighead.vox",
|
PigHead::Default => "npc/pig_purple/pighead.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-6.0, 4.5, 3.0),
|
Vec3::new(-6.0, 4.5, 3.0),
|
||||||
)
|
)
|
||||||
@ -250,7 +263,7 @@ impl FigureModelCache {
|
|||||||
fn load_pig_chest(pig_chest: PigChest) -> Mesh<FigurePipeline> {
|
fn load_pig_chest(pig_chest: PigChest) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pig_chest {
|
match pig_chest {
|
||||||
PigChest::Default => "pigchest.vox",
|
PigChest::Default => "npc/pig_purple/pigchest.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-5.0, 4.5, 0.0),
|
Vec3::new(-5.0, 4.5, 0.0),
|
||||||
)
|
)
|
||||||
@ -259,7 +272,7 @@ impl FigureModelCache {
|
|||||||
fn load_pig_leg_lf(pig_leg_l: PigLegL) -> Mesh<FigurePipeline> {
|
fn load_pig_leg_lf(pig_leg_l: PigLegL) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pig_leg_l {
|
match pig_leg_l {
|
||||||
PigLegL::Default => "pigleg_l.vox",
|
PigLegL::Default => "npc/pig_purple/pigleg_l.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, -1.0, -1.5),
|
Vec3::new(0.0, -1.0, -1.5),
|
||||||
)
|
)
|
||||||
@ -268,7 +281,7 @@ impl FigureModelCache {
|
|||||||
fn load_pig_leg_rf(pig_leg_r: PigLegR) -> Mesh<FigurePipeline> {
|
fn load_pig_leg_rf(pig_leg_r: PigLegR) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pig_leg_r {
|
match pig_leg_r {
|
||||||
PigLegR::Default => "pigleg_r.vox",
|
PigLegR::Default => "npc/pig_purple/pigleg_r.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, -1.0, -1.5),
|
Vec3::new(0.0, -1.0, -1.5),
|
||||||
)
|
)
|
||||||
@ -277,7 +290,7 @@ impl FigureModelCache {
|
|||||||
fn load_pig_leg_lb(pigleg_l: PigLegL) -> Mesh<FigurePipeline> {
|
fn load_pig_leg_lb(pigleg_l: PigLegL) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pigleg_l {
|
match pigleg_l {
|
||||||
PigLegL::Default => "pigleg_l.vox",
|
PigLegL::Default => "npc/pig_purple/pigleg_l.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, -1.0, -1.5),
|
Vec3::new(0.0, -1.0, -1.5),
|
||||||
)
|
)
|
||||||
@ -286,7 +299,7 @@ impl FigureModelCache {
|
|||||||
fn load_pig_leg_rb(pig_leg_r: PigLegR) -> Mesh<FigurePipeline> {
|
fn load_pig_leg_rb(pig_leg_r: PigLegR) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pig_leg_r {
|
match pig_leg_r {
|
||||||
PigLegR::Default => "pigleg_r.vox",
|
PigLegR::Default => "npc/pig_purple/pigleg_r.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, -1.0, -1.5),
|
Vec3::new(0.0, -1.0, -1.5),
|
||||||
)
|
)
|
||||||
|
@ -108,7 +108,7 @@ impl FigureModelCache {
|
|||||||
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match head {
|
match head {
|
||||||
Head::Default => "head.vox",
|
Head::Default => "figure/head.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(-7.0, -5.5, -6.0),
|
Vec3::new(-7.0, -5.5, -6.0),
|
||||||
)
|
)
|
||||||
|
@ -100,7 +100,7 @@ impl FigureModelCache {
|
|||||||
|
|
||||||
// TODO: Don't make this public.
|
// TODO: Don't make this public.
|
||||||
pub fn load_mesh(filename: &str, position: Vec3<f32>) -> Mesh<FigurePipeline> {
|
pub fn load_mesh(filename: &str, position: Vec3<f32>) -> Mesh<FigurePipeline> {
|
||||||
let full_path: String = ["/voxygen/voxel/", filename].concat();
|
let full_path: String = ["/voxygen/voxel/npc/", filename].concat();
|
||||||
Segment::from(assets::load_expect::<DotVoxData>(full_path.as_str()).as_ref())
|
Segment::from(assets::load_expect::<DotVoxData>(full_path.as_str()).as_ref())
|
||||||
.generate_mesh(position)
|
.generate_mesh(position)
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ impl FigureModelCache {
|
|||||||
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match head {
|
match head {
|
||||||
Head::Default => "pighead.vox",
|
Head::Default => "pig_purple/pighead.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, 0.0, 0.0),
|
Vec3::new(0.0, 0.0, 0.0),
|
||||||
)
|
)
|
||||||
@ -117,7 +117,7 @@ impl FigureModelCache {
|
|||||||
fn load_chest(chest: Chest) -> Mesh<FigurePipeline> {
|
fn load_chest(chest: Chest) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match chest {
|
match chest {
|
||||||
Chest::Default => "pigchest.vox",
|
Chest::Default => "pig_purple/pigchest.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, 0.0, 0.0),
|
Vec3::new(0.0, 0.0, 0.0),
|
||||||
)
|
)
|
||||||
@ -126,7 +126,7 @@ impl FigureModelCache {
|
|||||||
fn load_leg_lf(leg_l: Leg_l) -> Mesh<FigurePipeline> {
|
fn load_leg_lf(leg_l: Leg_l) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match belt {
|
match belt {
|
||||||
Belt::Default => "pigleg_l.vox",
|
Belt::Default => "pig_purple/pigleg_l.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, 0.0, 0.0),
|
Vec3::new(0.0, 0.0, 0.0),
|
||||||
)
|
)
|
||||||
@ -135,7 +135,7 @@ impl FigureModelCache {
|
|||||||
fn load_leg_rf(leg_r: Leg_r) -> Mesh<FigurePipeline> {
|
fn load_leg_rf(leg_r: Leg_r) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match pants {
|
match pants {
|
||||||
Pants::Default => "pigleg_r.vox",
|
Pants::Default => "pig_purple/pigleg_r.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, 0.0, 0.0),
|
Vec3::new(0.0, 0.0, 0.0),
|
||||||
)
|
)
|
||||||
@ -144,7 +144,7 @@ impl FigureModelCache {
|
|||||||
fn load_leg_lb(leg_l: Leg_l) -> Mesh<FigurePipeline> {
|
fn load_leg_lb(leg_l: Leg_l) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match hand {
|
match hand {
|
||||||
Hand::Default => "pigleg_l.vox",
|
Hand::Default => "pig_purple/pigleg_l.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, 0.0, 0.0),
|
Vec3::new(0.0, 0.0, 0.0),
|
||||||
)
|
)
|
||||||
@ -153,7 +153,7 @@ impl FigureModelCache {
|
|||||||
fn load_leg_rb(leg_r: Leg_r) -> Mesh<FigurePipeline> {
|
fn load_leg_rb(leg_r: Leg_r) -> Mesh<FigurePipeline> {
|
||||||
Self::load_mesh(
|
Self::load_mesh(
|
||||||
match hand {
|
match hand {
|
||||||
Hand::Default => "pigleg_r.vox",
|
Hand::Default => "pig_purple/pigleg_r.vox",
|
||||||
},
|
},
|
||||||
Vec3::new(0.0, 0.0, 0.0),
|
Vec3::new(0.0, 0.0, 0.0),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user