1
0
Fork 0

Fix prompt seeding using the weekday instead of date

This commit is contained in:
Tim Van Baak 2024-02-05 20:58:44 -08:00
parent 6217ffe5f8
commit 5eb2059afb
1 changed files with 2 additions and 2 deletions

View File

@ -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