不同 iPhone 上的 ARKit [英] ARKit on different iPhones
问题描述
我一直在寻找 ARKit(特别是 ARSCNView)是否在所有设备上显示相同的屏幕/视图/场景大小的答案.我只有一部 iPhone XS,因此无法在其他设备上测试我的 ARKit 应用.
I've been looking for an answer to whether ARKit, specifically ARSCNView, shows the same screen/view/scene size on all devices. I only have an iPhone XS so I am unable to test my ARKit app on other devices.
目前我正在用 SpriteKit 的 SKScene 覆盖它,在 SpriteKit 中有 2 种不同尺寸的所有设备都可以运行.
Currently I am overlaying it with an SKScene from SpriteKit, and in SpriteKit there are 2 different sizes all devices run on.
通过打印语句,我已经能够通过前置摄像头找到它,从而在屏幕上呈现我的脸,并用 SKScene 覆盖它,屏幕/视图/场景/等的大小是 <强>375x812.
Through print statements I've been able to find that with the front-facing camera, thus presenting my face on-screen, and overlaying it with an SKScene, that the size of the screen/view/scene/etcetc is 375x812.
有没有人知道 ARKit + SpriteKit 覆盖的所有设备是否都具有相同的尺寸?
Does anyone happen to know if all devices present the same size with ARKit + SpriteKit overlay?
推荐答案
当然不同的 iPhone 机型呈现不同的分辨率.iPhone 的 screen size
和 viewport size
之间存在很大差异.看看这张表.在某些情况下,viewport size
是 screen size
的 1/9,有时是 – 1/4.但是,某些模型具有相同的屏幕尺寸
和视口尺寸
.
Of course different iPhone models present different resolutions. There's a big difference between iPhone's screen size
and viewport size
. Look at this table. In some cases viewport size
is 1/9 of screen size
, sometimes – 1/4. Though, some models have identical screen size
and viewport size
.
|------------------------|-----------------|-----------------|
| <Device> | <Screen Size> | <Viewport Size> |
|------------------------|-----------------|-----------------|
|------------------------|-----------------|-----------------|
| iPhone 12 Pro Max | 1284 x 2778 | 428 x 926 |
|------------------------|-----------------|-----------------|
| iPhone X | 1125 x 2436 | 375 x 812 |
|------------------------|-----------------|-----------------|
| iPhone SE 2 | 750 x 1334 | 375 x 667 |
|------------------------|-----------------|-----------------|
| iPhone 8 Plus | 1080 x 1920 | 414 x 736 |
|------------------------|-----------------|-----------------|
| iPhone 6s | 750 x 1334 | 375 x 667 |
|------------------------|-----------------|-----------------|
更多详情,你可以阅读这篇SO帖子.
For more details, you can read this SO post.
本指南为您提供了视觉呈现.
这篇关于不同 iPhone 上的 ARKit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!