This commit is contained in:
Quaternions 2023-10-03 16:29:30 -07:00
parent 9e9550885f
commit de0eb0790a
2 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ pub fn generate_indexed_models(dom:rbx_dom_weak::WeakDom) -> crate::model::Index
glam::Vec3::new(size.x,size.y,size.z)/2.0 glam::Vec3::new(size.x,size.y,size.z)/2.0
); );
if object.name=="MapStart"{ if object.name=="MapStart"{
spawn_point=model_transform.transform_point3(glam::Vec3::Y)+glam::vec3(0.0,2.5,0.0); spawn_point=model_transform.transform_point3(-glam::Vec3::Y)+glam::vec3(0.0,2.5+0.1,0.0);
println!("Found MapStart{:?}",spawn_point); println!("Found MapStart{:?}",spawn_point);
} }
if *transparency==1.0 { if *transparency==1.0 {

View File

@ -93,7 +93,7 @@ impl GraphicsData {
} }
println!("Physics Objects: {}",self.physics.models.len()); println!("Physics Objects: {}",self.physics.models.len());
} }
fn generate_model_graphics(&mut self,device:&wgpu::Device,queue:&wgpu::Queue,mut indexed_models:model::IndexedModelInstances){ fn generate_model_graphics(&mut self,device:&wgpu::Device,queue:&wgpu::Queue,indexed_models:model::IndexedModelInstances){
//generate texture view per texture //generate texture view per texture
//idk how to do this gooder lol //idk how to do this gooder lol
@ -174,7 +174,7 @@ impl GraphicsData {
//check each group, if it's using a new texture then make a new clone of the model //check each group, if it's using a new texture then make a new clone of the model
let id=unique_texture_models.len(); let id=unique_texture_models.len();
let mut unique_textures=Vec::new(); let mut unique_textures=Vec::new();
for group in model.groups.drain(..){ for group in model.groups.into_iter(){
//ignore zero coppy optimization for now //ignore zero coppy optimization for now
let texture_index=if let Some(texture_index)=unique_textures.iter().position(|&texture|texture==group.texture){ let texture_index=if let Some(texture_index)=unique_textures.iter().position(|&texture|texture==group.texture){
texture_index texture_index
@ -238,7 +238,7 @@ impl GraphicsData {
texture:model.texture, texture:model.texture,
}); });
} }
//drain the modeldata vec so entities can be /moved/ to models.entities //.into_iter() the modeldata vec so entities can be /moved/ to models.entities
let mut model_count=0; let mut model_count=0;
let mut instance_count=0; let mut instance_count=0;
let uniform_buffer_binding_size=<GraphicsData as framework::Example>::required_limits().max_uniform_buffer_binding_size as usize; let uniform_buffer_binding_size=<GraphicsData as framework::Example>::required_limits().max_uniform_buffer_binding_size as usize;