From 1d20fb2c23aa20c7ed60388559f366e6ab17d0fb Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 12 Mar 2024 21:17:26 -0700 Subject: [PATCH] make ? visible (not offscreen LOL) --- src/mesh.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mesh.rs b/src/mesh.rs index 18fb7fb..8f08147 100644 --- a/src/mesh.rs +++ b/src/mesh.rs @@ -164,10 +164,10 @@ pub fn convert(roblox_mesh_bytes:crate::data::RobloxMeshBytes)->Result{ //pick white and make all the vertices white let color_id=acquire_color_id([1.0f32;4]); - ingest_vertices_truncated2(mesh.vertices_truncated,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,color_id,&mut acquire_vertex_id)? + ingest_vertices_truncated2(mesh.vertices_truncated,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,color_id,&mut acquire_vertex_id) }, - rbx_mesh::mesh::SizeOfVertex2::Full=>ingest_vertices2(mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id)?, - }; + rbx_mesh::mesh::SizeOfVertex2::Full=>ingest_vertices2(mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id), + }?; //one big happy group for all the faces polygon_groups.push(PolygonGroup::PolygonList(PolygonList::new(mesh.faces.into_iter().map(|face| vec![vertex_id_map[&face.0],vertex_id_map[&face.1],vertex_id_map[&face.2]] @@ -177,18 +177,22 @@ pub fn convert(roblox_mesh_bytes:crate::data::RobloxMeshBytes)->Result{ let color_id=acquire_color_id([1.0f32;4]); - ingest_vertices_truncated2(mesh.vertices_truncated,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,color_id,&mut acquire_vertex_id)? + ingest_vertices_truncated2(mesh.vertices_truncated,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,color_id,&mut acquire_vertex_id) }, - rbx_mesh::mesh::SizeOfVertex2::Full=>ingest_vertices2(mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id)?, - }; + rbx_mesh::mesh::SizeOfVertex2::Full=>ingest_vertices2(mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id), + }?; ingest_faces2_lods3(&mut polygon_groups,&vertex_id_map,&mesh.faces,&mesh.lods); }, rbx_mesh::mesh::VersionedMesh::Version4(mesh)=>{ - let vertex_id_map=ingest_vertices2(mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id)?; + let vertex_id_map=ingest_vertices2( + mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id + )?; ingest_faces2_lods3(&mut polygon_groups,&vertex_id_map,&mesh.faces,&mesh.lods); }, rbx_mesh::mesh::VersionedMesh::Version5(mesh)=>{ - let vertex_id_map=ingest_vertices2(mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id)?; + let vertex_id_map=ingest_vertices2( + mesh.vertices,&mut acquire_pos_id,&mut acquire_tex_id,&mut acquire_normal_id,&mut acquire_color_id,&mut acquire_vertex_id + )?; ingest_faces2_lods3(&mut polygon_groups,&vertex_id_map,&mesh.faces,&mesh.lods); }, }