Class USDFileLoader
Implements
Constructors
constructor
-
Creates a USD loader.
Parameters
- options: Partial<USDFileLoaderOptions> = {}
Options controlling worker assets, supporting files, and diagnostics.
Returns USDFileLoader
- options: Partial<USDFileLoaderOptions> = {}
Properties
Readonlyextensions
Defines the extensions the plugin can load.
Readonlyname
Defines the name of the plugin.
StaticDefault Configuration
dataUrl: string;
glueUrl: string;
wasmUrl: string;
workerUrl: string;
} = ...
Default URLs for the prebuilt OpenUSD importer assets.
Methods
create Plugin
-
Creates a configured plugin instance for a SceneLoader operation.
Parameters
- options: SceneLoaderPluginOptions
SceneLoader plugin options.
Returns ISceneLoaderPluginAsync
The configured USD loader.
- options: SceneLoaderPluginOptions
dispose
-
Releases the worker and rejects pending loads.
Returns void
import Mesh Async
-
importMeshAsync(
_meshesNames: string | readonly string[] | null | undefined,
scene: Scene,
data: unknown,
rootUrl: string,
onProgress?: (event: ISceneLoaderProgressEvent) => void,
fileName?: string,
): Promise<ISceneLoaderAsyncResult>Imports all objects from a USD stage into a scene.
Parameters
- _meshesNames: string | readonly string[] | null | undefined
Mesh name filtering is not currently supported.
- scene: Scene
The scene receiving the imported objects.
- data: unknown
The USD, USDA, USDC, or USDZ bytes.
- rootUrl: string
The source root URL.
OptionalonProgress: (event: ISceneLoaderProgressEvent) => voidSceneLoader progress callback.
OptionalfileName: stringName of the root USD layer.
Returns Promise<ISceneLoaderAsyncResult>
The imported Babylon.js objects.
- _meshesNames: string | readonly string[] | null | undefined
load Asset Container Async
-
loadAssetContainerAsync(
scene: Scene,
data: unknown,
rootUrl: string,
onProgress?: (event: ISceneLoaderProgressEvent) => void,
fileName?: string,
): Promise<AssetContainer>Loads a USD stage into an asset container.
Parameters
- scene: Scene
The scene used to create imported objects.
- data: unknown
The USD, USDA, USDC, or USDZ bytes.
- rootUrl: string
The source root URL.
OptionalonProgress: (event: ISceneLoaderProgressEvent) => voidSceneLoader progress callback.
OptionalfileName: stringName of the root USD layer.
Returns Promise<AssetContainer>
The populated asset container.
- scene: Scene
load Async
-
loadAsync(
scene: Scene,
data: unknown,
rootUrl: string,
onProgress?: (event: ISceneLoaderProgressEvent) => void,
fileName?: string,
): Promise<void>Loads a USD stage into a scene.
Parameters
- scene: Scene
The scene receiving the imported objects.
- data: unknown
The USD, USDA, USDC, or USDZ bytes.
- rootUrl: string
The source root URL.
OptionalonProgress: (event: ISceneLoaderProgressEvent) => voidSceneLoader progress callback.
OptionalfileName: stringName of the root USD layer.
Returns Promise<void>
- scene: Scene
OpenUSD scene loader backed by a WebAssembly command-buffer extractor.