Skip to content

Interface: Markers3D ​

Experimental

3D sprite markers: a MarkerSet with 3D blending and optional depth sorting.

Implements ​

Properties ​

PropertyModifierTypeDefault valueDescription
markersreadonlyMarkerSetundefinedExperimental The underlying marker set (its object is object).
objectreadonlyMeshundefinedExperimental Root object to add to a viewport's scene.
pickKindreadonlyPickElementKind'point'Experimental What a pick id offset counts (e.g. 'point' for markers).

Accessors ​

count ​

Get Signature ​

ts
get count(): number;

Experimental

Number of drawn markers.

Returns ​

number


opaque ​

Get Signature ​

ts
get opaque(): boolean;

Experimental

Whether the markers are drawn opaque (depth-writing, see blend3d.ts).

Returns ​

boolean


pickCount ​

Get Signature ​

ts
get pickCount(): number;

Experimental

Number of pick ids (one per marker; ids are data indices).

Returns ​

number

Implementation of ​

ts
PickablePrimitive.pickCount;

ready ​

Get Signature ​

ts
get ready(): Promise<void>;

Experimental

Resolves once custom symbols and images are ready (see MarkerSet.ready).

Returns ​

Promise<void>

Methods ​

createPickMaterial() ​

ts
createPickMaterial(): PickMaterialHandle;

Experimental

The marker set's pick material (E2.13); while depth-sorted it writes each instance's data index (aSourceIndex) instead of its instance index.

Returns ​

PickMaterialHandle

Implementation of ​

ts
PickablePrimitive.createPickMaterial;

dispose() ​

ts
dispose(): void;

Experimental

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

Returns ​

void

Implementation of ​

ts
Primitive.dispose;

setTransform() ​

ts
setTransform(transform): void;

Experimental

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

Parameters ​

ParameterType
transformDataTransform

Returns ​

void

Implementation of ​

ts
Primitive.setTransform;

setViewport() ​

ts
setViewport(size): void;

Experimental

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

Parameters ​

ParameterType
sizeViewportSize

Returns ​

void

Implementation of ​

ts
Primitive.setViewport;

sourceIndex() ​

ts
sourceIndex(slot): number;

Experimental

Data index drawn in instance slot slot (differs from slot only while depth-sorted).

Parameters ​

ParameterType
slotnumber

Returns ​

number


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 ​

ts
Primitive.update;

Released under the MIT License.