Fix prompt seeding using the weekday instead of date
This commit is contained in:
parent
6217ffe5f8
commit
5eb2059afb
|
@ -36,8 +36,8 @@ let params = new URL(document.location).searchParams;
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
let a = params.get("a") || `${now.getFullYear()}`;
|
let a = params.get("a") || `${now.getFullYear()}`;
|
||||||
let b = params.get("b") || `${now.getMonth()}`;
|
let b = params.get("b") || `${now.getMonth()}`;
|
||||||
let c = params.get("c") || `${now.getDay()}`;
|
let c = params.get("c") || `${now.getDate()}`;
|
||||||
let d = params.get("d") || `${now.getFullYear()}${now.getMonth()}${now.getDay()}`;
|
let d = params.get("d") || `${now.getFullYear()}${now.getMonth()}${now.getDate()}`;
|
||||||
console.log("Seeds:", a, b, c, d);
|
console.log("Seeds:", a, b, c, d);
|
||||||
rand = sfc32(+a, +b, +c, +d);
|
rand = sfc32(+a, +b, +c, +d);
|
||||||
// takes a few iterations to get rolling
|
// takes a few iterations to get rolling
|
||||||
|
|
Loading…
Reference in New Issue