update glbs again
This commit is contained in:
6436
Cargo.lock
generated
Normal file
6436
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -18,19 +18,28 @@ fn spawn_level(
|
|||||||
let gltf = models.get(handle).expect(&format!("No model for {}", mesh_name));
|
let gltf = models.get(handle).expect(&format!("No model for {}", mesh_name));
|
||||||
|
|
||||||
let asset = gltf.default_scene.as_ref().expect(&format!("No scene in {}", mesh_name));
|
let asset = gltf.default_scene.as_ref().expect(&format!("No scene in {}", mesh_name));
|
||||||
SceneRoot(asset.clone());
|
SceneRoot(asset.clone())
|
||||||
});
|
});
|
||||||
let [corner_inside, corner_outside, wall, door, round_door, round_hole] = shapes;
|
let [
|
||||||
|
corner_inside,
|
||||||
|
corner_outside,
|
||||||
|
wall,
|
||||||
|
door,
|
||||||
|
round_door,
|
||||||
|
round_hole
|
||||||
|
] = shapes;
|
||||||
let mut x_offset = 0.0;
|
let mut x_offset = 0.0;
|
||||||
for i in 0..10 {
|
for i in 0..10 {
|
||||||
commands.spawn(wall.clone())
|
commands.spawn((
|
||||||
.insert(TransformBundle::from_transform(Transform::from_xyz(x_offset + (i as f32 * 2.0), 0.0, 0.0)));
|
wall.clone(),
|
||||||
|
Transform::from_xyz(i as f32 * 2.0, 0.0, 0.0),
|
||||||
|
));
|
||||||
|
|
||||||
commands.spawn(wall.clone())
|
commands.spawn((
|
||||||
.insert(TransformBundle::from_transform(
|
wall.clone(),
|
||||||
Transform::from_xyz(x_offset + (i as f32 * 2.0), 0.0, 0.0)
|
Transform::from_xyz(i as f32 * 2.0, 0.0, 0.0)
|
||||||
.with_rotation(Quat::from_rotation_y(std::f32::consts::PI))
|
.with_rotation(Quat::from_rotation_y(std::f32::consts::PI)),
|
||||||
));
|
));
|
||||||
|
x_offset += 2.0;
|
||||||
}
|
}
|
||||||
x_offset += 2.0;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user