最近看到一个使用 javascript 编写的模拟粒子运动的库verlet-js,效果很不错,于是就想把他移植到 iOS 上,花了点时间使用 swift 把代码移植了过来,最后还加了一个粒子系统的 demo,源代码已经放到 github 上了:

https://github.com/MellongLau/ParticleAnimation

下面放上Demo效果截图:

Shape
Tree
Cloth
Spider
Particle System

The End