Set-seed UI

This commit is contained in:
Lynn
2022-01-08 00:01:19 +01:00
parent 84880b2551
commit 648324c505
5 changed files with 44 additions and 12 deletions

View File

@@ -11,7 +11,9 @@ function mulberry32(a: number) {
};
}
const seed = Number(new URLSearchParams(window.location.search).get("seed"));
export const seed = Number(
new URLSearchParams(window.location.search).get("seed")
);
const makeRandom = () => (seed ? mulberry32(seed) : () => Math.random());
let random = makeRandom();