@madzmed/perlinjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Perlin JS

Installation

# npm
npm install perlin-js

# yarn
yarn add perlin-js

Usage

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);

Package Sidebar

Install

npm i @madzmed/perlinjs

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

2.48 kB

Total Files

3

Last publish

Collaborators

  • madzmed