Layer
type Layer =
| ScatterLayer<any>
| AnnotateLayer<any>
| ArrowsLayer<any>
| CometLayer<any>
| HeatmapLayer<any>;
Defined in: packages/core/src/scene/types.ts:123
The discriminated union of all layer kinds a Scene can draw. Milestone 1
adds Scatter/Annotate, then Arrows/Comet, then Heatmap here. Heatmap is
the one variant the SVG renderer deliberately skips — see
render/canvas/render-heatmap.ts, which is the only renderer that reads
it, using the same Scene/PixelTransform as everything else.
Erased to any rather than unknown here deliberately: each accessor
function's parameter type makes every *Layer<T> invariant in T under
strictFunctionTypes, so a concrete ScatterLayer<MyDatum> could never
widen to ScatterLayer<unknown> for storage in this heterogeneous array.
Individual layer constructors (and the painters, called generically
per-layer) stay fully typed in T.