Skip to content

Using URL Query String

Daniel Shiffman edited this page Nov 19, 2023 · 1 revision

You can add this to the markov example in setup(): https://editor.p5js.org/a2zitp/sketches/XeO8pqqMR

It won't work, however, in the p5.js web editor since the sketch is running in a separate iframe.

  let params = getURLParams();
  console.log(params);
  if (params.seed) {
    randomSeed(params.seed);
    generate();
  }
Clone this wiki locally