not quite right
This commit is contained in:
parent
f6d5972743
commit
b14d5a7e56
13
src/rbx.rs
13
src/rbx.rs
@ -750,13 +750,18 @@ impl PartialMap1{
|
|||||||
let mut wormhole_id_to_out_model=HashMap::new();
|
let mut wormhole_id_to_out_model=HashMap::new();
|
||||||
|
|
||||||
//decode roblox meshes
|
//decode roblox meshes
|
||||||
//generate mesh_id map based on meshes that failed to load
|
//generate mesh_id_map based on meshes that failed to load
|
||||||
let mut meshes=meshpart_meshes.into_iter().flat_map(|(old_mesh_id,roblox_mesh_bytes)|{
|
let (meshes,mesh_id_map):(Vec<model::Mesh>,HashMap<model::MeshId,model::MeshId>)=
|
||||||
|
meshpart_meshes.into_iter().flat_map(|(old_mesh_id,roblox_mesh_bytes)|
|
||||||
Ok((old_mesh_id,crate::mesh::convert(roblox_mesh_bytes)?))
|
Ok((old_mesh_id,crate::mesh::convert(roblox_mesh_bytes)?))
|
||||||
}).collect();
|
).enumerate().map(|(new_mesh_id,(old_mesh_id,mesh))|
|
||||||
|
(mesh,(old_mesh_id,model::MeshId::new(new_mesh_id as u32)))
|
||||||
|
).unzip();
|
||||||
//now that the meshes are loaded, these models can be generated
|
//now that the meshes are loaded, these models can be generated
|
||||||
let models_owned_attributes=self.deferred_models_deferred_attributes.into_iter().map(|deferred_model_deferred_attributes|{
|
let models_owned_attributes=self.deferred_models_deferred_attributes.into_iter().map(|deferred_model_deferred_attributes|{
|
||||||
let render=deferred_model_deferred_attributes.render;//what does this do?
|
let render=deferred_model_deferred_attributes.render;
|
||||||
|
//meshes need to be cloned with a new id when they are reused with a new render_id
|
||||||
|
//insert into primitive_meshes
|
||||||
ModelDeferredAttributes{
|
ModelDeferredAttributes{
|
||||||
mesh:deferred_model_deferred_attributes.model.mesh,
|
mesh:deferred_model_deferred_attributes.model.mesh,
|
||||||
deferred_attributes:deferred_model_deferred_attributes.model.deferred_attributes,
|
deferred_attributes:deferred_model_deferred_attributes.model.deferred_attributes,
|
||||||
|
Loading…
Reference in New Issue
Block a user