ISceneLoaderPluginAsync

Hierarchy

  • ISceneLoaderPluginAsync

Implemented by

Index

Properties

Optional canDirectLoad

canDirectLoad: function

The callback that returns true if the data can be directly loaded.

Type declaration

    • (data: string): boolean
    • Parameters

      • data: string

      Returns boolean

extensions

extensions: string | ISceneLoaderPluginExtensions

The file extensions supported by this plugin.

name

name: string

The friendly name of this plugin.

Optional rewriteRootURL

rewriteRootURL: function

The callback that allows custom handling of the root url based on the response url.

Type declaration

    • (rootUrl: string, responseURL?: string): string
    • Parameters

      • rootUrl: string
      • Optional responseURL: string

      Returns string

Methods

importMeshAsync

  • importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: function): Promise<object>
  • Import meshes into a scene.

    Parameters

    • meshesNames: any

      An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported

    • scene: Scene

      The scene to import into

    • data: any

      The data to import

    • rootUrl: string

      The root url for scene and resources

    • Optional onProgress: function

      The callback when the load progresses

    Returns Promise<object>

    The loaded meshes, particle systems, skeletons, and animation groups

loadAssetContainerAsync

  • loadAssetContainerAsync(scene: Scene, data: string, rootUrl: string, onProgress?: function): Promise<AssetContainer>
  • Load into an asset container.

    Parameters

    • scene: Scene

      The scene to load into

    • data: string

      The data to import

    • rootUrl: string

      The root url for scene and resources

    • Optional onProgress: function

      The callback when the load progresses

    Returns Promise<AssetContainer>

    The loaded asset container

loadAsync

  • loadAsync(scene: Scene, data: string, rootUrl: string, onProgress?: function): Promise<void>
  • Load into a scene.

    Parameters

    • scene: Scene

      The scene to load into

    • data: string

      The data to import

    • rootUrl: string

      The root url for scene and resources

    • Optional onProgress: function

      The callback when the load progresses

    Returns Promise<void>

    Nothing

Generated using TypeDoc