Skip to content

InstancedLines

Defined in: webgl/instanced.ts:632

new InstancedLines(device, data, width?, height?, pick?): InstancedLines

Defined in: webgl/instanced.ts:660

Device

InstancedLinesData

number = 0

number = 0

boolean = false

InstancedLines

count: number

Defined in: webgl/instanced.ts:633

get capacity(): number

Defined in: webgl/instanced.ts:637

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

void


render(pass): void

Defined in: webgl/instanced.ts:820

RenderPass

void


renderPick(pass): void

Defined in: webgl/instanced.ts:824

Draw the id-encoded pick pass (#141). No-op unless built with pick.

RenderPass

void


setHighlight(h): void

Defined in: webgl/instanced.ts:749

Set shader-highlight uniforms (#162) — recolour/dim with no geometry touch (shared with the pick twin).

InstancedHighlight

void


setPickBase(base): void

Defined in: webgl/instanced.ts:745

Offset added to the pick pass’s instance id (#447), so two pickable link layers decode to disjoint ids.

number

void


setSizeMode(mode): void

Defined in: webgl/instanced.ts:741

"world" | "screen"

void


setTransform(m): void

Defined in: webgl/instanced.ts:735

Float32Array

void


setViewport(width, height): void

Defined in: webgl/instanced.ts:738

number

number

void


update(device, data): boolean

Defined in: webgl/instanced.ts:764

Update the instance data in place (no object recreation). Uses gl.bufferSubData when data.count ≤ current buffer capacity; reallocates the per-instance buffers (but keeps the SAME InstancedLines object) when the new count exceeds capacity. If data.samples changed (the vertex template must be rebuilt), the caller must destroy+recreate instead — this method returns false in that case so updateInstancedLayer falls back to setInstancedLayer.

The pick model tracks the same instance buffers (shared references), so endpoint moves are automatically reflected in the pick pass — ids/count are unchanged, only positions moved.

Device

InstancedLinesData

boolean