The instance handle is used to interface with the mesh that is rendered using instancing.

Constructors

  • Parameters

    • originalObject: Mesh
    • instancer: InstancedMeshRenderer

    Returns InstanceHandle

Properties

meshInformation: MeshInformation

The mesh information of the object - this tries to also calculate the LOD info

object: Mesh

The object that is being instanced

renderer: InstancedMeshRenderer

The instancer/BatchedMesh that is rendering this object

Accessors

  • get indexCount(): number

    Returns number

  • get isActive(): boolean

    Returns boolean

  • get maxIndexCount(): number

    Returns number

  • get maxVertexCount(): number

    Returns number

  • get name(): string

    The name of the object

    Returns string

  • get reservedIndexCount(): number

    Returns number

  • get reservedVertexCount(): number

    Returns number

  • get vertexCount(): number

    Returns number

Methods

  • Adds this object to the instancing renderer (effectively activating instancing)

    Returns void

  • Removes this object from the instancing renderer

    Parameters

    • delete_: boolean

      If true, the instance handle will be removed from the global list

    Returns void

  • Updates the matrix of the instance

    Parameters

    Returns void

  • Updates the matrix from the rendered object. Will also call updateWorldMatrix internally

    Parameters

    • updateChildren: boolean = false
    • updateMatrix: boolean = true

    Returns void

  • Calculates the mesh information again

    Returns boolean

    true if the vertex count or index count has changed