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
2156
2156
name = " fallible_systems"
2157
2157
path = " examples/ecs/fallible_systems.rs"
2158
2158
doc-scrape-examples = true
2159
+ required-features = [" bevy_mesh_picking_backend" ]
2159
2160
2160
2161
[package .metadata .example .fallible_systems ]
2161
2162
name = " Fallible Systems"
2162
2163
description = " Systems that return results to handle errors"
2163
2164
category = " ECS (Entity Component System)"
2164
2165
wasm = false
2165
- required-features = [" bevy_mesh_picking_backend" ]
2166
2166
2167
2167
[[example ]]
2168
2168
name = " startup_system"
@@ -4000,7 +4000,6 @@ name = "Sprite Picking"
4000
4000
description = " Demonstrates picking sprites and sprite atlases"
4001
4001
category = " Picking"
4002
4002
wasm = true
4003
- required-features = [" bevy_sprite_picking_backend" ]
4004
4003
4005
4004
[[example ]]
4006
4005
name = " debug_picking"
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ use bevy::math::sampling::UniformMeshSampler;
6
6
use bevy:: prelude:: * ;
7
7
8
8
use rand:: distributions:: Distribution ;
9
+ use rand:: SeedableRng ;
10
+ use rand_chacha:: ChaCha8Rng ;
9
11
10
12
fn main ( ) {
11
13
let mut app = App :: new ( ) ;
@@ -68,7 +70,7 @@ fn setup(
68
70
mut meshes : ResMut < Assets < Mesh > > ,
69
71
mut materials : ResMut < Assets < StandardMaterial > > ,
70
72
) -> Result {
71
- let mut rng = rand :: thread_rng ( ) ;
73
+ let mut seeded_rng = ChaCha8Rng :: seed_from_u64 ( 19878367467712 ) ;
72
74
73
75
// Make a plane for establishing space.
74
76
commands. spawn ( (
@@ -116,7 +118,7 @@ fn setup(
116
118
} ) ;
117
119
118
120
// 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 ) {
120
122
sphere. with_child ( (
121
123
Mesh3d ( point_mesh. clone ( ) ) ,
122
124
MeshMaterial3d ( point_material. clone ( ) ) ,
You can’t perform that action at this time.
0 commit comments