playcanvas-opti-pixel - v1.2.0
    Preparing search index...

    Class BasicHierarchicalInstancer

    Hierarchy (View Summary)

    Implements

    • IInstancer
    Index
    colorsTexture: ColorDataTexture = ...

    Texture storing colors for instances.

    device: GraphicsDevice

    Instanced mesh graphics device

    LODs: ILODLevel[] = []

    LODs

    matricesTexture: Mat4DataTexture

    Texture storing matrices for instances.

    • Parameters

      • meshInstanceList: MeshInstance[] | null
      • root: Entity | null
      • distance: number = 0
      • hysteresis: number = 0

      Returns number

    • Parameters

      • index: number
      • sphere: BoundingSphere
      • center: Vec3
      • radius: number

      Returns void

    • Parameters

      • Optionalsrc: BoundingBox

      Returns BoundingBox

    • Gets the color of a specific instance.

      Parameters

      • id: number

        The index of the instance.

      • Optionalcolor: Color

        Optional Color to store the result.

      Returns Color

      The color of the instance.

    • Gets the local transformation matrix of a specific instance.

      Parameters

      • id: number

        The index of the instance.

      • Optionalmatrix: Mat4

        Optional Mat4 to store the result.

      Returns Mat4

      The transformation matrix of the instance.

    • Retrieves the index of the LOD level for a given distance.

      Parameters

      • lods: ILODLevel[]

        The array of LODs.

      • distance: number

        The squared distance from the camera to the object.

      Returns number

      The index of the LOD that should be used.

    • Gets the opacity of a specific instance.

      Parameters

      • id: number

        The index of the instance.

      Returns number

      The opacity of the instance.

    • Retrieves the position and max scale of a specific instance.

      Parameters

      • index: number

        The index of the instance.

      • position: Vec3

        The position of the instance as a Vec3 to store the result.

      Returns number

      The max scale

    • Retrieves the position of a specific instance.

      Parameters

      • index: number

        The index of the instance.

      • Optionaltarget: Vec3

        Optional Vec3 to store the result.

      Returns Vec3

      The position of the instance as a Vec3.

    • Sets the color of a specific instance.

      Parameters

      • id: number

        The index of the instance.

      • color: Color

        The color to assign to the instance.

      Returns void

    • Sets the local transformation matrix for a specific instance.

      Parameters

      • id: number

        The index of the instance.

      • matrix: Mat4

        A Mat4 representing the local transformation to apply to the instance.

      Returns void

    • Sets the opacity of a specific instance.

      Parameters

      • id: number

        The index of the instance.

      • value: number

        The opacity value to assign.

      Returns void