使用 Metal 框架制作烟花爆炸动画效果:Fireworks Metal Demo

jopen 9年前

Overview

《使用 Metal 框架制作烟花爆炸动画效果》作者用几百行代码实现了想要的效果,就是为了看看能用 Swift 做些什么,以及好玩。

This uses the "Metal" low-level 3D graphics API. Mac OSX 10.11+ is required.

</div>

Features

  • 60 FPS (2015 Mac Book)

  • Silky smooth "global time" rendering; no step-based ticks with floating point errors.

  • Calculates gravity and air drag

  • Uses alpha blending

  • Two kinds of fireworks: twinkle out and plume trail

</tr> </tbody> </table> </div> </div> </div>
Note
</td>
Make sure to run it in release mode for lowest CPU use (edit the scheme).