Skip to content

InstancedCircles

Defined in: webgl/instanced.ts:307

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

Defined in: webgl/instanced.ts:333

Device

InstancedCirclesData

number = 0

number = 0

InstancedCircles

count: number

Defined in: webgl/instanced.ts:308

get capacity(): number

Defined in: webgl/instanced.ts:312

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:469

void


render(pass): void

Defined in: webgl/instanced.ts:466

RenderPass

void


setHighlight(h): void

Defined in: webgl/instanced.ts:389

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

InstancedHighlight

void


setSizeMode(mode): void

Defined in: webgl/instanced.ts:401

"world" | "screen"

void


setTransform(m): void

Defined in: webgl/instanced.ts:395

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

Float32Array

void


setViewport(width, height): void

Defined in: webgl/instanced.ts:398

number

number

void


update(device, data): void

Defined in: webgl/instanced.ts:414

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