perlin-fp

    1.0.1 • Public • Published

    perlin-fp

    A fluent functional 3-dimensional Perlin noise generator based on p5.js Perlin noise implementation


    Install

    npm i -S perlin-fp
     
    # with yarn 
    # yarn add perlin-fp 

    Examples

    Basic (random seed)

    const perlinNoise = require('perlin-fp');
    const { getNoiseByCoordinate } = perlinNoise();
     
    const x = 0;
    const y = 0;
    const z = 0;
     
    getNoiseByCoordinate(x, y, z);
    // -> 0.5324108156492002

    With all options

    const perlinNoise = require('perlin-fp');
    const { getNoiseByCoordinate } = perlinNoise()
      .setSeed(1)
      .setOctaves(4)
      .setAmpFallOff(0.5);
     
    const x = 0;
    const y = 0;
    const z = 0;
     
    console.log(getNoiseByCoordinate(x, y, z));
    // -> 0.22167705494211987

    Install

    npm i perlin-fp

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.43 kB

    Total Files

    6

    Last publish

    Collaborators

    • filipemeneses