Seeded permutation and gradient tables that back a noise generator.
All noise variants (simplex/perlin, 2D/3D/4D) share this same table shape, so
each generator type is a structural alias of this. perm is the doubled
(512 entry) permutation table. grad3 holds the 3D gradient for each
permutation index as flat xyz triples (used by 2D and 3D noise), and grad4
holds the 4D gradient for each index as flat xyzw quads. Flat typed arrays
keep sampling free of nested array loads and allocation.
Seeded permutation and gradient tables that back a noise generator.
All noise variants (simplex/perlin, 2D/3D/4D) share this same table shape, so each generator type is a structural alias of this.
permis the doubled (512 entry) permutation table.grad3holds the 3D gradient for each permutation index as flat xyz triples (used by 2D and 3D noise), andgrad4holds the 4D gradient for each index as flat xyzw quads. Flat typed arrays keep sampling free of nested array loads and allocation.