Skip to content

InstancedCircles

Defined in: webgl/instanced.ts:170

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

Defined in: webgl/instanced.ts:186

Device

InstancedCirclesData

number = 0

number = 0

InstancedCircles

count: number

Defined in: webgl/instanced.ts:171

destroy(): void

Defined in: webgl/instanced.ts:304

void


render(pass): void

Defined in: webgl/instanced.ts:301

RenderPass

void


setHighlight(h): void

Defined in: webgl/instanced.ts:235

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

InstancedHighlight

void


setSizeMode(mode): void

Defined in: webgl/instanced.ts:247

"world" | "screen"

void


setTransform(m): void

Defined in: webgl/instanced.ts:241

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

Float32Array

void


setViewport(width, height): void

Defined in: webgl/instanced.ts:244

number

number

void


update(device, data): void

Defined in: webgl/instanced.ts:260

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