Skip to content

Type Alias: Mesh3dTrace ​

ts
type Mesh3dTrace = CommonTraceAttributes & object;

A 3D triangle mesh: vertices with explicit triangles, or triangles derived from the points (Delaunay, convex hull or alpha shape), colored by intensity through a colorscale, per vertex, per triangle or in one color, lit with Plotly’s lighting model.

Type Declaration ​

NameTypeDescription
alphahull?numberHow triangles are derived from the vertices when i / j / k are not given: -1 (default) a 2D Delaunay triangulation along delaunayaxis; 0 the convex hull; a positive value the alpha shape with this alpha (Delaunay tetrahedra with circumradius < 1 / alpha, in coordinates scaled to the unit cube per axis, as Plotly).
autocolorscale?booleanPick the colorscale from the sign of the color domain (Reds for ≥ 0, Blues for ≤ 0, RdBu across 0). Defaults to true unless colorscale is given.
cauto?booleanCompute the color domain from the numeric intensity values. Defaults to false when both cmin and cmax are given.
cmax?numberValue mapped to the last colorscale color (with cmin; turns cauto off).
cmid?numberWith cauto, widen the automatic domain so it is symmetric around this value (diverging data).
cmin?numberValue mapped to the first colorscale color (with cmax; turns cauto off).
color?stringColor of the whole mesh (without intensity, vertexcolor and facecolor). Default: the trace color from the colorway.
coloraxis?"coloraxis" | `coloraxis${number}`Share a colorscale and domain with other traces through layout.coloraxis ('coloraxis', 'coloraxis2', …). Overrides this container's colorscale attributes.
colorbar?ColorbarThe colorbar of this colorscale (plan E5.3).
colorscale?| ColorScale | readonly string[] | readonly readonly (number | string)[][]Colorscale for numeric intensity values: a name ('Viridis', 'RdBu', …), a list of colors, or [position, color] stops from 0 to 1.
contour?Mesh3dTraceContourThe contour drawn through the hovered point.
delaunayaxis?"x" | "y" | "z"Without i / j / k and with alphahull: -1: the axis the points are projected along before their 2D Delaunay triangulation (z triangulates the x–y positions). Suits a single surface layer seen along this axis.
facecolor?DataColumnA CSS color per triangle. Takes precedence over color (not over intensity); only used without vertexcolor.
flatshading?booleanFlat shading: one normal per triangle (faceted look) instead of normals interpolated across triangles.
i?DataColumnIndex (into x / y / z) of the first vertex of each triangle: triangle m joins vertices i[m], j[m] and k[m]. Give all three or none (then alphahull makes the triangles). Indices are rounded; one out of range hides the trace, as in Plotly.
intensity?DataColumnValues mapped through the colorscale: one per vertex (intensitymode: "vertex", interpolated across triangles) or one per triangle ("cell"). Takes precedence over vertexcolor, facecolor and color.
intensitymode?"vertex" | "cell"Whether intensity holds one value per vertex or per triangle (cell).
j?DataColumnIndex (into x / y / z) of the second vertex of each triangle: triangle m joins vertices i[m], j[m] and k[m]. Give all three or none (then alphahull makes the triangles). Indices are rounded; one out of range hides the trace, as in Plotly.
k?DataColumnIndex (into x / y / z) of the third vertex of each triangle: triangle m joins vertices i[m], j[m] and k[m]. Give all three or none (then alphahull makes the triangles). Indices are rounded; one out of range hides the trace, as in Plotly.
lighting?Mesh3dTraceLightingPlotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights.
lightposition?Mesh3dTraceLightpositionPosition of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view.
material?Bar3dTraceMaterialThe material of the surface (Holochart extension). Plotly figures keep the default, plotly.
reversescale?booleanReverse the colorscale (the lowest value gets the last color).
scene?"scene" | `scene${number}`The 3D scene this trace is drawn in: 'scene' (layout.scene), 'scene2' (layout.scene2), ….
showscale?booleanShow a colorbar for this colorscale (drawn by the colorbar component, plan E5.3).
text?PerPoint<string | number>Text per vertex (per triangle with cell colors: intensitymode: "cell" or facecolor), shown in hover labels and as %{text} in templates.
type"mesh3d"Trace type.
vertexcolor?DataColumnA CSS color per vertex, interpolated across triangles. Takes precedence over facecolor and color (not over intensity).
x?DataColumnX coordinates of the vertices (numbers, dates or categories). x, y and z must have the same length.
xhoverformat?stringd3 number or date format of x values in hover labels. Default: the scene's x axis format.
y?DataColumnY coordinates of the vertices (numbers, dates or categories). x, y and z must have the same length.
yhoverformat?stringd3 number or date format of y values in hover labels. Default: the scene's y axis format.
z?DataColumnZ coordinates of the vertices (numbers, dates or categories). x, y and z must have the same length.
zhoverformat?stringd3 number or date format of z values in hover labels. Default: the scene's z axis format.

Released under the MIT License.