ishaanbedi/Vision-Calculator

When will the value of showImmersiveSpace be changed? visionOS newbie here.

Opened this issue · 1 comments

.onChange(of: showImmersiveSpace) { _, newValue in
            Task {
                if newValue {
                    await openImmersiveSpace(id: "ImmersiveSpace")
                } else {
                    await dismissImmersiveSpace()
                }
            }

Hi @castlewong
From what I could gather from docs and sessions was we can utilize the concept of immersive space to give more depth and interactivity to components or the 3d models we are using wrt to the windows or volumes. So I assume when a particular logic is triggered or even explicitly by the user, we can switch back and forth bw the regular space and immersive space and then this block of code will be executed, somewhat similar to below:

HW-orbit-module@2x

Hello-World-overview.mp4

In this calculator application, we are not utilizing the immersive space capability of visionOS, but it is available to be used directly in the boilerplate while creating a new app, and the code will continue to function as usual without this modifier as well.

Even I'm trying to learn more about visionOS and there might be some gap in my understanding!