Skip to content

Commit 9c09a3b

Browse files
authored
Use scene.spawn() in 3d_scene (#23942)
# Objective `3d_scene` doesn't use the new `scene.spawn()` pattern. ## Solution - Use it!
1 parent fb7f58b commit 9c09a3b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

examples/3d/3d_scene.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ use bevy::prelude::*;
55
fn main() {
66
App::new()
77
.add_plugins(DefaultPlugins)
8-
.add_systems(Startup, setup)
8+
.add_systems(Startup, scene.spawn())
99
.run();
1010
}
1111

1212
/// set up a simple 3D scene
13-
fn setup(world: &mut World) -> Result {
14-
world.spawn_scene_list(bsn_list! [
13+
fn scene() -> impl SceneList {
14+
bsn_list! [
1515
(
1616
#CircularBase
1717
Mesh3d(asset_value(Circle::new(4.0)))
@@ -34,6 +34,5 @@ fn setup(world: &mut World) -> Result {
3434
Camera3d
3535
template_value(Transform::from_xyz(-2.5, 4.5, 9.0).looking_at(Vec3::ZERO, Vec3::Y))
3636
)
37-
])?;
38-
Ok(())
37+
]
3938
}

0 commit comments

Comments
 (0)