Add parallax

This commit is contained in:
Schmelczer András 2019-12-23 14:39:49 +01:00
parent c8679b77bf
commit c2dbf995cc
18 changed files with 102 additions and 56 deletions

View file

@ -25,3 +25,8 @@ const hexToRGB = (hex: string): [number, number, number] => {
const RGBToHex = (rgb: [number, number, number]): string =>
rgb.map(n => Math.round(n).toString(16)).join("");
export const randomFactory = seed => () =>
((2 ** 31 - 1) & (seed = Math.imul(48271, seed))) / 2 ** 31;
export const fixedSeedRandom = randomFactory(42);