Skip to content

Class: MarkerSet ​

Experimental

Implements ​

Constructors ​

Constructor ​

ts
new MarkerSet(
   context,
   data?,
   options?
): MarkerSet;

Experimental

Parameters ​

ParameterType
contextPrimitiveContext
dataPartial<MarkerData>
optionsMarkerSetOptions

Returns ​

MarkerSet

Properties ​

PropertyModifierTypeDefault valueDescription
materialreadonlyShaderMaterialundefinedExperimental
objectreadonlyMesh<InstancedBufferGeometry, ShaderMaterial>undefinedExperimental Root object to add to a viewport's scene.
pickKindreadonlyPickElementKind'point'Experimental Pick ids count data points (one per instance).

Accessors ​

capacity ​

Get Signature ​

ts
get capacity(): number;

Experimental

Allocated instance capacity.

Returns ​

number


colorscaleMode ​

Get Signature ​

ts
get colorscaleMode(): boolean;

Experimental

Whether fill colors come from colorValues through the colorscale LUT.

Returns ​

boolean


count ​

Get Signature ​

ts
get count(): number;

Experimental

Number of drawn markers.

Returns ​

number


geometry ​

Get Signature ​

ts
get geometry(): InstancedBufferGeometry;

Experimental

Returns ​

InstancedBufferGeometry


origin ​

Get Signature ​

ts
get origin(): readonly [number, number, number];

Experimental

Current float64 RTC origin.

Returns ​

readonly [number, number, number]


pickCount ​

Get Signature ​

ts
get pickCount(): number;

Experimental

Number of pick ids (= drawn instances) for GPU picking.

Returns ​

number

Experimental

Number of ids the pick material may write (e.g. drawn instances).

Implementation of ​

PickablePrimitive.pickCount


positionArray ​

Get Signature ​

ts
get positionArray(): Float32Array<ArrayBufferLike> | null;

Experimental

The RTC-encoded float32 positions actually drawn (x, y, z per item, valid for [0, count); gaps hold HIDDEN_POSITION), or null before anything was allocated. Read-only: owned by the marker set, replaced on reallocation.

Returns ​

Float32Array<ArrayBufferLike> | null


positionVersion ​

Get Signature ​

ts
get positionVersion(): number;

Experimental

Incremented whenever drawn positions or the count change (update, patch, reallocation), so CPU spatial indexes over positionArray know when to rebuild. Transform changes do not bump it: they are applied at query time through worldScale / worldOffset.

Returns ​

number


ready ​

Get Signature ​

ts
get ready(): Promise<void>;

Experimental

Resolves once the custom symbols and images this set draws are ready (plan E8.11); resolved at once for built-in symbols. The runtime waits for it before chart.ready resolves.

Returns ​

Promise<void>


worldOffset ​

Get Signature ​

ts
get worldOffset(): Readonly<Vector3>;

Experimental

Per-axis offset from positionArray to world space (float64 RTC offset).

Returns ​

Readonly<Vector3>


worldScale ​

Get Signature ​

ts
get worldScale(): Readonly<Vector3>;

Experimental

Per-axis scale from positionArray to world space: world = pos * scale + offset.

Returns ​

Readonly<Vector3>

Methods ​

createPickMaterial() ​

ts
createPickMaterial(): PickMaterialHandle;

Experimental

Create the GPU-picking variant of this marker set's material (E2.13): the same shaders with PICKING defined, sharing every uniform except the resolution (the pick window's) and the pick id base. The visible material is untouched. The caller owns and disposes the handle.

Returns ​

PickMaterialHandle

Implementation of ​

PickablePrimitive.createPickMaterial


dispose() ​

ts
dispose(): void;

Experimental

Release GPU resources. The primitive must not be used afterwards.

Returns ​

void

Implementation of ​

Primitive.dispose


patch() ​

ts
patch(
   start,
   count,
   data
): void;

Experimental

Patch items [start, start + count) in place, uploading only that range. Arrays in data are indexed from start. Extends the set when the range passes the current count (streaming appends); start must not exceed the current count. x and y (and z for 3D) must be given together. Positions are encoded against the current origin. Appended items take fields that are not in the patch from the last update inputs.

Parameters ​

ParameterType
startnumber
countnumber
dataMarkerPatch

Returns ​

void


setTransform() ​

ts
setTransform(transform): void;

Experimental

Set the data → world transform (cheap: uniforms only, no buffer uploads).

Parameters ​

ParameterType
transformDataTransform

Returns ​

void

Implementation of ​

Primitive.setTransform


setViewport() ​

ts
setViewport(size): void;

Experimental

Update viewport-dependent uniforms (resolution, pixel ratio).

Parameters ​

ParameterType
sizeViewportSize

Returns ​

void

Implementation of ​

Primitive.setViewport


update() ​

ts
update(data): void;

Experimental

Replace or patch the primitive's data. Omitted fields keep their previous values.

Parameters ​

ParameterType
dataPartial<MarkerData>

Returns ​

void

Implementation of ​

Primitive.update

Released under the MIT License.