API

Interface LoadUsdOptions

Configuration for loadUsd. Paths in files share a virtual filesystem with rootFileName.

interface LoadUsdOptions {
    files?: Readonly<Record<string, UsdBinaryInput>>;
    onLog?: (level: "error" | "info" | "warning", message: string) => void;
    onProgress?: (progress: UsdProgress) => void;
    resolveByFileName?: boolean;
    rootFileName?: string;
    runtimeBaseUrl?: string;
    signal?: AbortSignal;
}
Index
files?: Readonly<Record<string, UsdBinaryInput>>

Referenced layers, payloads and textures. Preserve their authored relative paths and case.

onLog?: (level: "error" | "info" | "warning", message: string) => void

Receives native OpenUSD diagnostics.

onProgress?: (progress: UsdProgress) => void

Reports loading phases. Exceptions thrown by this callback reject the import.

resolveByFileName?: boolean

Allow conservative filename fallback for unresolved references. Default true.

rootFileName?: string

Relative virtual path of the root layer. Inferred from the URL or File when omitted.

runtimeBaseUrl?: string

Directory containing the shared protocol-v5 worker, glue, WASM and data files. Defaults to the Babylon.js CDN.

signal?: AbortSignal

Cancels fetching, extraction and materialization, releasing partial resources.