问题描述
一切都在问题之中,我已经使用 cocos2d 进行了足够的工作,可以说它是一个很棒的库,但今天我只想在整个 UIKit 项目中使用粒子系统.据我所知,不幸的是,我必须用 OpenGL 实现一个.有什么建议吗?
All is in the question, I've worked enough with cocos2d to say it's a great library but today I only wanna use particle system in a total UIKit project. As long as I know, unfortunately, I have to implement one with OpenGL. Any suggestions ?
推荐答案
你可以使用Core Animation和CAReplicatorLayer 生成粒子系统,而无需下拉到 OpenGL ES.Joe Ricioppo 的To 1e100f And Beyond with CAReplicatorLayer"给出了介绍如何使用这个类.此外,Apple 有他们的 ReplicatorDemo 示例应用程序,我移植到 iPad.
You can use Core Animation and CAReplicatorLayer to generate particle systems without having to drop down to OpenGL ES. Joe Ricioppo's "To 1e100f And Beyond with CAReplicatorLayer" gives an introduction to how to use this class. Also, Apple has their ReplicatorDemo sample application, which I ported to the iPad.
在 Mac 上,还有 CAEmitterLayer,从 5.0 开始在 iOS 中可用.Apple 的示例应用程序包括 Fire,它显示关闭火焰和烟雾效果,以及 Fireworks,其中模拟烟花汇演.
On the Mac, there's also the CAEmitterLayer, which became available in iOS as of 5.0. Apple's sample applications for this include Fire, which shows off fire and smoke effects, and Fireworks, which simulates a fireworks display.
这篇关于什么是没有openGL也没有cocos2d实现粒子系统的最简单方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!