Skip to content

Commit 8ec18ae

Browse files
committed
Replace RNG in ui examples
1 parent 800e3e4 commit 8ec18ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/ui/font_atlas_debug.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//! Bevy uses `FontAtlas`'s under the hood to optimize text rendering.
33
44
use bevy::{color::palettes::basic::YELLOW, prelude::*, text::FontAtlasSets};
5-
use rand::{rngs::StdRng, Rng, SeedableRng};
5+
use rand::{Rng, SeedableRng};
6+
use rand_chacha::ChaCha8Rng;
67

78
fn main() {
89
App::new()
@@ -32,7 +33,7 @@ impl Default for State {
3233
}
3334

3435
#[derive(Resource, Deref, DerefMut)]
35-
struct SeededRng(StdRng);
36+
struct SeededRng(ChaCha8Rng);
3637

3738
fn atlas_render_system(
3839
mut commands: Commands,
@@ -104,5 +105,5 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>, mut state: ResM
104105
},
105106
));
106107
});
107-
commands.insert_resource(SeededRng(StdRng::seed_from_u64(19878367467713)));
108+
commands.insert_resource(SeededRng(ChaCha8Rng::seed_from_u64(19878367467713)));
108109
}

0 commit comments

Comments
 (0)