Interface: Plot3DOptions
Defined in: plot3d/plot3d.ts:19
Properties
aspectMode?
optional aspectMode?: "data" | "cube";Defined in: plot3d/plot3d.ts:48
How data extents map into the view cube. "cube" (default) stretches each axis independently to fill it — best for surfaces, where relative shape matters more than units. "data" uses one shared scale so proportions are preserved: a long, thin scene stays long and thin.
autoRotate?
optional autoRotate?: number | boolean;Defined in: plot3d/plot3d.ts:72
Auto-orbit the camera: true for a default speed, or radians/frame. Default off.
axisLabels?
optional axisLabels?: {
x?: string;
y?: string;
z?: string;
};Defined in: plot3d/plot3d.ts:25
Axis titles drawn along the x / y (height) / z edges.
x?
optional x?: string;y?
optional y?: string;z?
optional z?: string;azimuth?
optional azimuth?: number;Defined in: plot3d/plot3d.ts:21
background?
optional background?: [number, number, number, number];Defined in: plot3d/plot3d.ts:20
colorbar?
optional colorbar?:
| boolean
| {
label?: string;
};Defined in: plot3d/plot3d.ts:33
Show a colorbar for the first colormapped layer. Default true when one exists.
distance?
optional distance?: number;Defined in: plot3d/plot3d.ts:23
downloadButton?
optional downloadButton?: boolean;Defined in: plot3d/plot3d.ts:39
Show a download-PNG button. Default true.
elevation?
optional elevation?: number;Defined in: plot3d/plot3d.ts:22
gridPlanes?
optional gridPlanes?: boolean;Defined in: plot3d/plot3d.ts:41
Draw grid lines on the back walls of the cube. Default true.
hover?
optional hover?: boolean;Defined in: plot3d/plot3d.ts:35
Hover tooltip on the nearest pickable point. Default true.
legend?
optional legend?: boolean;Defined in: plot3d/plot3d.ts:31
Show a legend of named solid-colored layers. Default false.
lightControls?
optional lightControls?: boolean;Defined in: plot3d/plot3d.ts:27
Render a small on-canvas panel with light-angle + ambient sliders.
offscreenCulling?
optional offscreenCulling?: boolean;Defined in: plot3d/plot3d.ts:62
Skip drawing while the chart is scrolled out of view, and draw once as it comes back. Default false — a chart draws whenever it is asked to.
Turn it on for a page that holds many charts. A frame costs the same whether or not anyone can see it, and most charts on a long page are off-screen at any moment. The saving is largest in Firefox, where reading the shared WebGL canvas back into a chart's own canvas costs ~1ms per chart per frame: on a 52-chart page that is 15fps against 58. Photon can only skip its own drawing, so ask Plot.isOnScreen before regenerating the data too.
projection?
optional projection?: "perspective" | "orthographic";Defined in: plot3d/plot3d.ts:70
Camera projection. "perspective" (default) is the natural choice for surfaces and point clouds; "orthographic" removes the perspective divide, so a long scene keeps a constant scale end-to-end — the right pick for diagrams. distance then sets the visible half-height instead of the eye distance. Volume raymarching assumes perspective and ignores this.
resetButton?
optional resetButton?: boolean;Defined in: plot3d/plot3d.ts:37
Show a reset-view (home) button. Default true.
showAxes?
optional showAxes?: boolean;Defined in: plot3d/plot3d.ts:50
Draw the bounding box, tick marks and axis labels. Default true.
title?
optional title?: string;Defined in: plot3d/plot3d.ts:29
Plot title, drawn top-center.