diff options
Diffstat (limited to 'world/src/mesh.rs')
-rw-r--r-- | world/src/mesh.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/world/src/mesh.rs b/world/src/mesh.rs index 3d9ee8d..1b25cbe 100644 --- a/world/src/mesh.rs +++ b/world/src/mesh.rs @@ -74,6 +74,24 @@ pub fn import_mesh( }) .transpose()?; + let va_joint_index = reader + .read_joints(0) + .map(|iter| { + let a = iter.into_u16().collect::<Vec<_>>(); + debug!("{} vertex joint indecies", a.len()); + Ok::<_, anyhow::Error>(store.set(&a)?) + }) + .transpose()?; + + let va_joint_weight = reader + .read_weights(0) + .map(|iter| { + let a = iter.into_f32().collect::<Vec<_>>(); + debug!("{} vertex joint weights", a.len()); + Ok::<_, anyhow::Error>(store.set(&a)?) + }) + .transpose()?; + let va_texcoord = reader .read_tex_coords(0) .map(|iter| { @@ -325,6 +343,7 @@ pub fn import_mesh( let mesh = store.set(&MeshPart { name, index, + armature: None, g_albedo, g_alpha, g_metallic, @@ -343,6 +362,8 @@ pub fn import_mesh( va_texcoord, va_albedo, va_alpha, + va_joint_index, + va_joint_weight, tex_albedo, tex_normal, tex_roughness, @@ -353,6 +374,7 @@ pub fn import_mesh( tex_thickness, tex_occlusion, // not supported by gltf + hint_mirror: None, // TODO va_transmission: None, va_emission: None, va_metallic: None, |