InstancedLines
Defined in: webgl/instanced.ts:794
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InstancedLines(
device,data,width?,height?,pick?,head?):InstancedLines
Defined in: webgl/instanced.ts:827
A lines layer, or an arrows layer with head: "arrow".
Parameters
Section titled “Parameters”device
Section titled “device”Device
LineLaneData
width?
Section titled “width?”number = 0
height?
Section titled “height?”number = 0
boolean = false
LinkHead = "none"
Returns
Section titled “Returns”InstancedLines
Properties
Section titled “Properties”count:
number
Defined in: webgl/instanced.ts:795
readonlyhead:LinkHead
Defined in: webgl/instanced.ts:820
The layer’s head (#542), fixed per layer by its primitive: a change recreates (like samples).
Accessors
Section titled “Accessors”capacity
Section titled “capacity”Get Signature
Section titled “Get Signature”get capacity():
number
Defined in: webgl/instanced.ts:799
Instances the buffers have room for (≥ count): kept on a shrink, at least doubled on a grow.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
void
Defined in: webgl/instanced.ts:1006
Returns
Section titled “Returns”void
render()
Section titled “render()”render(
pass):void
Defined in: webgl/instanced.ts:999
Parameters
Section titled “Parameters”RenderPass
Returns
Section titled “Returns”void
renderPick()
Section titled “renderPick()”renderPick(
pass):void
Defined in: webgl/instanced.ts:1003
Draw the id-encoded pick pass (#141). No-op unless built with pick.
Parameters
Section titled “Parameters”RenderPass
Returns
Section titled “Returns”void
setHighlight()
Section titled “setHighlight()”setHighlight(
h):void
Defined in: webgl/instanced.ts:925
Set shader-highlight uniforms (#162) — recolour/dim with no geometry touch (shared with the pick twin).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
setPickBase()
Section titled “setPickBase()”setPickBase(
base):void
Defined in: webgl/instanced.ts:921
Offset added to the pick pass’s instance id (#447), so two pickable link layers decode to disjoint ids.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
setSizeMode()
Section titled “setSizeMode()”setSizeMode(
mode):void
Defined in: webgl/instanced.ts:917
Parameters
Section titled “Parameters”"world" | "screen"
Returns
Section titled “Returns”void
setTransform()
Section titled “setTransform()”setTransform(
m):void
Defined in: webgl/instanced.ts:911
Parameters
Section titled “Parameters”Float32Array
Returns
Section titled “Returns”void
setViewport()
Section titled “setViewport()”setViewport(
width,height):void
Defined in: webgl/instanced.ts:914
Parameters
Section titled “Parameters”number
height
Section titled “height”number
Returns
Section titled “Returns”void
update()
Section titled “update()”update(
device,data,head?):boolean
Defined in: webgl/instanced.ts:940
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.
Parameters
Section titled “Parameters”device
Section titled “device”Device
LineLaneData
LinkHead = "none"
Returns
Section titled “Returns”boolean