Class: PatchesLayer
Defined in: layers/patches.ts:72
Filled polygons (Bokeh patches). Each ring is triangulated once on the CPU with ear-clipping (holes supported), then rendered as a static per-vertex-color triangle soup — only the transform uniforms change per frame.
Implements
Constructors
Constructor
new PatchesLayer(gl, opts): PatchesLayer;Defined in: layers/patches.ts:96
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | PatchesOptions |
Returns
PatchesLayer
Properties
colorCss
readonly colorCss: string;Defined in: layers/patches.ts:75
id
readonly id: string;Defined in: layers/patches.ts:73
Implementation of
name
readonly name: string;Defined in: layers/patches.ts:74
yAxis
readonly yAxis: string;Defined in: layers/patches.ts:76
The y axis this layer is bound to.
Implementation of
Methods
bounds()
bounds():
| {
x: Range;
y: Range;
}
| null;Defined in: layers/patches.ts:224
Data-space bounds of this layer, for autoscaling. null if empty.
Returns
| { x: Range; y: Range; } | null
Implementation of
colorInfo()
colorInfo(): ColorInfo | null;Defined in: layers/patches.ts:220
Colormap + value range, when this layer maps values to colours — the plot uses it to draw a colorbar. null/absent for solid-coloured layers.
Returns
ColorInfo | null
Implementation of
dispose()
dispose(): void;Defined in: layers/patches.ts:239
Returns
void
Implementation of
draw()
draw(state): void;Defined in: layers/patches.ts:229
Parameters
| Parameter | Type |
|---|---|
state | DrawState |
Returns
void
Implementation of
setData()
setData(patches): void;Defined in: layers/patches.ts:211
Replace the patches and re-upload (for streaming).
Parameters
| Parameter | Type |
|---|---|
patches | Patch[] |
Returns
void