Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

perlin-noise

0.0.1 • Public • Published

perlin noise generator for node.js

Usage

var perlin = require('perlin-noise');
 
perlin.generatePerlinNoise(480, 480);

Documentation

generatePerlinNoise(width, height, options)

Returns a one-dimensional of length width * height in row-major order. That is, index = y * width + height.

Each value in the array will be between 0 and 1.

  • options (optional)
    • octaveCount - defaults to 4
    • amplitude - defaults to 0.1
    • persistence - defaults to 0.2

generateWhiteNoise(width, height)

Returns a one-dimensional of length width * height in row-major order. That is, index = y * width + height.

Each value in the array will be between 0 and 1.

Keywords

none

install

npm i perlin-noise

Downloadsweekly downloads

18

version

0.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability