area199 members
Math, color & random
Vectors, quaternions and rays, colors, noise, and seeded random streams.
Start here
datumhue.math.vec2Construct a 2D vector:vec2()is(0,0),vec2(s)splats,vec2(x, y)is component-wise.datumhue.colorConstruct a color from a hex string (#RRGGBB/#RRGGBBAA) or r, g, b[, a] numbers (0..1).datumhue.random.newCreate an independent random stream from a seed.
In this area
- datumhue.mathScalar math helpers, plus the
vec2andvec3constructors. - datumhue.math.vec2Construct 2D vectors.
- datumhue.math.vec3Construct 3D vectors.
- datumhue.math.quatConstruct rotation quaternions (angles in radians).
- datumhue.colorConstruct sRGB colors.
- datumhue.noisePerlin / simplex / cellular / fractal noise samplers.
- datumhue.randomDeterministic seeded random streams, for content that must replay identically from a shared seed.
- Vec2A 2D vector (Y-up, center-origin).
- Vec3A 3D vector (Y-up).
- QuatA rotation quaternion (radians).
- RayA 3D ray: an origin and a normalized direction.
- ColorAn sRGB color.
- NoiseSamplerA configured noise sampler returned by the
datumhue.noise.*constructors. - RngAn independent seeded random stream.
- BagA shuffle-bag over positions 1 to n: every position is dealt exactly once per lap, and the bag reshuffles between laps -- draws without repeats until the pool is spent, then a fresh lap.