如何在 iOS / ARKit 中控制 Apple ProMotion FPS?

How to control Apple ProMotion FPS in iOS / ARKit?

在 iOS 11 Beta 1 和 3 中,ARKit 应用程序的相机和显示器以 60 FPS 的速度运行,而在 iOS 11 Beta 2 中,两者都是 运行 120 FPS(促销)。

有什么方法可以控制FPS吗?我发现每秒 120 帧更适合 AR 应用程序。

使用 preferredFramesPerSecond 属性 个 ARSCNView(或 SCNView)。

SceneKit chooses an actual frame rate that is as close as possible to your preferred frame rate based on the capabilities of the screen the view is displayed on. The actual frame rate is usually a factor of the maximum refresh rate of the screen to provide a consistent frame rate. For example, if the maximum refresh rate of the screen is 60 frames per second, that is also the highest frame rate the view sets as the actual frame rate. However, if you ask for a lower frame rate, SceneKit might choose 30, 20, 15 or some other factor to be the actual frame rate. For this reason, you want to choose a frame rate that your app can consistently maintain. The default value is 60 frames per second.