forked from StrafesNET/strafe-client
remove cybertruck model from default map
This commit is contained in:
parent
2006f81804
commit
444c3cbad9
19
src/main.rs
19
src/main.rs
@ -64,49 +64,44 @@ fn load_file(path: std::path::PathBuf)->Option<model::IndexedModelInstances>{
|
|||||||
|
|
||||||
pub fn default_models()->model::IndexedModelInstances{
|
pub fn default_models()->model::IndexedModelInstances{
|
||||||
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.push(primitives::unit_sphere());
|
indexed_models.push(primitives::unit_sphere());
|
||||||
indexed_models.push(primitives::unit_cylinder());
|
indexed_models.push(primitives::unit_cylinder());
|
||||||
indexed_models.push(primitives::unit_cube());
|
indexed_models.push(primitives::unit_cube());
|
||||||
println!("models.len = {:?}", indexed_models.len());
|
println!("models.len = {:?}", indexed_models.len());
|
||||||
indexed_models[0].instances.push(model::ModelInstance{
|
|
||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(10.,0.,-10.))).unwrap(),
|
|
||||||
..Default::default()
|
|
||||||
});
|
|
||||||
//quad monkeys
|
//quad monkeys
|
||||||
indexed_models[1].instances.push(model::ModelInstance{
|
indexed_models[0].instances.push(model::ModelInstance{
|
||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(10.,5.,10.))).unwrap(),
|
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(10.,5.,10.))).unwrap(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
indexed_models[1].instances.push(model::ModelInstance{
|
indexed_models[0].instances.push(model::ModelInstance{
|
||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(20.,5.,10.))).unwrap(),
|
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(20.,5.,10.))).unwrap(),
|
||||||
color:glam::vec4(1.0,0.0,0.0,1.0),
|
color:glam::vec4(1.0,0.0,0.0,1.0),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
indexed_models[1].instances.push(model::ModelInstance{
|
indexed_models[0].instances.push(model::ModelInstance{
|
||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(10.,5.,20.))).unwrap(),
|
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(10.,5.,20.))).unwrap(),
|
||||||
color:glam::vec4(0.0,1.0,0.0,1.0),
|
color:glam::vec4(0.0,1.0,0.0,1.0),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
indexed_models[1].instances.push(model::ModelInstance{
|
indexed_models[0].instances.push(model::ModelInstance{
|
||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(20.,5.,20.))).unwrap(),
|
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(20.,5.,20.))).unwrap(),
|
||||||
color:glam::vec4(0.0,0.0,1.0,1.0),
|
color:glam::vec4(0.0,0.0,1.0,1.0),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
//decorative monkey
|
//decorative monkey
|
||||||
indexed_models[1].instances.push(model::ModelInstance{
|
indexed_models[0].instances.push(model::ModelInstance{
|
||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(15.,10.,15.))).unwrap(),
|
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_translation(glam::vec3(15.,10.,15.))).unwrap(),
|
||||||
color:glam::vec4(0.5,0.5,0.5,0.5),
|
color:glam::vec4(0.5,0.5,0.5,0.5),
|
||||||
attributes:model::CollisionAttributes::Decoration,
|
attributes:model::CollisionAttributes::Decoration,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
//teapot
|
//teapot
|
||||||
indexed_models[2].instances.push(model::ModelInstance{
|
indexed_models[1].instances.push(model::ModelInstance{
|
||||||
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_scale_rotation_translation(glam::vec3(0.5, 1.0, 0.2),glam::quat(-0.22248298016985793,-0.839457167990537,-0.05603504040830783,-0.49261857546227916),glam::vec3(-10.,7.,10.))).unwrap(),
|
transform:integer::Planar64Affine3::try_from(glam::Affine3A::from_scale_rotation_translation(glam::vec3(0.5, 1.0, 0.2),glam::quat(-0.22248298016985793,-0.839457167990537,-0.05603504040830783,-0.49261857546227916),glam::vec3(-10.,7.,10.))).unwrap(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
//ground
|
//ground
|
||||||
indexed_models[3].instances.push(model::ModelInstance{
|
indexed_models[2].instances.push(model::ModelInstance{
|
||||||
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()
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user