如何在android上创建烟花粒子图形效果
有人知道如何通过在画布上绘画来制作烟花效果吗? 线材动态壁纸(免费应用程序)中有一个很好的例子。
在那里,许多点移动并在星状爆炸中留下痕迹,然后逐渐消失。我认为每个移动点都有某种运动模糊,我不知道如何创建。
欢迎任何想法或相关示例的链接。
Anybody has any idea how to make a fireworks effect by drawing on canvas?
There is one nice example in wireworks live wallpaper (free app).
There, many points move and leave trails in a star like explosion and gradually disappear. I think that there is some kind of motion blur on each point moving, which I am not sure how to create.
Any ideas or links to relevant examples are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我刚刚发布了一个为普通 Android 视图提供粒子系统的库的 v1.1:https://github.com/plattysoft/Leonids
我知道这个问题很老了,你可能自己实现了它,但如果你仍然对使用库感兴趣,请检查一下。
I just released the v1.1 of a library that does particle system for normal android views: https://github.com/plattysoft/Leonids
I know the question is quite old, and you probably had implemented it yourself, but in case you are still interested on using a library, check it out.
使用:
use:
这是一个非常抽象(且有趣)的问题,但过于复杂,无法详细回答。
您真正寻找的可能是一种经过修改的粒子系统。粒子系统基本上是一个包含物理引擎的粒子引擎。
但是,您应该关注的是:
一旦您构建了它(或了解了它),您就可以轻松地将其转换为
Canvas
系统,尽管OpenGL
是更好的选择。That's a very abstract (and interesting) question but far too complex to answer in details.
What you're really looking for is probably a sort of a modified particle system. A particle system is basically an engine for particles that includes a physics engine.
However, what you should focus on are these:
Once you built it (or gotten an understanding about it) you can easily convert it to the
Canvas
system, althoughOpenGL
is the preferable alternative.