Layer
type Layer =
| ScatterLayer<any>
| AnnotateLayer<any>
| ArrowsLayer<any>
| CometLayer<any>
| HeatmapLayer<any>
| PositionalHeatmapLayer<any>
| HexbinLayer<any>
| KdeLayer<any>;Defined in: packages/core/src/scene/types.ts:197
The discriminated union of all layer kinds a Scene can draw. Milestone 1
adds Scatter/Annotate, then Arrows/Comet, then Heatmap here; Milestone 2
adds the remaining density layers (positional heatmap, hexbin, KDE).
Those four density variants are the ones the SVG renderer deliberately
skips — see render/canvas/render-heatmap.ts, the only renderer that
reads them, 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.