API

Class USDFileLoader

OpenUSD scene loader backed by a WebAssembly command-buffer extractor.

Implements

Index
extensions: any = USDFileLoaderMetadata.extensions

Defines the extensions the plugin can load.

name: any = USDFileLoaderMetadata.name

Defines the name of the plugin.

DefaultConfiguration: {
    dataUrl: string;
    glueUrl: string;
    wasmUrl: string;
    workerUrl: string;
} = ...

Default URLs for the prebuilt OpenUSD importer assets.

  • Creates a configured plugin instance for a SceneLoader operation.

    Parameters

    • options: SceneLoaderPluginOptions

      SceneLoader plugin options.

    Returns ISceneLoaderPluginAsync

    The configured USD loader.

  • 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) => void

      SceneLoader progress callback.

    • OptionalfileName: string

      Name of the root USD layer.

    Returns Promise<ISceneLoaderAsyncResult>

    The imported Babylon.js objects.

  • 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) => void

      SceneLoader progress callback.

    • OptionalfileName: string

      Name of the root USD layer.

    Returns Promise<AssetContainer>

    The populated asset container.

  • 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) => void

      SceneLoader progress callback.

    • OptionalfileName: string

      Name of the root USD layer.

    Returns Promise<void>