How to add an ornament to a window or volume in VisionOS
Create an ornament view and in the app, add the ornament to a view within a window group.
The code for this tutorial can be found in the repository linked below on the 101/window-ornaments branch.
Please note that the example provided demonstrates the proof of concept through a window, but the same process could be used to add an ornament to a volume.
Step One: Create the Ornament
Create a SwiftUI view for the ornament.
Step Two: Add the Ornament to a View
In the VisionOS App, add the ornament to a view within a window group.
Step Three: Test
Run the app in the simulator and make sure everything works as expected.
Looking to learn more about VisionOS, Spatial Computing, Design and Technology?
Search our blog to learn more about visionOS, spatial computing, design and technology.