perlin simplex worley 噪声库用于在 javascript 或 HTML5 中进行平铺?

发布于 2024-12-03 21:43:52 字数 364 浏览 4 评论 0原文

我很好奇是否已经开发了用于在 javascript 中创建这些噪音的库?

我在网上搜索了大约两个小时,寻找 javascript 中的库。我已经看到了单纯形噪声的实现:

https://gist.github.com/304522

但我还没有看到任何专门为 javascript 编写的库。

如果没有人知道任何库,那么关于如何开发这些功能的链接建议也很棒。我目前正在谷歌搜索我在这里问的所有内容,我只是觉得最好有多个网络爬虫同时帮助我:)此外,如果堆栈溢出的人已经找到了一个高质量的网站,那就更好了。

谢谢你们!

I am curious if there are libraries already developed for creating these noises in javascript?

I have searched the web for about two hours looking for libraries in javascripts. I have seen this implementation for the simplex noise:

https://gist.github.com/304522

but I have not seen any libraries made up specifically for javascript.

If no one knows of any libraries then link suggestions on how to develop these functions would be great as well. I am currently doing Google searches for everything I have asked here I just figured better to have multiple web crawlers helping me out concurrently :) Also if someone on stack overflow has already found a quality site then even better.

Thanks guys!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

明明#如月 2024-12-10 21:43:52

在这里您可以找到对该算法的彻底解释,以及 Worley 的原始代码(在纹理和建模。方法)移植到处理。

目前我正在努力部署到 Javascript。

Here you can find a thoroughly explanation of the algorithm, also the original code from Worley (explained in Texturing and modelling. A procedural approach) ported to Processing.

At the moment I'm working deploying to Javascript.

余生共白头 2024-12-10 21:43:52

对于问题的平铺部分:如果您有 Perlin 或 Simplex 噪声函数,那么您实际上并不需要库来创建平铺图像,因为数学实际上并不那么困难。困难的是理解它是如何工作的。例如:球形噪声图比简单的 2D 平铺图像容易得多,因为后者需要使用四个维度。

我曾经写过一篇博文,详细解释如何创建平铺噪声(包括JavaScript 代码示例)。
它向您展示了如何以线性、圆柱形、平面和球形(包括立方体全景)进行平铺。

For the tiling part of your question: if you have a Perlin or Simplex noise function you don't really need a library to create tiling images because the math is really not that difficult. What is difficult is understanding how it works. For instance: a spherical noise map is way easier than simple 2D tiling image because you need to work with four dimensions for the latter.

I once wrote a blog post explaining in detail how to create tiling noise (including Javascript code examples).
It shows you how to tile in linear, cylindrical, planar and spherically (including cubical panorama).

柏林苍穹下 2024-12-10 21:43:52

我制作了一个 JavaScript 应用程序,可以将 perlin/simplex 噪声渲染到 html5 画布上,您可以在这里找到它: http ://lencinhaus.github.com/canvas-noise

嗯,这不是一个合适的库,但 javascript 代码包含值噪声、perlin 噪声(经典版本和改进版本)和单纯形噪声的实现,全部源自原始 Perlin 的 C 实现(或者针对单纯形噪声的更优化的 java 版本,请参阅代码中的参考资料)。您可以直观地调整噪声参数并立即在浏览器中看到结果,所以也许它对您有用。

希望有帮助!

I've made a javascript app that renders perlin/simplex noise to an html5 canvas, you can find it here: http://lencinhaus.github.com/canvas-noise

Well it's not a proper library, but the javascript code contains implementations of value noise, perlin noise (both in classic and improved versions) and simplex noise, all derived from the original Perlin's C implementations (or a more optimized java version for simplex noise, see the references in the code). You can tweak the noise parameters visually and immediately see the results in the browser, so maybe it can be useful for you.

hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文