<!--
{
  "availability" : [
    "visionOS: 2.0.0 -",
    "Xcode: 16.0.0 -"
  ],
  "documentType" : "article",
  "framework" : "visionOS",
  "identifier" : "/documentation/visionOS/introductory-visionOS-samples",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Introductory visionOS samples"
}
-->

# Introductory visionOS samples

Learn the fundamentals of building apps for visionOS with beginner-friendly sample code projects.

## Overview

The samples on this page are a starting point for developers new to visionOS. Each focuses on a specific feature, providing a solid foundation to build apps for the Apple Vision Pro.

[Creating 2D shapes with SwiftUI](/documentation/visionOS/creating-2d-shapes-in-visionos-with-swiftui)

Draw two-dimensional shapes in your visionOS app with SwiftUI shapes
or with your custom shapes.

[Creating 3D entities with RealityKit](/documentation/visionOS/creating-3d-entities-with-realitykit)

Display a horizontal row of three-dimensional shapes in your visionOS app, using predefined mesh and white material.

[Creating an immersive space in visionOS](/documentation/visionOS/creating-immersive-spaces-in-visionos-with-swiftui)

Enhance your visionOS app by adding an immersive space using RealityKit.

[Adding a depth effect to text in visionOS](/documentation/visionOS/adding-a-depth-effect-to-text-in-visionOS)

Create text that expands out of a window using stacked SwiftUI text views.

[Tracking and visualizing hand movement](/documentation/visionOS/tracking-and-visualizing-hand-movement)

Use hand-tracking anchors to display a visual representation of hand transforms in visionOS.

[Creating an interactive 3D model in visionOS](/documentation/visionOS/creating-an-interactable-3d-model-in-visionos)

Display an interactive car model using gestures in a reality view.

[Creating a 3D painting space](/documentation/visionOS/creating-a-painting-space-in-visionos)

Implement a painting canvas entity, and update its mesh to represent a stroke.

[Generating procedural textures](/documentation/visionOS/generating-procedural-textures-in-visionos)

Display a 3D model that generates procedural textures in a reality view.

[Displaying a 3D environment through a portal](/documentation/visionOS/displaying-a-3D-environment-through-a-portal)

Implement a portal window that displays a 3D environment and simulates entering a portal by using RealityKit.

[Obscuring virtual items in a scene behind real-world items](/documentation/visionOS/obscuring-virtual-items-in-a-scene-behind-real-world-items)

Increase the realism of an immersive experience by adding entities with invisible materials  real-world objects.

[Animating hand models in visionOS](/documentation/visionOS/animating-hand-models-in-visionOS)

Substitute a person’s hands with custom models in a fully immersive space.

## Topics

### Building shapes

[Creating 2D shapes with SwiftUI](/documentation/visionOS/creating-2d-shapes-in-visionos-with-swiftui)

Draw two-dimensional shapes in your visionOS app with SwiftUI shapes
or with your custom shapes.

[Creating 3D entities with RealityKit](/documentation/visionOS/creating-3d-entities-with-realitykit)

Display a horizontal row of three-dimensional shapes in your visionOS app, using predefined mesh and white material.

### Working with windows

[Creating SwiftUI windows in visionOS](/documentation/visionOS/creating-a-new-swiftui-window-in-visionos)

Display and manage multiple SwiftUI windows in your visionOS app.

[Creating 3D models as movable windows](/documentation/visionOS/creating-a-volumetric-window-in-visionos)

Display 3D content with a volumetric window that people can move.

### Drawing text

[Displaying text in visionOS](/documentation/visionOS/displaying-text-in-visionOS)

Create styled text in a window using SwiftUI.

[Adding a depth effect to text in visionOS](/documentation/visionOS/adding-a-depth-effect-to-text-in-visionOS)

Create text that expands out of a window using stacked SwiftUI text views.

### Implementing an immersive space

[Creating an interactive 3D model in visionOS](/documentation/visionOS/creating-an-interactable-3d-model-in-visionos)

Display an interactive car model using gestures in a reality view.

[Creating an immersive space in visionOS](/documentation/visionOS/creating-immersive-spaces-in-visionos-with-swiftui)

Enhance your visionOS app by adding an immersive space using RealityKit.

### Managing multiple scenes

[Handling the window life cycle with multiple scenes](/documentation/visionOS/handling-the-window-life-cycle-with-multiple-scenes)

Track scene state across different window types.

[Associating a window with an immersive space](/documentation/visionOS/associating-a-window-with-an-immersive-space)

Tightly couple a window with an immersive space for persistent controls.

[Embedding controls in an immersive space](/documentation/visionOS/embedding-controls-in-an-immersive-space)

Keep controls visible throughout an immersive experience by displaying them in a window or a view attachment.

### Integrating ARKit

[Animating hand models in visionOS](/documentation/visionOS/animating-hand-models-in-visionOS)

Substitute a person’s hands with custom models in a fully immersive space.

[Creating a 3D painting space](/documentation/visionOS/creating-a-painting-space-in-visionos)

Implement a painting canvas entity, and update its mesh to represent a stroke.

[Tracking and visualizing hand movement](/documentation/visionOS/tracking-and-visualizing-hand-movement)

Use hand-tracking anchors to display a visual representation of hand transforms in visionOS.

[Displaying an entity that follows a person’s view](/documentation/visionOS/displaying-a-3D-object-that-moves-to-stay-in-a-person's-view)

Create an entity that tracks and follows head movement in an immersive scene.

[Applying mesh to real-world surroundings](/documentation/visionOS/applying-mesh-to-real-world-surroundings)

Add a layer of mesh to objects in the real world, using scene reconstruction in ARKit.

[Obscuring virtual items in a scene behind real-world items](/documentation/visionOS/obscuring-virtual-items-in-a-scene-behind-real-world-items)

Increase the realism of an immersive experience by adding entities with invisible materials  real-world objects.

### Building materials

[Generating procedural textures](/documentation/visionOS/generating-procedural-textures-in-visionos)

Display a 3D model that generates procedural textures in a reality view.

[Implementing adjustable material](/documentation/visionOS/implementing-adjustable-material-in-visionos)

Update the adjustable parameters of a 3D model in visionOS.

[Displaying a stereoscopic image](/documentation/visionOS/displaying-a-stereoscopic-image-in-visionos)

Build a stereoscopic image by applying textures to the left and right eye in a shader graph material.

### Applying spatial audio

[Playing spatial audio](/documentation/visionOS/playing-spatial-audio-in-visionos)

Create and adjust spatial audio in visionOS with RealityKit.

### Creating portals

[Displaying a 3D environment through a portal](/documentation/visionOS/displaying-a-3D-environment-through-a-portal)

Implement a portal window that displays a 3D environment and simulates entering a portal by using RealityKit.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)