Skip to content

HitIndex

Defined in: core/hit-test.ts:47

new HitIndex(drawables, tolerance?, screenMode?): HitIndex

Defined in: core/hit-test.ts:53

screenMode mirrors the layer’s “screen” sizeMode: geometry is rendered at constant pixel size around a projected anchor rather than scaled by the view transform, so pick() must account for the anchor per entry instead of inverting the transform globally.

readonly DrawableVector[]

number = 1

boolean = false

HitIndex

append(drawables): void

Defined in: core/hit-test.ts:58

Add more drawables to the index (used by incremental layer append).

readonly DrawableVector[]

void


pick(x, y, t): string | number | null

Defined in: core/hit-test.ts:112

Pick the topmost drawable under the pointer, given a SCREEN-space (CSS px) point and the current view transform. World layers invert the transform once; screen layers (constant pixel size) instead shift the query into each entry’s geometry frame about its projected anchor, reproducing the render screen = project(anchor) + (vertex - anchor).

number

number

ViewTransform

string | number | null