Options
All
  • Public
  • Public/Protected
  • All
Menu

Load GLB files (using Three.js), using the "model3D" resources registered in the game resources.

Hierarchy

  • Model3DManager

Index

Constructors

Methods

  • getModel(resourceName: string): GLTF
  • Return a 3D model.

    Caller should not modify the object but clone it.

    Parameters

    • resourceName: string

      The name of the json resource.

    Returns GLTF

    a 3D model if it exists.

  • loadModels(onProgress: OnProgressCallback, onComplete: OnCompleteCallback): void
  • Load all the 3D models.

    Note that even if a file is already loaded, it will be reloaded (useful for hot-reloading, as files can have been modified without the editor knowing).

    Parameters

    • onProgress: OnProgressCallback

      The function called after each file is loaded.

    • onComplete: OnCompleteCallback

      The function called when all file are loaded.

    Returns void

  • setResources(resources: ResourceData[]): void
  • Update the resources data of the game. Useful for hot-reloading, should not be used otherwise.

    Parameters

    • resources: ResourceData[]

      The resources data of the game.

    Returns void

Generated using TypeDoc