Skip to content

Interface: MeshData ​

Experimental

Data for MeshPrimitive.

Properties ​

PropertyTypeDescription
alphaArrayLike<number> | nullExperimental Per-vertex alpha multipliers (e.g. opacityscale), or null.
castShadowbooleanExperimental
clip| { max: Vec3; min: Vec3; } | nullExperimental Data-space box outside which fragments are discarded (the scene's axis ranges), or null.
cmaxnumber | undefinedExperimental
cminnumber | undefinedExperimental Value at colorscale 0 / 1. Default: the finite range of intensity.
colorColorInputExperimental One sRGB color, or one per vertex (4 floats each). Default Plotly's mesh3d gray.
colorscaleColorscaleExperimental sRGB 0–1 stops (shared LUT texture). Default gray ramp.
depthTestbooleanExperimental Test against the depth buffer. Default true. False for a layer that lies on a surface already drawn (land on a globe's sphere) and is ordered by renderOrder instead, which avoids the z-fighting of two meshes at one depth.
depthWriteboolean | "auto"Experimental Write depth: 'auto' (default) for opaque meshes only, as a translucent one must not.
faceColorFloat32Array<ArrayBufferLike> | nullExperimental One sRGB color per triangle (Plotly facecolor), used when color is a single color.
hooksMeshShaderHooks | nullExperimental
indicesMeshIndexArray | nullExperimental Three per triangle; null: every three vertices are a triangle.
intensityArrayLike<number> | nullExperimental Values mapped through the colorscale: one per vertex, or per triangle ('cell').
intensityMode"vertex" | "cell"Experimental
interpolationColorscaleInterpolationExperimental
lightingPartial<MeshLighting> | nullExperimental Plotly's lighting (defaults: PLOTLY_LIGHTING).
lightpositionVec3Experimental Plotly's lightposition (clip space). Default (1e5, 1e5, 0).
materialMeshMaterialSpec | nullExperimental trace.material (E8.7). Default null: Plotly's model.
normalsFloat32Array<ArrayBufferLike> | nullExperimental Per-vertex normals in data space; null: computed with Plotly's epsilons (see mesh-geometry.ts). Flat shading always uses computed face normals.
normalScaleVec3 | nullExperimental Axis scale applied before computing normals (Plotly's scene space). Default: extents → 2.
opacitynumberExperimental Multiplies alpha. Default 1.
originVec3Experimental Float64 origin of positions in data space. Default [0, 0, 0].
pick"vertex" | "triangle"Experimental Pick ids per vertex (default) or per triangle (expands the geometry).
positionsFloat32ArrayExperimental xyz per vertex, relative to origin (RTC, plan E16.4). The primitive copies it.
receiveShadowbooleanExperimental Only three.js material types receive shadows.
reversescalebooleanExperimental
shading"smooth" | "flat"Experimental 'flat': Plotly's flatshading (face normals). Default 'smooth'.
side"double" | "front" | "back"Experimental Default 'double' (Plotly draws both sides).
sortTrianglesboolean | "auto"Experimental Sort a translucent mesh's triangles back to front when the view changes: 'auto' (default) up to MESH_SORT_LIMIT triangles.

Released under the MIT License.