Class: RasterPrimitive
Experimental
One pixel grid, one draw call. See the module header.
Implements
Constructors
Constructor
new RasterPrimitive(context, data): RasterPrimitive;Experimental
Parameters
| Parameter | Type |
|---|---|
context | PrimitiveContext |
data | RasterInput |
Returns
RasterPrimitive
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
object | readonly | Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, ShaderMaterial> | Experimental Root object to add to a viewport's scene. |
uniforms | readonly | RasterUniforms | Experimental |
Accessors
current
Get Signature
get current(): Readonly<RasterData>;Experimental
The current data (with defaults applied).
Returns
Readonly<RasterData>
ready
Get Signature
get ready(): Promise<void>;Experimental
Resolves (never rejects) once the pixels of the last load are uploaded, or it failed; chart.ready waits for it.
Returns
Promise<void>
Methods
dispose()
dispose(): void;Experimental
Release GPU resources. The primitive must not be used afterwards.
Returns
void
Implementation of
load()
load(pixels): void;Experimental
Show pixels that arrive later (e.g. a decoded picture): until then the current pixels stay; undefined or a rejection keeps them.
Parameters
| Parameter | Type |
|---|---|
pixels | Promise<RasterPixels | undefined> |
Returns
void
setTransform()
setTransform(transform): void;Experimental
Uniforms only: the texture is never touched.
Parameters
| Parameter | Type |
|---|---|
transform | DataTransform |
Returns
void
Implementation of
setViewport()
setViewport(size): void;Experimental
Update viewport-dependent uniforms (resolution, pixel ratio).
Parameters
| Parameter | Type |
|---|---|
size | ViewportSize |
Returns
void
Implementation of
update()
update(patch): void;Experimental
Replace or patch the primitive's data. Omitted fields keep their previous values.
Parameters
| Parameter | Type |
|---|---|
patch | Partial<RasterData> |
Returns
void