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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    7
  • 1.0.0
    0

Package Sidebar

Install

npm i perlin-fp

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

4.43 kB

Total Files

6

Last publish

Collaborators

  • filipemeneses