Add basic background rendering

This commit is contained in:
asraelite 2018-03-02 01:32:18 +00:00
parent 0c5ad88981
commit fc8d282509
10 changed files with 156 additions and 8 deletions

11
js/util.mjs Normal file
View file

@ -0,0 +1,11 @@
export class SeededRandom {
constructor(seed) {
this.seed = seed % 2147483647;
}
next() {
this.seed = this.seed * 16807 % 2147483647;
if (this.seed <= 0) this.seed += 2147483646;
return (this.seed - 1) / 2147483646;
}
}