math docs
    Preparing search index...

    Type Alias Permutation

    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.

    type Permutation = {
        grad3: Float64Array;
        grad4: Float64Array;
        perm: Uint8Array;
    }
    Index
    grad3: Float64Array
    grad4: Float64Array
    perm: Uint8Array