@@ -221,6 +221,7 @@ fn setup(
221221 quad : meshes
222222 . add ( Rectangle :: from_size ( Vec2 :: splat ( BIRD_TEXTURE_SIZE as f32 ) ) )
223223 . into ( ) ,
224+ // Make it play out the same way every time with deterministic results. We do this for testing purposes.
224225 color_rng : StdRng :: seed_from_u64 ( 42 ) ,
225226 material_rng : StdRng :: seed_from_u64 ( 42 ) ,
226227 velocity_rng : StdRng :: seed_from_u64 ( 42 ) ,
@@ -304,6 +305,7 @@ fn mouse_handler(
304305 mut wave : Local < usize > ,
305306) {
306307 if rng. is_none ( ) {
308+ // Make it play out the same way every time with deterministic results. We do this for testing purposes.
307309 * rng = Some ( StdRng :: seed_from_u64 ( 42 ) ) ;
308310 }
309311 let rng = rng. as_mut ( ) . unwrap ( ) ;
@@ -537,6 +539,7 @@ fn counter_system(
537539}
538540
539541fn init_textures ( textures : & mut Vec < Handle < Image > > , args : & Args , images : & mut Assets < Image > ) {
542+ // Make it play out the same way every time with deterministic results. We do this for testing purposes.
540543 let mut color_rng = StdRng :: seed_from_u64 ( 42 ) ;
541544 while textures. len ( ) < args. material_texture_count {
542545 let pixel = [ color_rng. gen ( ) , color_rng. gen ( ) , color_rng. gen ( ) , 255 ] ;
@@ -572,6 +575,7 @@ fn init_materials(
572575 texture : textures. first ( ) . cloned ( ) ,
573576 } ) ) ;
574577
578+ // Make it play out the same way every time with deterministic results. We do this for testing purposes.
575579 let mut color_rng = StdRng :: seed_from_u64 ( 42 ) ;
576580 let mut texture_rng = StdRng :: seed_from_u64 ( 42 ) ;
577581 materials. extend (
0 commit comments