Skip to content

InstancedCircles

Defined in: webgl/instanced.ts:346

new InstancedCircles(device, data, width?, height?): InstancedCircles

Defined in: webgl/instanced.ts:372

Device

InstancedCirclesData

number = 0

number = 0

InstancedCircles

count: number

Defined in: webgl/instanced.ts:347

get capacity(): number

Defined in: webgl/instanced.ts:351

Instances the buffers have room for (≥ count): kept on a shrink, at least doubled on a grow.

number

destroy(): void

Defined in: webgl/instanced.ts:513

void


render(pass): void

Defined in: webgl/instanced.ts:510

RenderPass

void


setHighlight(h): void

Defined in: webgl/instanced.ts:429

Set shader-highlight uniforms (#162) — a hover/selection restyle with no geometry touch.

InstancedHighlight

void


setPixelRatio(ratio): void

Defined in: webgl/instanced.ts:442

The target’s device px per CSS px (#570): the disc’s edge ramp is one device px wide.

number

void


setSizeMode(mode): void

Defined in: webgl/instanced.ts:445

"world" | "screen"

void


setTransform(m): void

Defined in: webgl/instanced.ts:435

Set the column-major mat3 clip transform (from clipFromView).

Float32Array

void


setViewport(width, height): void

Defined in: webgl/instanced.ts:438

number

number

void


update(device, data): void

Defined in: webgl/instanced.ts:458

Update the instance data in place (no object recreation). Uses gl.bufferSubData when data.count ≤ current buffer capacity; reallocates the internal GL buffers (but keeps the SAME InstancedCircles object) when the new count exceeds capacity. If the optional-field shape changes (borders present↔absent), falls back to a full buffer reinit.

This is the per-frame hot path for the declutter instanced lane: calling this instead of destroy()+new InstancedCircles() avoids per-frame GPU buffer teardown+recreate.

Device

InstancedCirclesData

void