View in English

  • Apple Developer
    • 今すぐ始める

    「今すぐ始める」を詳しく見る

    • 概要
    • 学ぶ
    • Apple Developer Program

    最新情報

    • 最新ニュース
    • Hello Developer
    • プラットフォーム

    プラットフォームを詳しく見る

    • Appleプラットフォーム
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    特集

    • デザイン
    • 配信
    • ゲーム
    • アクセサリ
    • Web
    • Home
    • CarPlay
    • テクノロジー

    テクノロジーを詳しく見る

    • 概要
    • Xcode
    • Swift
    • SwiftUI

    特集

    • アクセシビリティ
    • App Intent
    • Apple Intelligence
    • ゲーム
    • 機械学習とAI
    • セキュリティ
    • Xcode Cloud
    • コミュニティ

    コミュニティを詳しく見る

    • 概要
    • 「Appleに相談」イベント
    • コミュニティによるイベント
    • デベロッパフォーラム
    • オープンソース

    特集

    • WWDC
    • Swift Student Challenge
    • デベロッパストーリー
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Center
    • ドキュメント

    ドキュメントを詳しく見る

    • ドキュメントライブラリ
    • テクノロジー概要
    • サンプルコード
    • ヒューマンインターフェイスガイドライン
    • ビデオ

    リリースノート

    • 注目のアップデート
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • ダウンロード

    ダウンロードを詳しく見る

    • すべてのダウンロード
    • オペレーティングシステム
    • アプリ
    • デザインリソース

    特集

    • Xcode
    • TestFlight
    • フォント
    • SF Symbols
    • Icon Composer
    • サポート

    サポートを詳しく見る

    • 概要
    • ヘルプガイド
    • デベロッパフォーラム
    • フィードバックアシスタント
    • お問い合わせ

    特集

    • アカウントヘルプ
    • App Reviewガイドライン
    • App Store Connectヘルプ
    • 近日導入予定の要件
    • 契約およびガイドライン
    • システムステータス
  • クイックリンク

    • イベント
    • ニュース
    • Forum
    • サンプルコード
    • ビデオ
 

ビデオ

メニューを開く メニューを閉じる
  • コレクション
  • すべてのビデオ
  • 利用方法

その他のビデオ

  • 概要
  • Summary
  • コード
  • Spatial Previewフレームワークの詳細

    MacのコンテンツをvisionOSに直接取り込むことのできる、新しいSpatial Previewフレームワークを紹介します。2つのプラットフォーム間でのライブ同期と双方向編集を活用して、柔軟なワークフローを確立する方法を確認しましょう。SpatialPreview API、デバイス検出、2Dおよび3Dセッションの統合、Macアプリの空間コンピューティングを向上させるクイックルックの新機能といったトピックも取り上げます。

    関連する章

    • 0:00 - Introduction
    • 2:37 - Learn about Spatial Preview
    • 3:30 - Document Preview
    • 6:36 - USD Preview
    • 9:16 - Editing Features
    • 13:28 - Next steps

    リソース

    • Reducing the rendering cost of RealityKit content on visionOS
    • Spatial Preview
      • HDビデオ
      • SDビデオ

    関連ビデオ

    WWDC26

    • USDKitの概要とOpenUSDの新機能
    • visionOSでの構造化3Dモデルの共同作業

    WWDC22

    • USDの基礎の理解
  • このビデオを検索
    • 3:58 - Document Preview Session with Device Picker

      // Send and update documents using the Spatial Preview framework
      
      import SwiftUI
      import SpatialPreview
      let deviceObserver = ConnectedSpatialEndpointObserver()
      
      let previewSession = DocumentPreviewSession(name: "Immersive.aivu", contentType: .aivu)
      
      func startPreview(contentURL: URL, endpoint: SpatialPreviewEndpoint) async throws {
          let endpoint = try await deviceObserver.endpoint
          try await previewSession.start(endpoint: endpoint)
          try await previewSession.updateContents(url: contentURL)
      }
      
      @State var showDevicePicker: Bool = false
      
      var body: some View {
          ...
          .sheet(isPresented: $showDevicePicker) {
              SpatialPreviewDevicePicker(isPresented: $showDevicePicker) { endpoint in
                  showDevicePicker = false
                  Task {
                      try await startPreview(filename: filename, endpoint: endpoint)
                  }
              }
          }
      }
    • 5:20 - Update Document Contents

      // Send and update documents using the Spatial Preview framework
      
      import SwiftUI
      import SpatialPreview
      
      ForEach(contentURLs, id: \.self) { url in
          Button {
              Task { try await previewSession?.updateContents(url: url) }
          }
      }
      .task(id: previewSession.map { ObjectIdentifier($0) }) {
          for await state in Observations({ session.state }) {
              if state.isInvalidated {
                  previewSession = nil
                  break
              }
          }
      }
      
      try await previewSession?.close()
    • 7:36 - Edit USD Live

      // Edit USD live using USDKit and Spatial Preview
      
      import SpatialPreview
      import USDKit
      
      let deviceObserver = ConnectedSpatialEndpointObserver()
      
      var usdSession: USDPreviewSession?
      
      func shareStage(to endpoint: SpatialPreviewEndpoint) async throws -> USDPreviewSession {
          let endpoint = try await deviceObserver.endpoint
      
          let stageURL = Bundle.main.url(forResource: "sampleScene", withExtension: "usdz")
          let stage = try USDStage.open(stageURL)
          usdSession = USDPreviewSession(stage: stage)
      
          try await usdSession?.start(endpoint: endpoint)
      }
    • 8:56 - Opt out of optimization

      // Optimization
      
      import SpatialPreview
      
      
      
      
      let endpoint = try await deviceObserver.endpoint
      do {
          try await usdSession.start(endpoint: endpoint, parameters: .unmodified)
      } catch USDPreviewSession.Error.assetUnshareable {
          // Handle Asset Unshareable error
      }
    • 10:10 - USD Layout Variants

      // LayoutVariants.usda
      #usda 1.0
      over "furniture" (
          variantSets = "Layout"
          variants = { string Layout = "LayoutA" }
      )
      {
          variantSet "Layout" = {
              "LayoutA" {
                  // Default furniture position and rotation
              }
              "LayoutB" {
                  // Moves furniture prims to a different position and rotation
              }
              ...
          }
      }
    • 10:17 - Edit USD live using USDKit and Spatial Preview

      // Edit USD live using USDKit and Spatial Preview
      
      import SpatialPreview
      import USDKit
      
      func applyLayoutVariant(named layoutVariantName: String) throws {
          let prim = stage.prim(at: SdfPath("/root/furniture"))
          try prim.variantSets?.setSelection("Layout", variantName: layoutVariantName)
      }
    • 10:49 - USD Stage Observations

      // Edit USD live using Spatial Preview
      
      import SpatialPreview
      import USDKit
      
      let observerToken: ObservationToken
      
      observerToken = stage.addObserver(for: UsdStage.ObjectsDidChange.self) { notice in
          for path in notice.resyncedPaths {
              let prim = notice.stage.prim(at: path)
              guard prim.isValid else { continue }
              if prim.isAnnotation {
                  // Handle annotation change
                  break
              }
          }
      }
    • 11:13 - Annotation Spec

      // Annotation spec example
      
      AppleTextAnnotation {
          // The textual representation of this annotation
          string text
      
          // The identifier for this specific author
          uniform string author
      
          // An identifier that is unique to your data tracking system
          uniform string identifier
      }
      
      /__documentAnnotationGroup__
    • 11:33 - Metadata for Object Manipulation

      // Metadata required for object manipulation in Quick Look
      
      customData = {
          dictionary apple = {
              bool spatialEditable = 1
          }
      }
    • 12:16 - Session Options and Events

      // Spatial Preview session options and events
      
      import SpatialPreview
      import USDKit
      
      session.start(endpoint: endpoint, options: [.annotations, .perObjectManipulation, .export])
      
      func listenForEvents(session: USDPreviewSession) async {
          for await event in session.events {
              if case .timeChanged(let time) = event {
                  playbackModel.timeCode = time
              } else if case .playbackStateChanged(let isPlaying) = event {
                  playbackModel.playbackStateChanged(isPlaying)
              }
          }
      }
    • 12:38 - Observe Session Progress

      // Observe Spatial Preview session progress
      
      import SpatialPreview
      import USDKit
      
      @State private var sessionProgress: Double = 0
      
      var body: some View {
          ...
          .task(id: usdSession.map { ObjectIdentifier($0) }) {
              guard let session = usdSession else { return }
              for await fraction in Observations({ session.progress.fractionCompleted }) {
                  sessionProgress = fraction
              }
          }
          .overlay(alignment: .bottom) {
              ProgressView(value: sessionProgress)
                  .padding()
          }
      }
    • 0:00 - Introduction
    • The Spatial Preview framework, which lets developers extend content from Mac into visionOS using Mac Virtual Display. Previews what the session covers: an overview of the framework, document preview, and USD preview for live 3D workflows.

    • 2:37 - Learn about Spatial Preview
    • Explores the core components of the Spatial Preview framework: selecting a spatial endpoint, creating a preview session, and launching Quick Look on visionOS. Covers the two session types—Document Preview Session and USD Preview Session—and explains that no visionOS code is required.

    • 3:30 - Document Preview
    • Walks through using DocumentPreviewSession to send files like Apple Immersive Video frames from a Mac app to visionOS. Covers obtaining a Mac Virtual Display endpoint with ConnectedSpatialEndpointObserver, starting a session, providing content URLs, integrating SpatialPreviewDevicePicker in SwiftUI, and using updateContents to build a gallery experience that reuses the same scene.

    • 6:36 - USD Preview
    • Shows how to share and live-edit USD content from a Mac app on visionOS using USDPreviewSession with a USDKit stage. Covers selecting a device, opening a USD stage, starting the session, and handling unshareable assets via the optimization parameter.

    • 9:16 - Editing Features
    • Covers the rich set of Quick Look editing features available through USD Preview: USD layout variants, annotation authoring with AppleTextAnnotation, object manipulation with spatialEditable metadata, and session options including playback events and progress monitoring via ProgressReporter.

    • 13:28 - Next steps
    • Summarizes how to get started with Spatial Preview using USDKit Swift APIs and bridging for existing USD apps. Encourages developers to explore Document Preview Session, USD Preview Session, live editing, SharePlay collaboration, and the full suite of asset review tools.

