Add parallax
This commit is contained in:
parent
c8679b77bf
commit
c2dbf995cc
18 changed files with 102 additions and 56 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue