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

    Class PartitionGate

    Every registered kind=partition group of one registry, with its per-part state; see the module doc.

    Implements

    Index
    partitionEntries: Map<string, PartitionGroupEntry> = ...
    partitionCaches: Map<string, { children: PartitionChildCache[] }> = ...
    partitionPartsByPath: Map<string, PartitionPartRef[]> = ...

    Part path → every registered part carrying it (B9c): the index that makes invalidatePartitionFootprint O(path depth) instead of a scan over every part of every partition. Maintained by registerPartition / unregister / clear; partitionPartKeys remembers which keys each partition added so it can take exactly those back out.

    partitionPartKeys: Map<string, string[]> = ...
    partitionResyncPending: Map<string, Set<string>> = ...

    Partition rising edges waiting for their wrapper to be visible and the loader to be idle: wrapper path → the re-entering PART paths. A set that contains the wrapper path itself means "resync the whole partition" (a pathless part). Coalesced across frames; flushed as ONE requestReprocess(paths) call.

    matrixScratch: number[] = ...

    Reused to feed transformBoundingBox's matrix arg.

    visiblePendingResync: boolean = false

    This frame: a visible wrapper has a resync pending.

    • Drop the partition at path (restoring its parts' visibility), if any.

      Parameters

      • path: string

      Returns void

    • First partition pass of an evaluated frame, BEFORE the LOD pass (so a lod_group nested in a part sees this frame's cull): gate every visible wrapper against the padded frustum of projView. A wrapper hidden now is skipped and remembered: a lod_group may reveal it this frame (the overview recipe's fine level), and endFrame gates it before that frame draws. Returns whether a part was culled or restored.

      Parameters

      • displayDims: readonly number[]
      • projView: Matrix4
      • camera: Camera

      Returns boolean

    • After the LOD pass: gate the wrappers it revealed, then hand the pending rising edges to the loader once it is idle. Returns whether a part was culled or restored.

      Parameters

      • displayDims: readonly number[]

      Returns boolean

    • Cancel the retry wakes of the partition registered at path's deferred parts.

      Parameters

      • path: string

      Returns void

    • Mark the owning partition part's rendered footprint stale after a geometry commit.

      SceneLoader.updatePointsGeometry and the three commit*Geometry methods are the complete geometry-attach funnels, including lazy LOD children and additive rungs. They dirty the part before writing, so a commit that hands off geometry and then throws cannot leave the previous footprint cached. registerPartition starts every part dirty, which also covers a commit that races registration. A path under a partition that matches no registered child dirties the whole partition conservatively rather than allowing an under-covering stale box. Footprints are cached in world space; the per-frame gate separately detects transform changes.

      Parameters

      • nodePath: string

      Returns void

    • Dirty the hits belonging to partition entryPath — or, when none does (a commit under the partition matching no registered part), every part of it, conservatively, rather than keep an under-covering stale box.

      Parameters

      Returns void

    • Drop a partition's parts from the path index.

      Parameters

      • entryPath: string

      Returns void

    • Re-stamp every partition part against the committed view NOW (B4). The owning loader calls this right after a pass commits, so a part that left the slice is hidden, and one that entered it is shown and refinable, in the same frame as the commit — not one evaluation later (refinement, scheduled at the pass tail, reads these stamps before the next frame). The frustum half is the last evaluation's; nothing here is a rising edge.

      Returns void

    • Whether the loader at path can draw anything for view — false when any partition part enclosing it is provably empty on a discrete hidden dimension (see partition-slice-gate.ts). A view pass skips such loaders: the part is hidden from the commit on (applyCommittedSlice), so its previous geometry is never drawn for view. O(path depth).

      Parameters

      Returns boolean

    • Activate the deferred parts a loader pass for view needs (B4): every deferred part in the padded frustum (last evaluation), under an effectively visible wrapper and in view's slice — restricted to targets (a targeted resync) when given. An activation attaches and REGISTERS the part's loaders without loading their data: resolves, once every activation it started (or joined) has settled, with the keys of those parts, whose new loaders the pass then sweeps itself and commits with everything else. claim is the pass's abort signal (true: a claim that is never withdrawn); false (prefetchSlice, activating ahead of the next slice) claims nothing: that slice's pass finds the loaders registered. A deferred part under targets that does not qualify has its request cleared, so the per-frame gate asks again while it is still wanted.

      Parameters

      • view: PartitionSliceView
      • Optionaltargets: ReadonlySet<string>
      • claim: boolean | AbortSignal = true

      Returns Promise<string[]>

    • Load-time ranking of a partition's parts against the CURRENT camera (B4): which intersect the padded partition frustum, and a nearest-first load order. The scene manager frames the opening camera from the root metadata before any node loads (LoaderConfig.onSceneMetadata), so this is the pose the scene opens on. null when there is no usable view (no displayed dims yet, an empty viewport), or when no part is in the frustum at all: a scene framed after its load (an authored target_node names a node not built yet) would otherwise defer everything its opening view is about to show.

      Parameters

      • groupObject: Object3D
      • bounds: readonly { min: readonly number[]; max: readonly number[] }[]

      Returns { inFrustum: boolean[]; order: number[] } | null

    • Frustum- and slice-gate one VISIBLE partition for this frame and record its rising edges. Returns whether a part was culled or restored.

      Parameters

      Returns boolean

    • Frustum- and slice-gate one partition's parts. Returns the PARTITION_* bit flags; parts that re-entered the frustum this frame are added to risingParts by node path (child.path), or as the WRAPPER path when a part has none so the caller resyncs the whole partition rather than missing it — unless the part is already settled for the current view (partitionPartSettled). A deferred part that is in the frustum and the committed slice is added too: the resync pass is what activates it.

      Parameters

      • entry: PartitionGroupEntry
      • displayDims: readonly number[]
      • frustum: Frustum
      • risingParts: Set<string>

      Returns number

    • Whether a part that just re-entered the frustum has nothing to resync (B9c): every tracked leaf under it already holds a commit for the CURRENT view version with a complete ladder, so the view did not move while it was culled and a targeted re-sweep would only re-derive what is on screen. Unknown (no view-version wiring, or a leaf never committed) is NOT settled, so such a part resyncs exactly as before.

      Parameters

      Returns boolean

    • Ask for a pass that activates a deferred part — once, while it is wanted (in the frustum and the committed slice) and no activation is requested or running. The request rides the rising-edge resync: the targeted pass it triggers calls activatePartitionParts for the part.

      Parameters

      Returns void

    • Rising edge (rare): remember WHICH parts of wrapperPath came back so the resync can be targeted at their loaders instead of re-sweeping the whole scene. Coalesces with parts already pending for the same wrapper.

      Parameters

      • wrapperPath: string
      • parts: ReadonlySet<string>

      Returns void

    • Hand every pending rising edge whose wrapper is visible to the loader as ONE requestReprocess(paths) call; hidden wrappers stay pending, dropped wrappers are forgotten. A set that contains its own wrapper path (a pathless part) collapses to the wrapper path alone — it already covers every part.

      Returns void

    • Re-arm a deferred partition part whose activation failed (B4): the per-frame gate asks for a pass to activate it again while it is wanted.

      Parameters

      • path: string

      Returns boolean

    • Whether a visible partition has a rising-edge resync waiting for the owning loader to become idle. Unlike pendingPartitionResyncsQuiescent, this deliberately mirrors flushPartitionResyncs's wrapper-level visibility gate: every queued part under a visible wrapper is dispatched, even if that part re-exits before the flush. Pending work retained under a hidden wrapper is not actionable and must not keep wide settledness false indefinitely; neither can work when no resync dispatcher is wired.

      Returns boolean

    • Whether visible partition parts have no pending resync or incomplete commit. Unlike hasVisiblePendingPartitionResync, pending resyncs count here only while their specific parts contribute pixels to the capture frame.

      Parameters

      • version: number | null

      Returns boolean

    • Whether any registered partition part contributes pixels to this frame.

      Returns boolean