1.1.2 • Published 3 years ago

jsnl v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

jsnl

JavaScript Noise Library

How to use

  1. Require jsnl
    var NL = require("jsnl").NL; // require the class
  2. Create an instance of NL (with options if you are using layered Perlin noise):

    var NL = require("jsnl").NL;
    
    var n = new NL(45, 25); // width, height of perlin noise
    // or with options:
    var n = new NL(45, 25, {
    	layers: 5
    });
  3. Use the function .p() or .lp() to create Perlin noise or layered Perlin noise respectively

    ```js
    var NL = require("jsnl").NL;
    
    var nlinstance = new NL(45, 25);
    var noise = nlinstance.p();
    // or for layered noise
    var nlinstance = new NL(45, 25, {
    	layers: 5
    });
    var noise = nlinstance.lp();
    ```

    You will be returned a list of lists, each list in the list of lists containg 1 Perlin noise number.

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago