@@ -19,7 +19,7 @@ By default simplex-noise.js will use Math.random() to seed the noise.
1919``` javascript
2020// initializing a new simplex instance
2121// do this only once as it is relatively expensive
22- var simplex = new SimplexNoise (),
22+ const simplex = new SimplexNoise (),
2323 value2d = simplex .noise2D (x, y),
2424 value3d = simplex .noise3D (x, y, z),
2525 value4d = simplex .noise4D (x, y, z, w);
@@ -28,7 +28,7 @@ var simplex = new SimplexNoise(),
2828You can also pass in a seed string which will then be used to initialize
2929the noise using the built in alea PRNG.
3030``` javascript
31- var simplex = new SimplexNoise (' seed' ),
31+ const simplex = new SimplexNoise (' seed' ),
3232 value2d = simplex .noise2D (x, y),
3333 sameSeed = new SimplexNoise (' seed' ),
3434 differentSeed = new SimplexNoise (' different seed' );
@@ -42,7 +42,7 @@ used to build the permutation table.
4242This can be used with a custom pseudo random number generator:
4343
4444``` javascript
45- var random = new Alea (seed),
45+ const random = new Alea (seed),
4646 simplex = new SimplexNoise (random),
4747 value2d = simplex .noise2D (x, y);
4848```
@@ -54,7 +54,7 @@ The ALEA PRNG can be found on in the npm package [alea](https://npmjs.org/packag
5454Node.js is also supported, you can install the package using [ npm] ( https://npmjs.org/package/simplex-noise ) .
5555
5656``` javascript
57- var SimplexNoise = require (' simplex-noise' ),
57+ const SimplexNoise = require (' simplex-noise' ),
5858 simplex = new SimplexNoise (Math .random ),
5959 value2d = simplex .noise2D (x, y);
6060```
@@ -77,6 +77,10 @@ npm install && npm test
7777
7878## Changelog
7979
80+ ### main
81+ - Dependency update
82+ - Setting sideEffects: false in package.json
83+
8084### 2.4.0
8185- Included a PRNG based on ALEA to directly allow seeding
8286- Included typescript definitions
0 commit comments