粒子动画太慢
我试图在我们触摸和移动时绘制几个粒子。当用户倾斜设备时,粒子会移动到倾斜的一侧。 我通过使用每个图像视图上的每个粒子来完成此步骤。但当查看 100 个图像时,速度太慢了。
SoilView= [[UIImageView alloc] initWithFrame:CGRectMake(currentPoint.x + randomDist1, CurrentPoint.y + randomDist2, 30, 30)];
[SoilView setImage:SoilImage];
所以我尝试将其更改为粒子动画,但效果不佳。大多数粒子动画样本只是爆炸或散落各处。所以我找不到编写代码的方法。
有没有办法让每个粒子像每个视图一样工作?
我该如何解决这个问题?有人可以帮我吗?
I'm trying to draw several particles as we touch and moving. When user tilts the device, particles moves to the tilted side.
I made this steps by using each particles on each Image View. But it's too slow when making like 100 image views.
SoilView= [[UIImageView alloc] initWithFrame:CGRectMake(currentPoint.x + randomDist1, CurrentPoint.y + randomDist2, 30, 30)];
[SoilView setImage:SoilImage];
so I tried to change this to particle animation, but it was not working well. most particle animation sample was just blowing up or scatters everywhere. so I couldn't find a way to make my code.
Is there any ways to make each particles to work like each views?
How can I solve this problem? Could Someone please help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会使用 OpenGL 来制作粒子动画。要开始使用,请查看此粒子生成器 以及 OpenGL ES 博客文章项目的作者http://iphonedevelopment。 blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html
I would use OpenGL for particle animations. To get you started take a look at this particle Generator and the OpenGL ES Blog posts of the project's author http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html