Skip to content

GroupBuffers

Defined in: core/scene.ts:39

GPU-ready typed arrays for one group. Vertices are [x, y, drawableId].

drawableId is stored as a Float32 component and indexes the per-drawable side-tables (fillColors/strokeColors/flags). Float32 represents integers exactly only up to 2^24 (~16.7M), which caps the number of drawables per group; far above realistic use, but the shader’s integer cast of this component would silently break past that ceiling.

SHARING (#207): every array except pointCenters is a LIVE subarray view of the Scene’s typed storage — NOT a detached copy. Consumers must not mutate them, and must not assume snapshot semantics: a later restyle (setFill/setFlag) is visible through the views, and an append to the group makes them stale (the drawable set change always reaches a backend as a fresh setLayers/updateLayer/ appendToLayer call, so a consumer that re-reads on those events never observes staleness). pointCenters interleaves per-circle data with the drawableId, so it is assembled fresh per call.

drawableCount: number

Defined in: core/scene.ts:49


fillAnchors: Float32Array

Defined in: core/scene.ts:55

Per-fill-vertex anchor [x, y] (parallel to fillVertices) for screen sizeMode.


fillColors: Uint8Array

Defined in: core/scene.ts:45

RGBA bytes per drawable, indexed by drawableId.


fillIndices: Uint32Array

Defined in: core/scene.ts:41


fillVertices: Float32Array

Defined in: core/scene.ts:40


flags: Uint8Array

Defined in: core/scene.ts:48

One byte of flags per drawable (bit 0 = visible).


pointCenters: Float32Array

Defined in: core/scene.ts:51

Stride-4 float array: [x, y, radius, drawableId] per circle.


pointCount: number

Defined in: core/scene.ts:53

Total number of circles across all drawables.


ranges: DrawableRange[]

Defined in: core/scene.ts:61

Per-drawable fill/stroke vertex+index slices, in drawable (paint) order. Lets a backend interleave fill and stroke per drawable (painter’s order) rather than drawing all fills then all strokes. Offsets are absolute into the arrays above.


strokeAnchors: Float32Array

Defined in: core/scene.ts:57

Per-stroke-vertex anchor [x, y] (parallel to strokeVertices) for screen sizeMode.


strokeColors: Uint8Array

Defined in: core/scene.ts:46


strokeIndices: Uint32Array

Defined in: core/scene.ts:43


strokeVertices: Float32Array

Defined in: core/scene.ts:42