Class ModelExporter

Exports a SceneModel and/or a DataModel to a file.

Hierarchy (View Summary)

Constructors

Properties

defaultVersion: string

The default supported schema version.

encoders: { [key: string]: ModelEncoder }

An encoder for each supported schema version.

fileDataType: string

Data type of the file written by this Exporter.

format: string

The exported model file format.

versions: string[]

List of supported schema versions.

Methods

  • Exports a SceneModel and/or a DataModel to file data.

    This method expects the following conditions:

    Parameters

    • params: ModelExportParams

      The parameters used for writing the file data.

      Parameters for ModelExporter.write.

      • OptionaldataModel?: DataModel

        The DataModel to export.

      • OptionalsceneModel?: SceneModel

        The SceneModel to export.

      • Optionalversion?: string

        The schema version to export.

    • options: any = {}

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

    Returns Promise<any>

    Resolves when the SceneModel and/or DataModel has been successfully written.

    SDKError

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