I need to implement a noise function from the Noise.js library into my code. How can I properly add this library to my file for it to be utilized?
Below is the snippet of code that involves calling the noise function:
// Utilizing the noise.js library to generate a grid of 2D simplex noise values
try {
noise.seed(Math.random());
}
catch(err) {
console.log(err.message);
}
For those interested, here is the link to the ThreeJS file that uses the noise function to create 3D curl noise:
And here is the Noise library itself: https://github.com/josephg/noisejs