ReadonlyidDiagnostic label. Used in aggregator validation errors.
ReadonlyonFires whenever a mutation changes what the renderer should draw
(content, visibility, style override, group, or transform). The
aggregator subscribes here in addSource to schedule a rebuild and
removes its observer in removeSource. Consumers normally don't
subscribe; it's the source→aggregator change channel.
Rendering group this source draws into. The aggregator produces one
combined slab per group; each group is rendered by its own
LineRenderer instance. Within a group, sources draw in addSource
order. Defaults to 0.
Setter schedules an aggregator rebuild.
Optional per-source style override. Applied during aggregation; the renderer never sees the source's "raw" colour/width/linetype for overridden fields. Composes with the renderer's global override (which applies at draw time as a uniform on top of whatever the slab contains).
Setter schedules an aggregator rebuild.
Per-source transform matrix applied at combine time. null (default)
means identity (no transform). The aggregator transforms each of the
source's segment positions when copying into the combined buffer — so
the slab itself stays untouched and changing the transform doesn't
trigger a slab rebuild, only a cheap aggregator re-combine.
Used by BimDrawing to lift a floor plan to its storey elevation
(helper BimDrawing.yOffset), and available for rotation / scaling /
mirroring use cases by setting the matrix directly.
The setter compares by reference, so assigning a fresh Matrix
schedules a rebuild but re-assigning the same instance after mutating
it in place does not — call markTransformDirty for the in-place
case.
Whether this source's contribution should appear in the next render. Setter schedules an aggregator rebuild.
Permanently remove this source. After dispose, further mutations are
no-ops and onChanged observers are cleared.
Returns this source's canonical slab. The aggregator caches the reference between rebuilds and only re-reads when the source signals dirty (via setSlab, markContentDirty, or initial registration).
Signal that the slab returned by getSlab() has been mutated in place
(e.g., a bulk producer rewriting typed-array contents). Schedules a
rebuild. Not needed when content was replaced via setSlab().
Signal that the transform matrix was mutated in place (rather than
replaced with a fresh Matrix). Schedules a rebuild and invalidates the
aggregator's cached frustum corners. Not needed when a new Matrix was
assigned via the transform setter — that's detected by reference.
Replace this source's slab with a new one. Schedules a rebuild.
A contributor of segment data to a
LineAggregator. One source = oneT8LDDataadapter, one slicer pass, one debug overlay — anything that owns a slab and a visibility/style state.Identity is by reference: the aggregator holds the source pointer in a Set.
idis for diagnostics and is the consumer's responsibility to make unique (or not, if duplicates don't matter to them).Mutation surface is small and self-signalling. Every mutation that affects what the renderer should draw flows through one of:
visible = ...setterstyleOverride = ...setterrenderingGroupId = ...settersetSlab(newSlab)— replaces contentmarkContentDirty()— for in-place edits togetSlab()arraysForgetting to call
markContentDirty()after an in-place mutation is the one footgun. Callers that don't need in-place mutation should usesetSlab()exclusively.getSlab()returns the source's canonical storage. Callers may mutate the returned typed arrays in place but MUST callmarkContentDirty()afterwards. The aggregator caches the reference and only re-emits when dirty.Change signalling is the only aggregator contract. Each of the mutations above fires
onChanged; the aggregator subscribes to schedule a rebuild and unsubscribes onremoveSource. There are no other hooks the aggregator needs — implementers expose anObservableand notify it, the idiomatic Babylon way, rather than satisfying private bookkeeping methods.