[][src]Static p5_sys::global::noiseSeed

pub static noiseSeed: NoiseSeedInternalType

Sets the seed value for noise(). By default, noise() produces different results each time the program is run. Set the value parameter to a constant to return the same pseudo-random numbers each time the software is run.

Examples


function setup() {
  noiseSeed(99);
  stroke(0, 10);
}

function draw() {
  xoff = xoff + .01;
  let n = noise(xoff) * width;
  line(n, 0, n, height);
}

Parameters

seed the seed value