fn draw_texture(draw: &Draw, win: &Rect) {
  for _i in 0..5000 {
    let hue = random_range(190., 216.) / 360.;
    let sat = random_range(0.3, 0.7);
    let lightness = random_range(0.15, 0.98);
    let alpha = random_range(0.02, 0.035);
    let x = random_range(win.x.start, win.x.end);
    let y = random_range(win.y.start, win.y.end);
    Blob::new()
      .x_y(x, y)
      .width(random_range(10.0, 50.0))
      .height(random_range(10.0, 50.0))
      .rotate_rad(random_range(0., PI * 2.))
      .noise_scale(random_range(0.4, 0.95))
      .hsla(hue, sat, lightness, alpha)
      .fuzziness(random_range(0., 0.8))
      .draw(draw);
  }
}
// draw textured background:
// layering a shit ton of nearly-transparent, randomly shaped, randomly-sized,
// randomly-positioned blobs makes for a nice mottled texture!
draw textured background:
layering a shit ton of nearly-transparent, randomly shaped, randomly-sized,
randomly-positioned blobs makes for a nice mottled texture!
draw textured background : layering a shit ton of nearly - transparent randomly shaped randomly - sized randomly - positioned blobs makes for a nice mottled texture!
fn draw_texture(draw: &Draw, win: &Rect) {
  for _i in 0..5000 {
    let hue = random_range(190., 216.) / 360.;
    let sat = random_range(0.3, 0.7);
    let lightness = random_range(0.15, 0.98);
    let alpha = random_range(0.02, 0.035);
    let x = random_range(win.x.start, win.x.end);
    let y = random_range(win.y.start, win.y.end);
    Blob::new()
      .x_y(x, y)
      .width(random_range(10.0, 50.0))
      .height(random_range(10.0, 50.0))
      .rotate_rad(random_range(0., PI * 2.))
      .noise_scale(random_range(0.4, 0.95))
      .hsla(hue, sat, lightness, alpha)
      .fuzziness(random_range(0., 0.8))
      .draw(draw);
  }
}
fn draw_texture ( draw : & Draw , win : & Rect ) { for _i in 0 .. 5000 { let hue = random_range ( 190. , 216. ) / 360. ; let sat = random_range ( 0.3 , 0.7 ) ; let lightness = random_range ( 0.15 , 0.98 ) ; let alpha = random_range ( 0.02 , 0.035 ) ; let x = random_range ( win . x . start , win . x . end ) ; let y = random_range ( win . y . start , win . y . end ) ; Blob :: new ( ) . x_y ( x , y ) . width ( random_range ( 10.0 , 50.0 ) ) . height ( random_range ( 10.0 , 50.0 ) ) . rotate_rad ( random_range ( 0. , PI * 2. ) ) . noise_scale ( random_range ( 0.4 , 0.95 ) ) . hsla ( hue , sat , lightness , alpha ) . fuzziness ( random_range ( 0. , 0.8 ) ) . draw ( draw ) ; } }
draw textured background:
layering a shit ton of nearly-transparent, randomly shaped, randomly-sized,
randomly-positioned blobs makes for a nice mottled texture!
draw textured background : layering a shit ton of nearly - transparent randomly shaped randomly - sized randomly - positioned blobs makes for a nice mottled texture!
draw
&Draw
win
&Rect