ISceneLoaderPlugin

Interface used to define a SceneLoader plugin

Hierarchy

  • ISceneLoaderPlugin

Index

Properties

Optional canDirectLoad

Find examples in Playground
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

Find examples in Playground
extensions: string | ISceneLoaderPluginExtensions

The file extensions supported by this plugin.

name

Find examples in Playground
name: string

The friendly name of this plugin.

Optional rewriteRootURL

Find examples in Playground
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

importMesh

Find examples in Playground
  • 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

    • meshes: AbstractMesh[]

      The meshes array to import into

    • particleSystems: IParticleSystem[]

      The particle systems array to import into

    • skeletons: Skeleton[]

      The skeletons array to import into

    • Optional onError: function

      The callback when import fails

        • (message: string, exception?: any): void
        • Parameters

          • message: string
          • Optional exception: any

          Returns void

    Returns boolean

    True if successful or false otherwise

load

Find examples in Playground
  • load(scene: Scene, data: string, rootUrl: string, onError?: function): boolean
  • 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 onError: function

      The callback when import fails

        • (message: string, exception?: any): void
        • Parameters

          • message: string
          • Optional exception: any

          Returns void

    Returns boolean

    true if successful or false otherwise

loadAssetContainer

Find examples in Playground
  • loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: function): 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 onError: function

      The callback when import fails

        • (message: string, exception?: any): void
        • Parameters

          • message: string
          • Optional exception: any

          Returns void

    Returns AssetContainer

    The loaded asset container

Generated using TypeDoc