Skip to content

Instantly share code, notes, and snippets.

View max8899's full-sized avatar
💭
Single

Lei Gong max8899

💭
Single
View GitHub Profile
@max8899
max8899 / perlin-noise-classical.js
Created April 10, 2018 03:35 — forked from banksean/perlin-noise-classical.js
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/