random.ts (seeded random)

three.js and WebGL · Edit, render, publish · MIT

What it does

mulberry32 in nine lines: createSeededRandom(seed) returns a function that gives the same sequence every time. The thing to use in place of Math.random in anything that must render the same twice.

Get it

const rng = createSeededRandom(42); const x = rng();

Source on GitHub
Needs (the whole pack)

Nothing to read the skills. To run what they build: Node and npm, Python 3 for the helper scripts, and Chromium through Playwright for the inspector and tests. Optional and paid: Tripo, Gemini and ElevenLabs keys for the three generator skills.

License

MIT

License notes are on the pack's page

From

Three.js Game Skills

Everything from Three.js Game Skills in the gallery

Back to the Asset Library