edit: here's a hacky way to do it, since you can't seed Math.random() in JavaScript; add this at the start of the "draw()" function.
const url = new URL(location.href);
const match = /#([0-9]+)$/.exec(url.hash);
if (match) {
var seed = parseInt(match[1]);
Math.random = function() {
var x = Math.sin(seed++) * 10000;
return x - Math.floor(x);
};
}
Based on a StackOverflow answer to the commonly-asked question of how to seed the PRNG in JavaScript, by all means not a perfect solution but appropriately concise for this short script: https://stackoverflow.com/a/19303725