2 分•作者: mghackerlady•29 天前
返回首页
最新
2 分•作者: berlianta•29 天前
1 分•作者: usertheinfo•29 天前
2 分•作者: baalimago•29 天前
如今万物都需要一个人工智能口号:有了它,你可以让浏览器保持打开状态,让它在你眼前以代理的方式构建你的网站!
1 分•作者: prkl•29 天前
2 分•作者: greenburger•29 天前
2 分•作者: 400thecat•29 天前
1 分•作者: zdw•29 天前
1 分•作者: azinman2•29 天前
2 分•作者: mgh2•29 天前
2 分•作者: 1vuio0pswjnm7•29 天前
2 分•作者: jonathanlydall•29 天前
1 分•作者: 1vuio0pswjnm7•29 天前
2 分•作者: Leftium•29 天前
源代码:<a href="https://github.com/Leftium/fx/blob/main/src/routes/fire-plasma/%2Bpage.svelte" rel="nofollow">https://github.com/Leftium/fx/blob/main/src/routes/fire-plasma/%2Bpage.svelte</a><p>我尽可能真实地模拟了这种朴素的火焰效果;可以说比一些基于真实火焰流体动力学[1]的模拟更真实。朴素算法使用一个核来模拟热量的对流、扩散和冷却。Joakim Hårsman[2]对此进行了更详细的描述。还可以看看Justin Greisiger Frost[3]的原始火焰算法的演示。<p>虽然 Canvas 和 CPU 组合能获得惊人的良好性能,但这种效果在 GPU 上可能会运行得更快。在移动设备上,此版本经过优化,效果更佳:<a href="https://fx.leftium.com/fire-plasma?standardSize=0&text=Le" rel="nofollow">https://fx.leftium.com/fire-plasma?standardSize=0&text=Le</a><p>在我改进的版本中,火焰会“舔舐”浮动文本的底部。这是我最喜欢的部分。这完全是意料之外的,只是从算法中涌现出来的。通过更改文本,可以与 Joakim 的版本进行比较:<a href="https://fx.leftium.com/fire-plasma?text=%E2%97%AF" rel="nofollow">https://fx.leftium.com/fire-plasma?text=%E2%97%AF</a><p>与现有技术相比的主要改进:<p>- 具有透明度的真彩色火焰渐变/调色板在非黑色背景上看起来不错:<a href="https://fx.leftium.com/fire-plasma?bgColor=" rel="nofollow">https://fx.leftium.com/fire-plasma?bgColor=</a><p>- 使用 Perlin 噪声 + 布朗分形运动播种火焰:火焰整体不太均匀,同时避免了火焰底部出现“随机混乱”:<a href="https://fx.leftium.com/fire-plasma?fireSeedIndex=3" rel="nofollow">https://fx.leftium.com/fire-plasma?fireSeedIndex=3</a><p>- 更复杂的火焰核,以获得更逼真的火焰外观<p>这是我最近在没有代码助手协助下完成的早期项目之一。我只与 LLM 进行了几次对话以获取想法和帮助解决类型错误。因此,我认为这个项目花费了更多时间,但代码更加简洁/手工制作。<p>---<p>我想知道是否有人能找到其他令人愉悦的分形噪声种子值。可以通过 URL 参数调整这些值,如下所示:<a href="https://fx.leftium.com/fire-plasma?octaves=4&lacunarity=2&gain=0.5&amplitude=1&frequency=1" rel="nofollow">https://fx.leftium.com/fire-plasma?octaves=4&lacunarity=2&ga...</a><p>您也可以使用以下 URL 查看 Perlin 噪声本身:<a href="https://fx.leftium.com/fractal-noise?octaves=4&lacunarity=2&gain=0.5&amplitude=1&frequency=1" rel="nofollow">https://fx.leftium.com/fractal-noise?octaves=4&lacunarity=2&...</a><p>关于倍频、 the lacunarity、增益等的描述:<a href="https://gamedev.stackexchange.com/a/197862/229" rel="nofollow">https://gamedev.stackexchange.com/a/197862/229</a><p>[1]: <a href="https://www.escapemotions.com/experiments/fluid_fire_3/" rel="nofollow">https://www.escapemotions.com/experiments/fluid_fire_3/</a><p>[2]: <a href="https://ghostinthecode.net/2016/08/17/fire.html" rel="nofollow">https://ghostinthecode.net/2016/08/17/fire.html</a><p>[3]: <a href="https://jdfio.com/pages-output/demos/x-mode/" rel="nofollow">https://jdfio.com/pages-output/demos/x-mode/</a>
1 分•作者: mhb•29 天前
1 分•作者: m2mcent•29 天前
1 分•作者: thequert•29 天前
1 分•作者: personjerry•29 天前
1 分•作者: cf100clunk•29 天前
3 分•作者: nogajun•29 天前