Skip to content

InstancedLines

Defined in: webgl/instanced.ts:454

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

Defined in: webgl/instanced.ts:476

Device

InstancedLinesData

number = 0

number = 0

boolean = false

InstancedLines

count: number

Defined in: webgl/instanced.ts:455

destroy(): void

Defined in: webgl/instanced.ts:629

void


render(pass): void

Defined in: webgl/instanced.ts:622

RenderPass

void


renderPick(pass): void

Defined in: webgl/instanced.ts:626

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

RenderPass

void


setHighlight(h): void

Defined in: webgl/instanced.ts:553

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

InstancedHighlight

void


setSizeMode(mode): void

Defined in: webgl/instanced.ts:549

"world" | "screen"

void


setTransform(m): void

Defined in: webgl/instanced.ts:543

Float32Array

void


setViewport(width, height): void

Defined in: webgl/instanced.ts:546

number

number

void


update(device, data): boolean

Defined in: webgl/instanced.ts:568

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