Simplex Noise implementation in JS