It requires typed arrays, if you want to use it in browsers without support you will need to use a polyfill like typedarray.js.
// initializing a simplex instance// do this only once it's relatively expensivevar simplex =value2d = simplexnoise2Dx yvalue3d = simplexnoise3Dx y zvalue4d = simplexnoise2Dx y z w;
You can also pass an alternative random function to the constructor that is used to build the permutation table:
var simplex = Mathrandomvalue2d = simplexnoise2Dx y;
- Initial Release