Synchronize a Lines material's line-texture binding after a geometry
commit.
Segment data lives in an RGBA32F texture that shares the geometry's
lifetime (line-geometry.ts::attachLineStorage). A pool acquire may
hand the node a DIFFERENT geometry+texture pair (growth, best-fit
reuse, first commit after the placeholder mesh), so the commit
rebinds uLineTex on the render material and — via
userData.pickNode — the pick material. Idempotent: both wrapper
classes no-op or cheaply re-write on an unchanged identity (the
common same-geometry commit), so this is safe to call on every
commit. Mirrors syncPointMaterialWithGeometry (minus the
dtype scale — lines have no radiusScale analog; widths are raw
Float32 world units).
Two documented divergences from the points twin (phase-4 lifecycle
review; deliberate, unit-tested):
The no-texture early return below skips the hasElementAlpha push
entirely (a placeholder geometry carries no presence information),
whereas the points twin pushes the flag unconditionally. Both are
safe — every real lines mesh attaches storage — but the policies
differ for the unreachable placeholder case.
On a THROWING pool write, the commit's finally still runs this
sync (the texture rebind must happen so the material never samples
a disposed texture), so the uniform can transiently reflect the
PREVIOUS tenant's stamp — harmless because adoption pinned
instanceCount = 0 (nothing draws) and the next successful commit
re-stamps.
Synchronize a Lines material's line-texture binding after a geometry commit.
Segment data lives in an RGBA32F texture that shares the geometry's lifetime (
line-geometry.ts::attachLineStorage). A pool acquire may hand the node a DIFFERENT geometry+texture pair (growth, best-fit reuse, first commit after the placeholder mesh), so the commit rebindsuLineTexon the render material and — viauserData.pickNode— the pick material. Idempotent: both wrapper classes no-op or cheaply re-write on an unchanged identity (the common same-geometry commit), so this is safe to call on every commit. Mirrors syncPointMaterialWithGeometry (minus the dtype scale — lines have noradiusScaleanalog; widths are raw Float32 world units).Two documented divergences from the points twin (phase-4 lifecycle review; deliberate, unit-tested):
hasElementAlphapush entirely (a placeholder geometry carries no presence information), whereas the points twin pushes the flag unconditionally. Both are safe — every real lines mesh attaches storage — but the policies differ for the unreachable placeholder case.finallystill runs this sync (the texture rebind must happen so the material never samples a disposed texture), so the uniform can transiently reflect the PREVIOUS tenant's stamp — harmless because adoption pinnedinstanceCount = 0(nothing draws) and the next successful commit re-stamps.