Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
castlewong opened this issue Jun 24, 2023 · 1 comment

Comments

@castlewong
Copy link

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

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants