visionOS Apple Samples
Update: 2025/2/9
現在 56個 のサンプルがあります
New!
-
[Object tracking with Reality Composer Pro experiences]
https://developer.apple.com/documentation/visionos/object-tracking-with-reality-composer-pro-experiences -
[Creating a multiview video playback experience in visionOS]
https://developer.apple.com/documentation/avkit/creating-a-multiview-video-playback-experience-in-visionos -
[Docking a video player in an immersive scene]
https://developer.apple.com/documentation/realitykit/docking-a-video-player-in-an-immersive-scene
visionOS
Introductory visionOS samples
難易度: ★☆☆☆☆ - ★★☆☆☆
Hello World
難易度: ★★★☆☆
VolumeとImmersive Space表示への遷移があり、SystemとComponentを使った制御もある、参考になる要素が多い内容。画面要素の組み立て方も必見。
Destination Video
難易度: ★★★☆☆
動画再生とその制御で参考にするのはこちら。背景を完全に置き換えた空間内で再生する状態もあり。
Diorama
難易度: ★★★☆☆
Reality Composer Proで構築された2つの箱庭的3Dオブジェクトの表示とその切り替え。サウンドやAttachmentの実装も参考になる。
Happy Beam
難易度: ★★★★☆
Hand Gestureの作り方、ゲーム的進行の制御、ARKitの扱いが盛り込まれた内容。
Swift Splash
難易度: ★★★★☆
Reality Composer Proで作られたコンポーネントを接続する。要素選択画面や接続処理など。
BOT-anist
難易度: ★★★☆☆
キャラクタカスタマイズの部分とアニメーションとインタラクション。
Placing content on detected planes
難易度: ★★★☆☆
4種のモデルを空間に配置。永続化と復元も処理している。
Incorporating real-world surroundings in an immersive experience
難易度: ★★☆☆☆
空間をタップするとキューブが生成され物理演算される。タップの制御やModel生成や物理の設定など参考になる。
Exploring object tracking with ARKit
難易度: ★★☆☆☆
オブジェクトトラッキング。Appleのキーボードのテストデータがある。任意のモデルをトラッキングしたい場合は自分で追加する必要あり。
Object tracking with Reality Composer Pro experiences
難易度: ★★☆☆☆
オブジェクトトラッキングからゲーム体験へ。Appleのキーボードを基点にストーリーが展開する仕掛け。入力判定が厳しく操作性に難があるがオブジェクトを軸にした表示として参考になる。
Building local experiences with room tracking
難易度: ★★☆☆☆
部屋を移動する際の制御。目の前に追従するインターフェイスなど。
Placing entities using head and device transform
難易度: ★★☆☆☆
鳥が自分に追従してきたり、自分の目の前の固定位置に居続けたりする。
シミュレータでも実行可能。
Creating a multiview video playback experience in visionOS
難易度: ★★★☆☆
複数映像の同時再生。
Multiview buttonで同時視聴モードになりAVExperienceController、AVContentSelectionViewControllerで再生や動的な再生ビデオ追加を制御している。
Accessing the main camera
難易度: ★★☆☆☆
Enterpriseライセンスが必要。
MainCamera(左側カメラ)から映像取得する処理。
CameraFrameProvider。
Displaying video from connected devices
難易度: ★★☆☆☆
Enterpriseライセンスが必要。
Developer Strapで接続したUSBビデオクラス(UVC)デバイスから映像表示をする実装。
AVCaptureDevice.DiscoverySession(deviceTypes: [.external], mediaType: .video, position: .unspecified) で機器を見つけるようですね。
Locating and decoding barcodes in 3D space
難易度: ★★☆☆☆
Enterpriseライセンスが必要。
空間内でのバーコード、QRコードの位置取得処理。
BarcodeDetectionProvider。
RealityKit
Transforming entities between RealityKit coordinate spaces
難易度: ★★☆☆☆
Volumetric内のEntityとImmersive Space内のEntityの相互移動処理。
Transforming RealityKit entities using gestures
難易度: ★★☆☆☆
様々なパターンでのEntityのdrag、scale、rotateの設定処理。
Animating entity rotation with a system
難易度: ★★☆☆☆
RealityKitでEntity Component Systemを使って回転制御する処理。
回転処理実装で悩んだらここを参照しそう。
Packageの方で実装し本体からはシンプルな呼び出しにしている構成も参考になる。
Responding to gestures on an entity
難易度: ★☆☆☆☆
SpatialEventGestureの使い方。
RealityViewを使って表示したEntityのタップ処理を実装するミニマムな実装。
Attachmentの有無を切り替えている。
誰かにこのあたりの処理を説明する時に良さそうな内容。
Composing interactive 3D content with RealityKit and Reality Composer Pro
難易度: ★★★☆☆
Presenting an artist’s scene
難易度: ★★☆☆☆
Creating a spatial drawing app with RealityKit
難易度: ★★★★★
Generating interactive geometry with RealityKit
難易度: ★★★☆☆
インタラクティブなメッシュ生成。Low-level MeshとLow-level Texture使用。
Combining 2D and 3D views in an immersive app
難易度: ★★☆☆☆
Rendering a windowed game in stereo
難易度: ★★☆☆☆
Creating a Spaceship game
難易度: ★★★★☆
Docking a video player in an immersive scene
難易度: ★★☆☆☆
非Immersive Space時の動画再生をImmersive Spaceになった際に位置固定して表示する。
.immersiveEnvironmentPicker も使用している。Playerの持ち方、Componentの付け方など参考になる。使用動画の音声はDolby Atmosのようだ。
Simulating physics with collisions in your visionOS app
難易度: ★★☆☆☆
Simulating particles in your visionOS app
難易度: ★★☆☆☆
Simulating physics joints in your RealityKit app
難易度: ★★☆☆☆
Construct an immersive environment for visionOS
難易度: ★★☆☆☆
Group Activities
Customizing spatial Persona templates
難易度: ★★★☆☆
TabletopKit
Creating tabletop games
難易度: ★★★☆☆
Compositor Services
Interacting with virtual content blended with passthrough
難易度: ★★★☆☆
AVFoundation
Reading multiview 3D video files
難易度: ★★☆☆☆
Converting side-by-side 3D video to multiview HEVC and spatial video
難易度: ★★☆☆☆
Image I/O
Writing spatial photos
難易度: ★★☆☆☆
Spatial Photo生成のコマンドラインツール。引数でオプション指定可能。生成されるのはheic。
Discussion