在 iPhone 游戏中使用矢量图形
我是 Flash/AS3 开发人员,我想知道一些 iPhone 开发人员如何在他们的游戏中使用矢量资源。
例如,“Lil' Pirates”:这款游戏看起来像是基于矢量的,它可以轻松缩放和缩小,但我无法获得有关在 iOS 上使用矢量资源的任何信息。
I'm Flash/AS3 developer and I'm wondering how some iPhone developers use vector assets in their games.
For example, "Lil' Pirates": this games looks like vector-based, it's zooming and unzooming easily, but I can't get any information about using vector assets at iOS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Quartz 2D 是一个非常轻量级的矢量图形框架。它有很好的文档记录...
Quartz 文档
特别是,我会特别注意分层和性能...
Quartz 分层和性能
如果性能是一个问题,我还会阅读核心动画文档。核心动画使用 CALayers 将 Quartz 绘制的矢量缓存到内存中的位图。然后可以通过动画 API 来转换和翻译这些 CALayer。如果您打算进行大量绘图,这是我推荐的路线。
Quartz 2D is a pretty lightweight framework for vector based graphics. It's very well documented...
Quartz Documentation
In particular I'd pay particular notice to layering and performance...
Quartz Layering and Performance
If performance is a worry I'd also have a read through the core animation documentation. Core animation uses CALayers to cache vectors drawn with Quartz to in-memory bitmaps. These CALayers can then be transformed and translated through the animation APIs. If you intend to perform a lot of drawing this is the route I would recommend.