{"id":"nightcycle/noise","name":"noise","scope":"nightcycle","platform":"roblox","description":"The functionality of 'math.noise' implemented across multiple popular styles with the syntax and API stylings of the seed constructed pseudo-random Roblox 'Random' datatype.","version":"1.0.0","latest":"1.0.0","versions":["1.0.0"],"license":"Apache-2.0","licenseRating":"safe","licenseCaveats":["Modified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved.","License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{"nightcycle/draw":{"version":"^1.0.6","alias":"Draw"},"boatbomber/hashlib":{"version":"^1.0.0","alias":"HashUtil"},"nightcycle/maid":{"version":"^1.1.4","alias":"Maid"},"nightcycle/queue":{"version":"^2.3.0","alias":"Queue"},"nightcycle/service-proxy":{"version":"^1.0.0","alias":"ServiceProxy"},"nightcycle/signal":{"version":"^1.0.2","alias":"Signal"},"nightcycle/spring":{"version":"^1.0.0","alias":"Spring"},"nightcycle/table-util":{"version":"^2.0.0","alias":"TableUtil"}},"integrity":"55277eed454fcba211be6aa77ee8e035c448b1d7f2ddfe240c346669f13f25c1","likes":0,"downloads":0,"install":"forest install nightcycle/noise","url":"https://forest.dev/p/roblox/nightcycle/noise","files":"https://api.forest.dev/ai/package/roblox/nightcycle/noise/files","readme":"# Usage\r\n\r\n```lua\r\nlocal noise = Noise.new(12345)\r\nlocal value = noise:Perlin(1, 2) -- a value from 0 to 1 (ish)\r\n```\r\n\r\n## Random\r\n\r\n<img src=\"./media/random.png\" alt=\"random\">\r\n\r\n## Perlin\r\n\r\n<img src=\"./media/perlin.png\" alt=\"perlin\">\r\n\r\n## Worley / Cellular\r\n\r\n<img src=\"./media/worley.png\" alt=\"worley\">\r\n\r\n## Voronoi\r\n\r\n<img src=\"./media/voronoi.png\" alt=\"voronoi\">\r\n\r\n# Benchmark\r\n\r\nEach map was sampled 32 times, including math.noise, to determine how long each of them took. Some maps have built in optimizations for when only x and y are provided.\r\n\r\n<img src=\"./media/bench.png\" alt=\"bench\">\r\n\r\nAs you can see, math.noise is 2x faster than anything else. The perlin implementation is literally a translation of the official luau source code, so it's unsurprisingly running the fastest. The only reason you'd used this over math.noise is if you want deterministic seed control. The random noise map is just a bunch of Random datatypes in a trenchcoat, so it's also fairly fast.\r\n\r\nIn general, the more complex maps require around 50-60 microseconds to run per call - not a dealbreaker, but you'll want to be smart when you use them. They do cache their outputs though, so calling a repeat set of conditions can be faster than math.noise.\r\n\r\n","readmeTruncated":false}