forked from StrafesNET/strafe-client
move some stuff
This commit is contained in:
parent
8cc86d88fc
commit
2356286dc2
24
src/main.rs
24
src/main.rs
@ -83,10 +83,7 @@ fn load_file(path: std::path::PathBuf)->Option<model::IndexedModelInstances>{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GlobalState {
|
fn default_models()->model::IndexedModelInstances{
|
||||||
fn init() -> Self {
|
|
||||||
//wee
|
|
||||||
let user_settings=settings::read_user_settings();
|
|
||||||
let mut indexed_models = Vec::new();
|
let mut indexed_models = Vec::new();
|
||||||
indexed_models.append(&mut model::generate_indexed_model_list_from_obj(obj::ObjData::load_buf(&include_bytes!("../models/teslacyberv3.0.obj")[..]).unwrap(),glam::Vec4::ONE));
|
indexed_models.append(&mut model::generate_indexed_model_list_from_obj(obj::ObjData::load_buf(&include_bytes!("../models/teslacyberv3.0.obj")[..]).unwrap(),glam::Vec4::ONE));
|
||||||
indexed_models.push(primitives::unit_sphere());
|
indexed_models.push(primitives::unit_sphere());
|
||||||
@ -134,17 +131,22 @@ impl GlobalState {
|
|||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(0.,0.,0.))*glam::Affine3A::from_scale(glam::vec3(160.0, 1.0, 160.0))).unwrap(),
|
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(0.,0.,0.))*glam::Affine3A::from_scale(glam::vec3(160.0, 1.0, 160.0))).unwrap(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
model::IndexedModelInstances{
|
||||||
let mut graphics=GraphicsState::new();
|
|
||||||
|
|
||||||
graphics.load_user_settings(&user_settings);
|
|
||||||
|
|
||||||
let indexed_model_instances=model::IndexedModelInstances{
|
|
||||||
textures:Vec::new(),
|
textures:Vec::new(),
|
||||||
models:indexed_models,
|
models:indexed_models,
|
||||||
spawn_point:integer::Planar64Vec3::Y*50,
|
spawn_point:integer::Planar64Vec3::Y*50,
|
||||||
modes:Vec::new(),
|
modes:Vec::new(),
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl GlobalState {
|
||||||
|
fn init() -> Self {
|
||||||
|
//wee
|
||||||
|
let user_settings=settings::read_user_settings();
|
||||||
|
|
||||||
|
let mut graphics=GraphicsState::new();
|
||||||
|
|
||||||
|
graphics.load_user_settings(&user_settings);
|
||||||
|
|
||||||
//how to multithread
|
//how to multithread
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user