在创建游戏的范围之外,如何在 iOS 中创建程序生成的可视化效果?

How does one create procedurally generated visualizations in iOS, outside the scope of creating a game?

我希望能够创建与移动应用程序 SweatCoin 类似的可视化效果。

图片参考:https://immortalallure.com/2018/06/26/can-you-really-turn-your-sweat-into-money-my-first-2-weeks-using-the-sweatcoin-app/

当用户移动设备时,它们会按程序生成一种 "terrain" 格子。我假设他们正在使用 CoreMotion 的 accel/gyro 来跟踪设备并实时生成视觉效果。但是,我无法确定实际地形是如何产生的(完全披露:我的专长不是游戏开发)。

完成此可视化需要哪些 Swift 模块?

我试过使用 CALayers 来完成这个,但没有任何运气。

实现 3D "terrain" 是使用 SceneKit 完成的,"terrain" 是加载到SceneKit SCNView 场景。然后 SCNView 作为 ViewController 视图的子视图实现。

关于动画,它最有可能使用Core-Motion将陀螺仪和加速度计运动连接到SCNView 内根节点的旋转,以实现用户移动设备时的透视效果。