make ? visible (not offscreen LOL)
This commit is contained in:
parent
117546deeb
commit
1d20fb2c23
20
src/mesh.rs
20
src/mesh.rs
@ -164,10 +164,10 @@ pub fn convert(roblox_mesh_bytes:crate::data::RobloxMeshBytes)->Result<model::Me
|
|||||||
rbx_mesh::mesh::SizeOfVertex2::Truncated=>{
|
rbx_mesh::mesh::SizeOfVertex2::Truncated=>{
|
||||||
//pick white and make all the vertices white
|
//pick white and make all the vertices white
|
||||||
let color_id=acquire_color_id([1.0f32;4]);
|
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
|
//one big happy group for all the faces
|
||||||
polygon_groups.push(PolygonGroup::PolygonList(PolygonList::new(mesh.faces.into_iter().map(|face|
|
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]]
|
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<model::Me
|
|||||||
let vertex_id_map=match mesh.header.sizeof_vertex{
|
let vertex_id_map=match mesh.header.sizeof_vertex{
|
||||||
rbx_mesh::mesh::SizeOfVertex2::Truncated=>{
|
rbx_mesh::mesh::SizeOfVertex2::Truncated=>{
|
||||||
let color_id=acquire_color_id([1.0f32;4]);
|
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);
|
ingest_faces2_lods3(&mut polygon_groups,&vertex_id_map,&mesh.faces,&mesh.lods);
|
||||||
},
|
},
|
||||||
rbx_mesh::mesh::VersionedMesh::Version4(mesh)=>{
|
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);
|
ingest_faces2_lods3(&mut polygon_groups,&vertex_id_map,&mesh.faces,&mesh.lods);
|
||||||
},
|
},
|
||||||
rbx_mesh::mesh::VersionedMesh::Version5(mesh)=>{
|
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);
|
ingest_faces2_lods3(&mut polygon_groups,&vertex_id_map,&mesh.faces,&mesh.lods);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user