Skip to content

placeLabels

placeLabels(anchors, transform, viewport, scratch?): LabelBox[]

Defined in: labels/label-layer.ts:51

Project label anchors to screen px (screen = k·ref + (x,y) + the constant offset) and resolve collisions, returning the survivors as LabelBoxes (carrying text/opacity). Shared by the HTML overlay (LabelLayer.update) and the backend-native text path (#105 N7b-2) so both place and cull labels identically — they differ only in how they render the survivors.

readonly LabelAnchor[]

ViewTransform

number

number

LabelCullScratch

Reusable cull buffers — pass the caller’s retained one on the per-frame path (#204).

LabelBox[]