Interface: MeshPrimitive
Experimental
See the module comment.
Implements
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
object | readonly | Mesh | Experimental Root object to add to a viewport's scene. |
Accessors
data
Get Signature
get data(): Readonly<MeshData>;Experimental
The resolved data.
Returns
Readonly<MeshData>
layout
Get Signature
get layout(): Readonly<MeshLayout>;Experimental
The drawn layout (expanded or indexed, counts).
Returns
Readonly<MeshLayout>
material
Get Signature
get material(): Material;Experimental
The material drawing the mesh: the Plotly-model shader or a three.js material.
Returns
Material
pickCount
Get Signature
get pickCount(): number;Experimental
Number of ids the pick material may write (e.g. drawn instances).
Returns
number
Implementation of
PickablePrimitive.pickCount;pickKind
Get Signature
get pickKind(): "vertex" | "triangle";Experimental
What a pick id offset counts (e.g. 'point' for markers).
Returns
"vertex" | "triangle"
Implementation of
PickablePrimitive.pickKind;translucent
Get Signature
get translucent(): boolean;Experimental
Whether the mesh draws translucent (sorted, no depth writes).
Returns
boolean
Methods
createPickMaterial()
createPickMaterial(): PickMaterialHandle;Experimental
The GPU-picking variant of the Plotly-model shader (see the module comment).
Returns
Implementation of
PickablePrimitive.createPickMaterial;dispose()
dispose(): void;Experimental
Release GPU resources. The primitive must not be used afterwards.
Returns
void
Implementation of
Primitive.dispose;setLightRig()
setLightRig(rig): void;Experimental
Use the lights of a scene's rig (layout.lighting) in Plotly's model, scaled by the trace's lighting; null (default): Plotly's own light at lightposition. three.js material types are lit by the rig's three.js lights in the scene either way.
Parameters
| Parameter | Type |
|---|---|
rig | LightRig | null |
Returns
void
setTransform()
setTransform(transform): void;Experimental
Set the data → world transform (cheap: uniforms only, no buffer uploads).
Parameters
| Parameter | Type |
|---|---|
transform | DataTransform |
Returns
void
Implementation of
Primitive.setTransform;setViewport()
setViewport(size): void;Experimental
Update viewport-dependent uniforms (resolution, pixel ratio).
Parameters
| Parameter | Type |
|---|---|
size | ViewportSize |
Returns
void
Implementation of
Primitive.setViewport;triangleVertices()
triangleVertices(t): [number, number, number];Experimental
Input vertices of triangle t (e.g. to map a triangle pick to a vertex).
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
[number, number, number]
update()
update(patch): void;Experimental
Replace or patch the primitive's data. Omitted fields keep their previous values.
Parameters
| Parameter | Type |
|---|---|
patch | Partial<MeshData> |
Returns
void
Implementation of
Primitive.update;