Function loadGLTF

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

    This function allows you to load geometry and material color data from a glTF file into the SceneModel, while basic semantic data is loaded into the DataModel. For glTF, this will create a basic aggregation hierarchy (see @xeokit/sdk/basictypes).

    Important:

    See @xeokit/sdk/gltf for usage.

    Parameters

    • params: {
          dataModel?: DataModel;
          fileData: any;
          log?: Function;
          sceneModel?: SceneModel;
      }

      The parameters required for loading glTF file data.

      • OptionaldataModel?: DataModel

        The DataModel to load basic semantic data into. This creates a basic aggregation hierarchy for glTF files.

      • fileData: any

        The glTF file data to load into the models.

      • Optionallog?: Function
      • OptionalsceneModel?: SceneModel

        The SceneModel to load geometry and material color data into.

    Returns Promise<any>

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

    SDKError