English 中文(简体)
创建一个有利于“pple”愿景的新项目
原标题:Creating a new project on apple vision pro

围绕“pple”和“xcode”的新项目,有以下选择。 请解释:

初步情况

<和Volume

循环空间

None ,Mixed,Progressive,Full

“enterography

“在此处的影像描述”/</a

最佳回答

下面请你说明:

Windows

你可以在你的愿景中创造一个或多个窗口。 它们以快速倡议为基础,含有传统观点和控制,你可以通过增加3D内容来丰富经验。

? 视窗可以像我们为SOS和macOS仪器制造窗口一样创建。

import SwiftUI

@main
struct VisionProApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

Volumes

Add depth to your app with a 3D volume. Volumes are SwiftUI scenes that can showcase 3D content using RealityKit or Unity, creating experiences that are viewable from any angle in the Shared Space or an app’s Full Space.

? 卷量可以通过简单地将窗户改成体质来生成。 我们还可以为3D模式提供缺省规模和深度。

import SwiftUI

@main
struct VisionProApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        .windowStyle(.volumetric)
        .defaultSize(width: 400, height: 400, depth: 400)
    }
}

Spaces

缺席时,将射入共同空间,在共同空间中,两者是一旁边的,与在台式台上的多 app一样。 申请可使用Windows和 Volumes显示内容,用户可在任何地方重新定位这些内容。 就更深层的经验而言,一台望远镜可以开辟一个专用的全空间,只有显示其内容。 在“全空间”中,一台仪器可以使用窗户和卷土,制造不受约束的3D内容,向不同的世界开放一个门户,甚至在一个环境中全面渗透人们。

? 为了增加一个全空间,简单地说,在应用情景中添加一个带有国际发展特征的Immerive Space Scene,并且用国际发展法把它称作“快速倡议”的Windows。

There are three types of Immersion styles available:
  1. Mixed: Where the User co-exists with the real world.
  2. Progressive: It’s a middle ground where the Immersion level can be controlled by the digital crown.
  3. Full: Becomes Fully Immersive and hides the people’s surroundings.
import SwiftUI

@main
struct VisionProApp: App {
    
    @State private var immersionStyle: ImmersionStyle = .mixed
    
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        
        ImmersiveSpace(id: "Immersion_View") {
            PlanneView()
        }
        .immersionStyle(selection: $immersionStyle, in: .mixed, .progressive, .full)
    }
}

希望对你们有益。

问题回答

暂无回答




相关问题
How do I make my text navigate me to a subpage?

I have the text "Groups" and I want to use NavigationLink to connect it to my GroupsPage subpage and take the user there when they click the Groups text. This is my whole file: import ...

ld: warning: has malformed LC_DYSYMTAB

Working on building a react-native wrapper for the WireGuardKit library, but I m having trouble getting it to work in a swift app for testing purposes. The library compiles, the app compiles, but when ...

Active target for Xcode syntax highlighting

In my project, I have several binary targets and a few files which are included in multiple binaries. Consider a file containing: #if TARGET_APP eventParameters["app_container&...

热门标签