Manager for material related tasks

Hierarchy

  • MaterialManager

Methods

  • Creates a clone of a material.
    The clones tags will be adjusted according to the "tagNamingStrategy" option. Predefined material parameters will be applied to the material right away.

    Parameters

    Returns Promise<null | Material>

  • Removes all cloned materials from the scene and the internal material clone storage

    Returns void

  • Removes a cloned material from the scene and from the internal material clone storage.
    Also remove all parameter entries from this material.

    Parameters

    • materialId: string

    Returns void

  • Returns material with certain id if already available in the scene.
    If this is not the case material is created from a "Material asset" on the Combeenation server.
    Waits until textures of material are fully loaded and shader is compiled. In this way "flickering" effects will be avoided, since the material would be incomplete without its loaded textures.

    Parameters

    • materialId: string
    • Optional mesh: AbstractMesh

      Required for shader compilation check, can be omitted if this check should not be done.
      Use setMaterialOnMesh instead if the material should be applied on the mesh immediately.

    Returns Promise<null | Material>

  • Assigns material with certain id to desired mesh.
    Creates the material if not already available (see getOrCreateMaterial).

    Parameters

    • materialId: string
    • mesh: AbstractMesh

    Returns Promise<void>

Generated using TypeDoc