Pryme8 Posted February 18, 2016 Share Posted February 18, 2016 Ok So I have a question, I have been trying desperately to find someone that implemented a JavaScript library for producing different noise algorithms. I have Perlin2D covered but would like to support more. I need to be able to call the generator like noise.worley2D(x/xdiv, y/ydiv, seed); and have a response that will give me an reproducible response depending on the seed. Every bit of documentation I can find does not help me with actually achieving this. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted February 21, 2016 Share Posted February 21, 2016 Theres a superb JS one for Voronoi here. Its a little old but works brilliantly and once you get it in your project (use the tried-and-tested copy-paste module system) the API is clean and documented just well enough for you to be able to get on. I did search fairly extensively as I really didnt want to write my own and this was, sadly, the only (voronoi) one I could find in any sort of usable state, thankfully, it worked out great and is reasonably quick, as you probably know, Voronoi isnt a fast algorithm. Voronoi does not work like Perlin/Simplex, its needs a defined search space. I had to stitch together vertices of adjoining regions to get an 'infinite' terrain, which was a pain, and did create seams, although depending on what you wanted to do you could create your own polygons from all the vertices but you're almost getting into the realms of creating your own generator then (in my case I ended up ditching voronoi in favour of other faster implementations which were almost visually similar). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.