File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2156,13 +2156,13 @@ wasm = false
21562156name = " fallible_systems"
21572157path = " examples/ecs/fallible_systems.rs"
21582158doc-scrape-examples = true
2159+ required-features = [" bevy_mesh_picking_backend" ]
21592160
21602161[package .metadata .example .fallible_systems ]
21612162name = " Fallible Systems"
21622163description = " Systems that return results to handle errors"
21632164category = " ECS (Entity Component System)"
21642165wasm = false
2165- required-features = [" bevy_mesh_picking_backend" ]
21662166
21672167[[example ]]
21682168name = " startup_system"
@@ -4000,7 +4000,6 @@ name = "Sprite Picking"
40004000description = " Demonstrates picking sprites and sprite atlases"
40014001category = " Picking"
40024002wasm = true
4003- required-features = [" bevy_sprite_picking_backend" ]
40044003
40054004[[example ]]
40064005name = " debug_picking"
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ use bevy::math::sampling::UniformMeshSampler;
66use bevy:: prelude:: * ;
77
88use rand:: distributions:: Distribution ;
9+ use rand:: SeedableRng ;
10+ use rand_chacha:: ChaCha8Rng ;
911
1012fn main ( ) {
1113 let mut app = App :: new ( ) ;
@@ -68,7 +70,7 @@ fn setup(
6870 mut meshes : ResMut < Assets < Mesh > > ,
6971 mut materials : ResMut < Assets < StandardMaterial > > ,
7072) -> Result {
71- let mut rng = rand :: thread_rng ( ) ;
73+ let mut seeded_rng = ChaCha8Rng :: seed_from_u64 ( 19878367467712 ) ;
7274
7375 // Make a plane for establishing space.
7476 commands. spawn ( (
@@ -116,7 +118,7 @@ fn setup(
116118 } ) ;
117119
118120 // Add sample points as children of the sphere:
119- for point in distribution. sample_iter ( & mut rng ) . take ( 10000 ) {
121+ for point in distribution. sample_iter ( & mut seeded_rng ) . take ( 10000 ) {
120122 sphere. with_child ( (
121123 Mesh3d ( point_mesh. clone ( ) ) ,
122124 MeshMaterial3d ( point_material. clone ( ) ) ,
You can’t perform that action at this time.
0 commit comments