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

    Class HierarchicalInstancer

    Hierarchy (View Summary)

    Index
    autoUpdateBVH: boolean = true
    bvh: InstancedMeshBVH<number, Float32Array<ArrayBuffer>> | undefined
    colorsTexture: ColorDataTexture = ...

    Texture storing colors for instances.

    device: GraphicsDevice

    Instanced mesh graphics device

    lodFadeTime: number

    Time at which the LOD disappears before switching to another LOD.

    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

    • Creates and computes the BVH (Bounding Volume Hierarchy) for the instances. It's recommended to create it when all the instance matrices have been assigned. Once created it will be updated automatically.

      Parameters

      • config: BVHParams = {}

        Optional configuration parameters object. See BVHParams for details.

      Returns void