simplex-noise
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "simplex-noise", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "simplex-noise is a fast simplex noise implementation in Javascript.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/jwagner/simplex-noise.js", |
# simplex-noise.js | ||
simplex-noise.js is a fast simplex noise implementation in Javascript. | ||
simplex-noise.js is a fast simplex noise implementation in Javascript. It works in the browser and on nodejs. | ||
@@ -10,2 +10,5 @@ ## Requirements | ||
## Demo | ||
Simple 2D plasma demo on [jsfiddle.net](http://jsfiddle.net/UL69K/5/). | ||
## Usage | ||
@@ -30,9 +33,33 @@ | ||
## node.js | ||
Node.js is also supported, you can install the package using [npm](https://npmjs.org/package/simplex-noise). | ||
```javascript | ||
var SimplexNoise = require('simplex-noise'), | ||
simplex = new SimplexNoise(Math.random), | ||
value2d = simplex.noise2D(x, y); | ||
``` | ||
## Benchmarks | ||
[Comparison between 2D and 3D noise](http://jsperf.com/simplex-noise) | ||
[Comparison with simplex implementation in three.js](http://jsperf.com/simplex-noise-comparison) | ||
- [Comparison between 2D and 3D noise](http://jsperf.com/simplex-noise) | ||
- [Comparison with simplex implementation in three.js](http://jsperf.com/simplex-noise-comparison) | ||
## Tests | ||
There are some simple buster.js tests for this library to run them first install buster.js and jshint: | ||
```shell | ||
npm install buster.js | ||
# if you haven't done so already | ||
npm install -g jshint | ||
make tests | ||
``` | ||
## Changelog | ||
### 2.0.0 | ||
- Changed node.js api, SimplexNoise is now exported directly. | ||
- Added unit tests | ||
### 1.0.0 | ||
@@ -39,0 +66,0 @@ - Initial Release |
@@ -343,5 +343,9 @@ /* | ||
if(typeof window !== 'undefined') window.SimplexNoise = SimplexNoise; | ||
//common js | ||
if(typeof exports !== 'undefined') exports.SimplexNoise = SimplexNoise; | ||
// nodejs | ||
if(typeof exports !== 'undefined') exports.SimplexNoise = SimplexNoise; | ||
if(typeof module !== 'undefined') { | ||
module.exports = SimplexNoise; | ||
} | ||
})(); |
Sorry, the diff of this file is not supported yet
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
23140
9
446
70
1