Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Class DensityGuard

    Owns the per-node keep ladder; driven by the tracker's onVisit hook.

    Index
    deps: DensityGuardDeps | null = null
    changed: boolean = false
    • Current keep on a mesh's material (1 when unthinned / no uniform).

      Parameters

      • mesh: Mesh

      Returns number

    • Tracker visit hook: re-derive this node's keep fraction from its fresh density record, apply a step change to material + brightness, and re-assert the uniform. Off-screen nodes hold their step (no churn on nodes nobody sees; they re-evaluate the frame they return).

      Parameters

      Returns void

    • Undo this node's thinning (guard turned off at runtime): keep back to 1, brightness recomputed without the density term, uniform cleared. A no-op on anything that is not a thinned data mesh.

      Parameters

      • obj: Object3D

      Returns void

    • True once since the last call if any node changed step (or drifted).

      Returns boolean