Class ModelLoader

Loads a model file into a SceneModel and/or a DataModel.

Hierarchy (View Summary)

Constructors

Properties

fileDataType: string

Identifies the MIME type of files loaded by this parser.

fileNameExtensions: string[]

Filename extensions expected on loaded model files.

format: string

The loaded model file format.

getVersion: (fileData: any) => string

Gets the schema version of the given file data.

parsers: { [key: string]: ModelParser }

A parser for each supported schema version.

versions: string[]

IDs of supported file schema versions.

Methods

  • Loads file data into a SceneModel and/or a DataModel.

    This method expects the following conditions:

    Parameters

    • params: ModelLoadParams

      The parameters used for loading the file data.

    • options: ModelLoadOptions = {}

      Options for customizing the loading process. These are specific to the Loader subclass.

    Returns Promise<any>

    Resolves when the file data has been successfully loaded into the SceneModel and/or DataModel.

    SDKError

    • If the SceneModel has already been destroyed.
    • If the SceneModel has already been built.
    • If the DataModel has already been destroyed.
    • If the DataModel has already been built.