Skip to content

GroupRenderer

Defined in: webgl/renderer.ts:290

Renders one Scene group on the GPU. Geometry is uploaded once; pan/zoom is a transform-uniform update and recolor/visibility is a palette/flags texture update — neither touches the geometry buffers. Appends are O(new): the geometry buffers grow by capacity-doubling (GrowBuffer) and the color/flags textures grow with partial uploads (or a recreate when their texel dimensions change).

new GroupRenderer(device, buffers, viewportWidth?, viewportHeight?): GroupRenderer

Defined in: webgl/renderer.ts:296

Device

GroupBuffers

number = 0

Viewport width in device pixels (for screen-mode point sizing).

number = 0

Viewport height in device pixels (for screen-mode point sizing).

GroupRenderer

append(delta): boolean

Defined in: webgl/renderer.ts:554

Append a tail delta in O(new): interleave the new drawables’ fill+stroke into the merged geometry buffers (capacity-doubling) and grow the color/flags textures (partial upload, or recreate on a dimension change). Same observable result as a full rebuild.

Limitation: a pass that does not yet exist (the group was built with NO fill/stroke geometry at all and the first such geometry arrives now) cannot be created incrementally here — we lack the full buffers. The engine guards this by routing such a case to a full rebuild instead. (Unlike the old split fill/stroke passes, a layer that already has either fill or stroke can grow into the other type without a rebuild, since both share one pass.)

GroupBufferDelta

boolean


destroy(): void

Defined in: webgl/renderer.ts:755

void


render(renderPass): void

Defined in: webgl/renderer.ts:741

Draw the combined fill+stroke pass (painter’s order), then the point pass.

RenderPass

void


renderPick(renderPass): void

Defined in: webgl/renderer.ts:751

Draw the fill+stroke geometry with each drawable’s id encoded as an RGB color, for GPU color-picking. Render this into a dedicated offscreen pass, then read the pixel under the cursor and decode it with decodePickColor().

RenderPass

void


setSizeMode(mode): void

Defined in: webgl/renderer.ts:734

Switch the size mode for the next render. “screen” renders fill/stroke (via the anchor + offset model) and points at a constant pixel size; “world” scales with zoom. Default “world”.

"world" | "screen"

void


setStencil(mode): void

Defined in: webgl/renderer.ts:709

Switch stencil state for clipping. “write” = clip source (mask), “test” = clipped layer, “off” = normal.

"off" | "write" | "test"

void


setTransform(m): void

Defined in: webgl/renderer.ts:722

Set the view transform (column-major mat3) for pan/zoom.

Float32Array

void


setViewport(width, height): void

Defined in: webgl/renderer.ts:716

Update the viewport size (px) used for screen-mode point/glyph sizing on resize.

number

number

void


updateColors(tables): void

Defined in: webgl/renderer.ts:660

Re-upload the color and flag tables from the style tables. Touches only the palette/flags textures — geometry buffers are untouched, so this is the cheap recolor / show-hide hot path.

Precondition: the drawable set is unchanged (same count) — this is recolor / show-hide, not a geometry change. Adding drawables goes through append(). A count mismatch throws rather than silently corrupting.

StyleTables

void