ixfx
    Preparing search index...

    Function noise2d

    • Returns a function that samples a noise field in two dimensions.

      const f = noise2d(`simplex`);
      const v = f(0.5, 0.5); // Get noise value at this location

      Parameters

      • fn: "simplex"

        Name of noise function to use. Currently only simplex is supported.

      • OptionalrandomSource: RandomSource

        Random number generator

      Returns Promise<NoiseFunction2d>

      Function to compute noise