1.0.0 • Published 3 years ago
@madzmed/perlinjs v1.0.0
Perlin JS
Installation
# npm
npm install perlin-js
# yarn
yarn add perlin-jsUsage
import the class
import { Perlin } from 'perlinjs';instanciate the class
const perlin = new Perlin();use the function you need:
for perlin noise:
// 3D
perlin.noise(x, y, z);
// 2D
perlin.noise(x, y);
// 1D
perlin.noise(x);for perlin fractionnal brownian motion:
// 3D
perlin.fBm(octaves, x, y, z, persistence, lacunarity);
// 2D
perlin.fBm(octaves, x, y, persistence, lacunarity);
// 1D
perlin.fBm(octaves, x, persistence, lacunarity);1.0.0
3 years ago