Invalidate the cached pick buffer (call after geometry updates).
Also invalidates the picking system's world-AABB cache, since
geometry changes can move the bounding box. (Camera-only motion
does NOT need to invalidate boxes and reaches markDirty() via
the controls 'change' event, not this method.)
Retroactively register already-loaded scene nodes with the picking system.
This — not the per-node factory — is the path production actually takes. The
scene loads before picking is wired up (initPicking traverses the finished
scene to decide whether any node declares labels, and only then constructs the
PickingSystem and calls setPickingSystem), so at node-creation time
this.pickingSystem is still null on a first load. A geometry type wired into
createEmptyXNode but missing HERE is unpickable in every real scene, and appears
to work only on a SECOND dataset load. Hence the table above rather than an
else if chain: adding a geometry type is a compile error at one place instead of
a branch someone forgets.
Rebuild picking-system registrations after a WebGL context-restore
event. The pick materials in pickingSystem.nodeMap were compiled
against the now-dead WebGL context, so we drop the registrations
(without disposing — see PickingSystem.clearRegistrationsForRebuild)
and re-create them via registerExistingSceneNodes, which
produces fresh pick materials against the new context.
Mirror of MaterialManager.rebuildAfterContextRestore — both are
called from SceneManager.contextRestoredHandler in the order
post-processing → materials → nodes.
Also re-uploads geometry GPU buffers for every POOLED geometry type. A
context loss zeroes the GPU-side storage — the element textures +
aSortedIndex (gsplats, points, and lines alike since the lines
texture-storage migration) — while the CPU mirror survives, so we
mark everything full-dirty (empty ranges → three's full upload) and
clear the append-fast-path flag gpuPrefixIntact (depth-sorting
Phase 4 Stage 2). The flag is load-bearing: without it the next
commit could take the append path and DOWNGRADE the pending full
upload to a suffix-only partial, leaving the prefix stale. This runs
unconditionally (picking may be disabled).
OptionalleafAttrs: Partial<PointsMetadata>Create a THREE.Mesh (instanced points) placeholder with an empty
geometry.
OptionalleafAttrs: Partial<PointsMetadata>Create a THREE.Mesh (instanced lines) placeholder with empty
instance buffers.
Create a THREE.Mesh (instanced gsplats) placeholder with empty
instance buffers.
Create an empty placeholder for a mesh node — a plain THREE.Mesh with an
indexed BufferGeometry, not an instanced quad.
attrs is the COMPOSED effective attrs and leafAttrs the node's RAW ones —
the same two-bag arrangement the three siblings use, needed for exactly one
decision: telling a leaf-authored colormap window from an inherited ancestor
gain (resolveColormapWindow). The order is reversed from the siblings' because
the raw bag is optional here, and it defaults to attrs, which is right
whenever no ancestor authored a gain.
Registers a pick node like the three siblings do, with its own pick material
pair: mesh picking keys on gl_VertexID rather than an element-texture texel
(spec §6.5), so it could not reuse theirs.
OptionalleafAttrs: Partial<MeshMetadata>Validate points data for edge cases and malformed data. Logs detailed diagnostics to browser console for debugging.
Optionalgeometry: BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>Optionalpath: stringOptionalleafAttrs: Partial<PointsMetadata>
Wire up the picking system. When set, all subsequent node creations will also create shadow pick-scene nodes.