A Material loaded from a glTF-File.

Authors

Jonas Plotzky, HFU, 2024

Hierarchy

  • SerializableResourceExternal<typeof Material, this> & Material<this>
    • MaterialGLTF

Constructors

Properties

idResource: string
name: string

The name to call the Material by.

status: RESOURCE_STATUS = RESOURCE_STATUS.PENDING
type: string
url: RequestInfo

Accessors

  • get hasTransparency(): boolean
  • Returns true if the material has any areas (color or texture) with alpha < 1. ⚠️ CAUTION: Computionally expensive for textured materials, see Texture.hasTransparency

    Returns boolean

Methods

  • Updates the attribute values of the instance according to the state of the mutator. The mutation may be restricted to a subset of the mutator and the event dispatching suppressed. Uses mutateBase, but can be overwritten in subclasses

    Parameters

    • _mutator: Mutator
    • _selection: string[] = null
    • _dispatchMutate: boolean = true

    Returns Promise<void>

  • Changes the materials reference to the given Shader, creates and references a new Coat instance
    and mutates the new coat to preserve matching properties.

    Parameters

    Returns void

  • Updates the values of the given mutator according to the current state of the instance

    Parameters

    Returns void