Manager for handling 3d models.
Responsible for loading models and handling their visibility.
Also contains advanced features like model cloning.

Hierarchy

  • ModelManager

Constructors

Accessors

Methods

  • Create a clone of an existing model.
    Only the geometry (meshes, transform nodes) gets cloned, as materials are typically shared across the whole scene.

    Returns

    asset container for further processing of the clone

    Parameters

    • name: string
    • newModelName: string
    • show: boolean = true

      show model immediately after cloning

    • Optional options: ModelCloneOptions

      additional options for the cloning procedure, like renaming algorithms

    Returns Promise<AssetContainer>

  • Removes a cloned model from the scene and from the internal model storage.
    Also removes parameter entries from all nodes of the model.
    Deleted clones can not be shown again.

    Parameters

    • name: string

    Returns void

  • Loads and returns the asset container of a certain model.
    This can be used to access the models content without having to add it to the scene.
    A typical use case is to clone or instantiate a node from a "library" model.

    Parameters

    • name: string

    Returns Promise<AssetContainer>

  • Returns the decals configuration of a certain model.
    The model will be loaded before being able to access this configuration.
    Decals are already converted to "normal" meshes when loading a model, still the original decals configuration can be useful e.g. for alterning decals.

    Parameters

    • name: string

    Returns Promise<ParsedDecalConfiguration[]>

  • Loads the model and all it's assigned materials.
    This function should be used for "eager loading" of models, so that model switching will be instant in the process.
    If you don't plan to do this, just use setModelVisibility as this function will load the model under the hood the first time the model gets visible.

    Parameters

    • name: string

    Returns Promise<void>

  • Register models for 3d viewer, this is required for each model before it can be loaded/shown.
    The "viewer control" inside the Combeenation framework calls this function automatically with all assigned 3d assets.

    Parameters

    Returns void

Generated using TypeDoc