Random number generators for texture generation.
Useful for generating numbers that can be used for generating, say, random terrain on a map that has some credible transition from one elevation based terrain type to another.
This implementation started with the code found in Building Up Perlin Noise by Andrew Kensler. The default code is modified from the vanilla implementation described in the blog post to include a "jitter" by default which makes 2d integer coordinates very likely not always return 0.
npm install @trinkets/noise
// or import * as random from '@trinkets/noise'// Generate some value at an x, y coordinate.consoleconsole// Build a new perlin noise method, using a configuration different from the default.const perlin2 = factories