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

    Class OccluderStore

    Unique-mesh registry plus per-occluder type/matrix/meshId. Geometry for the same pc.Mesh is stored once; instances only keep a mesh id. Dirty ops are drained by SoftwareOcclusionTester for worker sync.

    Index
    • Coalesces and clears pending worker sync ops. Mesh geometry is copied so the returned buffers can be transferred without detaching store data.

      Returns IOccluderPendingBatch

    • Registers a triangle-mesh occluder. Geometry is snapshotted at lock time as unique vertices + indices. The same pc.Mesh is interned and shared. If source is a MeshInstance and matrix is omitted, the node's world transform is used.

      Parameters

      • source: Mesh | MeshInstance
      • Optionalmatrix: Mat4

      Returns number

    • Registers a triangle-mesh occluder from raw xyz positions. indices are optional; without them positions is treated as a triangle soup.

      Parameters

      • positions: ArrayLike<number>
      • Optionalindices: ArrayLike<number> | null
      • Optionalmatrix: Mat4

      Returns number