Developer Footer

  • ビデオ
  • WWDC26
  • Spatial Previewフレームワークの詳細
  • メニューを開く メニューを閉じる
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    メニューを開く メニューを閉じる
    • アクセシビリティ
    • アクセサリ
    • Apple Intelligence
    • App Extension
    • App Store
    • オーディオとビデオ(英語)
    • 拡張現実
    • デザイン
    • 配信
    • 教育
    • フォント(英語)
    • ゲーム
    • ヘルスケアとフィットネス
    • アプリ内課金
    • ローカリゼーション
    • マップと位置情報
    • 機械学習とAI
    • オープンソース(英語)
    • セキュリティ
    • SafariとWeb(英語)
    メニューを開く メニューを閉じる
    • 英語ドキュメント(完全版)
    • 日本語ドキュメント(一部トピック)
    • チュートリアル
    • ダウンロード
    • フォーラム(英語)
    • ビデオ
    Open Menu Close Menu
    • サポートドキュメント
    • お問い合わせ
    • バグ報告
    • システム状況(英語)
    メニューを開く メニューを閉じる
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles(英語)
    • フィードバックアシスタント
    メニューを開く メニューを閉じる
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program(英語)
    • Mini Apps Partner Program
    • News Partner Program(英語)
    • Video Partner Program(英語)
    • セキュリティ報奨金プログラム(英語)
    • Security Research Device Program(英語)
    Open Menu Close Menu
    • Appleに相談
    • Apple Developer Center
    • App Store Awards(英語)
    • Apple Design Awards
    • Apple Developer Academy(英語)
    • WWDC
    最新ニュースを読む。
    Apple Developerアプリを入手する。
    Copyright © 2026 Apple Inc. All rights reserved.
    利用規約 プライバシーポリシー 契約とガイドライン