mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
single file orichalcum armor
This commit is contained in:
parent
4da41b0dd0
commit
8d2b9b9a9c
@ -2769,32 +2769,32 @@
|
||||
),
|
||||
//Orichalcum Set
|
||||
Simple("common.items.armor.mail.orichalcum.chest"): VoxTrans(
|
||||
"voxel.armor.mail.orichalcum.chest",
|
||||
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 1.1,
|
||||
"voxel.armor.mail.orichalcum",
|
||||
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 1.1, 0,
|
||||
),
|
||||
Simple("common.items.armor.mail.orichalcum.pants"): VoxTrans(
|
||||
"voxel.armor.mail.orichalcum.pants",
|
||||
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
||||
"voxel.armor.mail.orichalcum",
|
||||
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 0.9, 1,
|
||||
),
|
||||
Simple("common.items.armor.mail.orichalcum.belt"): VoxTrans(
|
||||
"voxel.armor.mail.orichalcum.belt",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
||||
"voxel.armor.mail.orichalcum",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 2,
|
||||
),
|
||||
Simple("common.items.armor.mail.orichalcum.foot"): VoxTrans(
|
||||
"voxel.armor.mail.orichalcum.foot",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
||||
"voxel.armor.mail.orichalcum",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 3,
|
||||
),
|
||||
Simple("common.items.armor.mail.orichalcum.hand"): VoxTrans(
|
||||
"voxel.armor.mail.orichalcum.hand",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
||||
"voxel.armor.mail.orichalcum",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 4,
|
||||
),
|
||||
Simple("common.items.armor.mail.orichalcum.shoulder"): VoxTrans(
|
||||
"voxel.armor.mail.orichalcum.shoulder",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 1.0,
|
||||
"voxel.armor.mail.orichalcum",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 1.0, 5,
|
||||
),
|
||||
Simple("common.items.armor.mail.orichalcum.back"): VoxTrans(
|
||||
"voxel.armor.mail.orichalcum.back",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
||||
"voxel.armor.mail.orichalcum",
|
||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 6,
|
||||
),
|
||||
//misc
|
||||
Simple("common.items.armor.misc.pants.hunting"): VoxTrans(
|
||||
|
BIN
assets/voxygen/voxel/armor/mail/orichalcum.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/mail/orichalcum.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/back.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/back.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/belt.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/belt.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/chest.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/chest.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/foot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/foot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/hand.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/hand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/pants.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/pants.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/shoulder.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/shoulder.vox
(Stored with Git LFS)
Binary file not shown.
@ -137,7 +137,7 @@
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.mail.orichalcum.back": (
|
||||
vox_spec: ("armor.mail.orichalcum.back", (-5.0, -4.5, -12.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-5.0, -4.5, -12.0), 6),
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.merchant.back": (
|
||||
|
@ -173,7 +173,7 @@
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.mail.orichalcum.belt":(
|
||||
vox_spec: ("armor.mail.orichalcum.belt", (-4.0, -3.5, 1.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-4.0, -3.5, 1.0), 2),
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.cardinal.belt": (
|
||||
|
@ -243,7 +243,7 @@
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.mail.orichalcum.chest": (
|
||||
vox_spec: ("armor.mail.orichalcum.chest", (-7.0, -4.0, 1.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-7.0, -4.0, 1.0), 0),
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.cardinal.chest": (
|
||||
|
@ -161,7 +161,7 @@
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.mail.orichalcum.foot": (
|
||||
vox_spec: ("armor.mail.orichalcum.foot", (-2.5, -3.5, -2.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-2.5, -3.5, -2.0), 3),
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.cardinal.foot": (
|
||||
|
@ -382,11 +382,11 @@
|
||||
),
|
||||
"common.items.armor.mail.orichalcum.hand": (
|
||||
left: (
|
||||
vox_spec: ("armor.mail.orichalcum.hand", (-4.5, -2.0, -4.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-4.5, -2.0, -4.0), 4),
|
||||
color: None
|
||||
),
|
||||
right: (
|
||||
vox_spec: ("armor.mail.orichalcum.hand", (-1.5, -2.0, -4.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-1.5, -2.0, -4.0), 4),
|
||||
color: None
|
||||
)
|
||||
),
|
||||
|
@ -201,7 +201,7 @@
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.mail.orichalcum.pants": (
|
||||
vox_spec: ("armor.mail.orichalcum.pants", (-6.0, -4.0, 0.5)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-6.0, -4.0, 0.5), 1),
|
||||
color: None
|
||||
),
|
||||
"common.items.armor.cardinal.pants": (
|
||||
|
@ -453,11 +453,11 @@
|
||||
),
|
||||
"common.items.armor.mail.orichalcum.shoulder": (
|
||||
left: (
|
||||
vox_spec: ("armor.mail.orichalcum.shoulder", (-7.5, -3.0 , -2.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-7.5, -3.0 , -2.0), 5),
|
||||
color: None
|
||||
),
|
||||
right: (
|
||||
vox_spec: ("armor.mail.orichalcum.shoulder", (-1.5, -3.0, -2.0)),
|
||||
vox_spec: ("armor.mail.orichalcum", (-1.5, -3.0, -2.0), 5),
|
||||
color: None
|
||||
)
|
||||
),
|
||||
|
@ -20,8 +20,8 @@ pub fn main() {
|
||||
let manifest = ItemImagesSpec::load_expect("voxygen.item_image_manifest");
|
||||
for (_, spec) in manifest.read().0.iter() {
|
||||
match spec {
|
||||
ImageSpec::Vox(specifier) => voxel_to_png(&specifier, Transform::default(), args.scale),
|
||||
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom) => voxel_to_png(
|
||||
ImageSpec::Vox(specifier, model_index) => voxel_to_png(&specifier, Transform::default(), args.scale, model_index),
|
||||
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom, model_index) => voxel_to_png(
|
||||
&specifier,
|
||||
Transform {
|
||||
ori: Quaternion::rotation_x(rot_x * std::f32::consts::PI / 180.0)
|
||||
@ -36,6 +36,7 @@ pub fn main() {
|
||||
stretch: false,
|
||||
},
|
||||
args.scale,
|
||||
model_index,
|
||||
),
|
||||
ImageSpec::Png(specifier) => {
|
||||
println!("Skip png image {}", specifier);
|
||||
@ -45,7 +46,7 @@ pub fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
fn voxel_to_png(specifier: &String, transform: Transform, scale: u32) {
|
||||
fn voxel_to_png(specifier: &String, transform: Transform, scale: u32, model_index: u32) {
|
||||
let voxel = match DotVoxAsset::load(&format!("voxygen.{}", specifier)) {
|
||||
Ok(dot_vox) => dot_vox,
|
||||
Err(err) => {
|
||||
@ -56,7 +57,7 @@ fn voxel_to_png(specifier: &String, transform: Transform, scale: u32) {
|
||||
let dot_vox_data = &voxel.read().0;
|
||||
let model_size = dot_vox_data
|
||||
.models
|
||||
.get(0)
|
||||
.get(model_index)
|
||||
.expect("Error getting model from voxel")
|
||||
.size;
|
||||
let ori_mat = Mat4::from(transform.ori);
|
||||
|
@ -20,24 +20,24 @@ pub fn animate_by_pulse(ids: &[Id], pulse: f32) -> Id {
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub enum ImageSpec {
|
||||
Png(String),
|
||||
Vox(String),
|
||||
// (specifier, offset, (axis, 2 * angle / pi), zoom)
|
||||
VoxTrans(String, [f32; 3], [f32; 3], f32),
|
||||
Vox(String, #[serde(default)] u32),
|
||||
// (specifier, offset, (axis, 2 * angle / pi), zoom, model_index)
|
||||
VoxTrans(String, [f32; 3], [f32; 3], f32, #[serde(default)] u32),
|
||||
}
|
||||
impl ImageSpec {
|
||||
fn create_graphic(&self) -> Graphic {
|
||||
match self {
|
||||
ImageSpec::Png(specifier) => Graphic::Image(graceful_load_img(specifier), None),
|
||||
ImageSpec::Vox(specifier) => Graphic::Voxel(
|
||||
graceful_load_segment_no_skin(specifier),
|
||||
ImageSpec::Vox(specifier, model_index) => Graphic::Voxel(
|
||||
graceful_load_segment_no_skin(specifier, *model_index),
|
||||
Transform {
|
||||
stretch: false,
|
||||
..Default::default()
|
||||
},
|
||||
SampleStrat::None,
|
||||
),
|
||||
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom) => Graphic::Voxel(
|
||||
graceful_load_segment_no_skin(specifier),
|
||||
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom, model_index) => Graphic::Voxel(
|
||||
graceful_load_segment_no_skin(specifier, *model_index),
|
||||
Transform {
|
||||
ori: Quaternion::rotation_x(rot_x * std::f32::consts::PI / 180.0)
|
||||
.rotated_y(rot_y * std::f32::consts::PI / 180.0)
|
||||
@ -163,9 +163,9 @@ fn graceful_load_img(specifier: &str) -> Arc<DynamicImage> {
|
||||
handle.read().to_image()
|
||||
}
|
||||
|
||||
fn graceful_load_segment_no_skin(specifier: &str) -> Arc<Segment> {
|
||||
fn graceful_load_segment_no_skin(specifier: &str, model_index: u32) -> Arc<Segment> {
|
||||
use common::figure::{mat_cell::MatCell, MatSegment};
|
||||
let mat_seg = MatSegment::from(&graceful_load_vox(specifier).read().0);
|
||||
let mat_seg = MatSegment::from((&graceful_load_vox(specifier).read().0, model_index as usize));
|
||||
let seg = mat_seg
|
||||
.map(|mat_cell| match mat_cell {
|
||||
MatCell::None => None,
|
||||
|
Loading…
Reference in New Issue
Block a user