add greenhouse with mirror array
This commit is contained in:
parent
037f610865
commit
7732f10582
BIN
assets/models/greenhouse.bin
Normal file
BIN
assets/models/greenhouse.bin
Normal file
Binary file not shown.
1547
assets/models/greenhouse.gltf
Normal file
1547
assets/models/greenhouse.gltf
Normal file
File diff suppressed because it is too large
Load diff
BIN
assets/models/mirror.glb
Normal file
BIN
assets/models/mirror.glb
Normal file
Binary file not shown.
BIN
assets/models/textures/drops.jpg
Normal file
BIN
assets/models/textures/drops.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
1
build.rs
1
build.rs
|
@ -29,6 +29,7 @@ fn main() -> std::io::Result<()> {
|
|||
write!(&file, "[\n")?;
|
||||
extract_scene(&mut file, "test", "src/blender/scene_test.blend")?;
|
||||
extract_scene(&mut file, "workshop", "src/blender/scene_workshop.blend")?;
|
||||
extract_scene(&mut file, "greenhouse", "src/blender/scene_greenhouse.blend")?;
|
||||
write!(&file, "]\n")?;
|
||||
}
|
||||
Ok(())
|
||||
|
|
BIN
src/blender/greenhouse.blend
Normal file
BIN
src/blender/greenhouse.blend
Normal file
Binary file not shown.
BIN
src/blender/mirror.blend
Normal file
BIN
src/blender/mirror.blend
Normal file
Binary file not shown.
BIN
src/blender/scene_greenhouse.blend
Normal file
BIN
src/blender/scene_greenhouse.blend
Normal file
Binary file not shown.
61
src/cmd.rs
61
src/cmd.rs
|
@ -832,14 +832,19 @@ fn spawn_scenes(
|
|||
|
||||
ew_spawn.send(SpawnEvent(state));
|
||||
}
|
||||
"fueltank" => {
|
||||
"fueltank" | "fueltanksmall" => {
|
||||
state.model = Some("fueltank".to_string());
|
||||
|
||||
// command: name "Fuel Tank"
|
||||
state.name = Some("Fuel Tank".to_string());
|
||||
|
||||
// command: scale 8
|
||||
state.model_scale = 8.0;
|
||||
if template == "fueltank" {
|
||||
// command: scale 8
|
||||
state.model_scale = 8.0;
|
||||
} else {
|
||||
// command: scale 4
|
||||
state.model_scale = 4.0;
|
||||
}
|
||||
|
||||
// command: angularmomentum 0 0 0
|
||||
state.angular_momentum = DVec3::ZERO;
|
||||
|
@ -902,6 +907,56 @@ fn spawn_scenes(
|
|||
|
||||
ew_spawn.send(SpawnEvent(state));
|
||||
}
|
||||
"mirror" | "mirrorrotating" => {
|
||||
state.model = Some("mirror".to_string());
|
||||
|
||||
// command: name "Mirror"
|
||||
state.name = Some("Mirror".to_string());
|
||||
|
||||
// command: collider mesh
|
||||
state.collider_is_one_mesh_of_scene = true;
|
||||
state.collider_is_mesh = true;
|
||||
|
||||
if template == "mirrorrotating" {
|
||||
// command: angularmomentum 0.3 1.5 0.0
|
||||
state.angular_momentum = DVec3::new(0.3, 1.5, 0.0);
|
||||
} else {
|
||||
// command: angularmomentum 0 0 0
|
||||
state.angular_momentum = DVec3::ZERO;
|
||||
}
|
||||
|
||||
// command: scale 10.0
|
||||
state.model_scale = 10.0;
|
||||
|
||||
ew_spawn.send(SpawnEvent(state));
|
||||
}
|
||||
"greenhouse" => {
|
||||
state.model = Some("greenhouse".to_string());
|
||||
|
||||
// command: name "Greenhouse"
|
||||
state.name = Some("Greenhouse".to_string());
|
||||
|
||||
// command: collider handcrafted
|
||||
state.collider_is_one_mesh_of_scene = true;
|
||||
|
||||
// command: wants maxrotation 0
|
||||
state.wants_maxrotation = Some(0.0);
|
||||
|
||||
// command: thrust 0 0 0 1000 0.1
|
||||
state.thrust_forward = 0.0;
|
||||
state.thrust_back = 0.0;
|
||||
state.thrust_sideways = 0.0;
|
||||
state.reaction_wheels = 1000.0;
|
||||
state.warmup_seconds = 0.1;
|
||||
|
||||
// command: angularmomentum 0 0 0
|
||||
state.angular_momentum = DVec3::ZERO;
|
||||
|
||||
// command: scale 10.0
|
||||
state.model_scale = 10.0;
|
||||
|
||||
ew_spawn.send(SpawnEvent(state));
|
||||
}
|
||||
_ => {
|
||||
error!("Can't find template named `{template}' in cmd::spawn_scenes!");
|
||||
}
|
||||
|
|
|
@ -468,6 +468,9 @@ actor -8000 -1000 -100 monolith
|
|||
thrust 0 0 0 30 1
|
||||
collider mesh
|
||||
|
||||
scene -3100 -200 -660 greenhouse
|
||||
relativeto player
|
||||
|
||||
actor -3300 10 0 pizzeria
|
||||
name "Pizzeria Asteroid"
|
||||
relativeto player
|
||||
|
|
|
@ -9,4 +9,24 @@
|
|||
("workshop", "shippingcontainer", [-0.52376616, 12.351211, -2.6598575], [-0.11791781, -0.02345992, 1.5838965]),
|
||||
("workshop", "shippingcontainer", [-13.479424, 10.191104, -8.136984], [-0.05393797, -0.013098141, 1.7229813]),
|
||||
("workshop", "shippingcontainer", [12.42811, 14.157182, -4.2369785], [-0.02553346, 0.042504273, 1.5108364]),
|
||||
("greenhouse", "fueltank", [74.5485, 54.473938, 23.183126], [1.1660392, -0.0, -0.48993048]),
|
||||
("greenhouse", "greenhouse", [56.82031, 0.0, 0.0], [0.0, -1.5707964, 0.0]),
|
||||
("greenhouse", "mirror", [0.0, -17.0, -10.0], [-0.07591219, 0.0049197352, 1.7143301]),
|
||||
("greenhouse", "mirror", [0.0, 17.0, -10.0], [-0.07587019, -0.0054108524, 1.4372792]),
|
||||
("greenhouse", "mirror", [0.0, -17.0, 10.0], [0.08589277, -0.0056050196, 1.7142922]),
|
||||
("greenhouse", "mirror", [0.0, 0.0, 20.0], [0.15707964, 0.0, 1.5707964]),
|
||||
("greenhouse", "mirror", [0.0, 0.0, -20.0], [-0.15707964, -0.0, 1.5707964]),
|
||||
("greenhouse", "mirror", [3.0, 34.0, 0.0], [-9.270864e-18, 6.3488335e-17, 1.2807964]),
|
||||
("greenhouse", "mirror", [3.0, -34.0, 0.0], [0.0, 0.0, 1.8607775]),
|
||||
("greenhouse", "mirror", [3.0, -34.0, 20.0], [0.16684353, -0.02862187, 1.8691753]),
|
||||
("greenhouse", "mirror", [3.0, 34.0, 20.0], [0.14792228, 0.021559132, 1.2818513]),
|
||||
("greenhouse", "mirror", [3.0, -34.0, -20.0], [-0.1775151, 0.02585048, 1.859278]),
|
||||
("greenhouse", "mirror", [3.0, 34.0, -20.0], [-0.1592269, -0.013994377, 1.3089968]),
|
||||
("greenhouse", "mirror", [3.0, -17.0, -30.0], [-0.25917134, 0.018069137, 1.7092348]),
|
||||
("greenhouse", "mirror", [3.0, -17.0, 30.0], [0.22926316, -0.01600367, 1.7095735]),
|
||||
("greenhouse", "mirror", [3.0, 17.0, 30.0], [0.22926316, 0.016003652, 1.4320191]),
|
||||
("greenhouse", "mirror", [3.0, 17.0, -30.0], [-0.25917134, -0.018069115, 1.4323579]),
|
||||
("greenhouse", "mirror", [3.0, 0.0, -40.0], [-0.33143952, -7.651644e-10, 1.5707964]),
|
||||
("greenhouse", "mirror", [3.0, 0.0, 40.0], [0.34906584, -3.5681582e-9, 1.5707964]),
|
||||
("greenhouse", "mirrorrotating", [0.0, 17.0, 10.0], [0.0073764813, -0.009006099, 1.2773504]),
|
||||
]
|
||||
|
|
|
@ -45,6 +45,8 @@ pub fn asset_name_to_path(name: &str) -> &'static str {
|
|||
"hollow_asteroid" => "models/hollow_asteroid.glb#Scene0",
|
||||
"moonlet" => "models/moonlet.glb#Scene0",
|
||||
"monolith" => "models/monolith_neon.glb#Scene0",
|
||||
"mirror" => "models/mirror.glb#Scene0",
|
||||
"greenhouse" => "models/greenhouse.gltf#Scene0",
|
||||
"lightorb" => "models/lightorb.glb#Scene0",
|
||||
"orb_busstop" => "models/orb_busstop.glb#Scene0",
|
||||
"orb_busstop_dim" => "models/orb_busstop_dim.glb#Scene0",
|
||||
|
|
Loading…
Reference in a new issue