ExtrusionLazy
Experimental
Interfaces
| Interface | Description |
|---|---|
| HeatmapColumns | Heatmap columns: rect corners (data space), heights (px) and colors of every cell. |
| ShapeStyle | Everything a shape needs besides its outline. |
| SlabGeometry | A fill's slab in world px (see the module comment). |
Variables
| Variable | Description |
|---|---|
| EXTRUSION_LIGHTING | Lights of extruded 2D shapes: ambient light and one light fixed to the chart, from the upper left in front. With Plotly's lighting defaults (ambient 0.8, diffuse 0.8) a face toward the viewer shows its color exactly, tops ~87 %, left sides ~80 %, right sides and bottoms ~64 %. |
| EXTRUSION_THREE_LIGHTING | The same lights for three.js material types, which take their intensities as physical light (brighter than Plotly's model at the same numbers): less ambient light, so faces keep their shading and toon bands show. |
| HEATMAP_BEVEL_MAX | Largest heatmap (cells) whose columns take bevel: larger grids get sharp edges. |
| HEATMAP_COLUMNS_MAX | Largest heatmap (cells) drawn as columns: larger grids stay flat, with a warning. |
| UNCLIPPED | Object flag: the 2.5D view does not clip this object to the flat plot area (view3d.ts). |
| VIEW3D_MAX_ANGLE | Limit of tilt and rotation (degrees). |
| VIEW3D_MAX_FOV | Field of view (degrees) at perspective: 1. |
Functions
| Function | Description |
|---|---|
| arcShapes | Pie slices (arc data, world px) as sector shapes. items: one entry per group of arcs (a slice and its outline rims, drawn by the trace as extra arcs, which are skipped), the item its depth is read at; default one group per arc. |
| buildPrisms | Write the prisms of shapes (world px) into out; item k is shape k. |
| clampBevel | The bevel an outline of this size and depth takes: at most half its size and its depth; none below a thousandth of a px. |
| createExtrusionPrimitive | Create an ExtrusionPrimitive drawn with the loaded mesh module (loadMeshModule). |
| createView3DProjector | Create a View3DProjector. |
| domainActive | Whether a trace is drawn in 2.5D: a tilt, or a depth that isn't 0. |
| domainCapture | Intercept a primitive the view of a trace in 2.5D just added (see syncDomain). |
| domainDepth | A shape's depth (px) from the trace's depth: a number, a percentage of size ('20%'), or one number per item (item indexes it). At least FLAT. |
| domainHover | A domain trace's hoverPoints in 2.5D: the pointer (query.cx, query.cy) mapped onto the flat trace, the points' anchors onto the tilted one. Undefined when the trace is flat. |
| domainKeyboard | A domain trace's keyboardPoints in 2.5D (anchors where drawn); undefined when flat. |
| domainPointer | A domain trace's pointer event mapped onto the flat trace; undefined when it is flat. |
| extrudeOutline | Extrude outline from z0 to z1 into out (see the module comment): walls, a bevel of radius bevel in segments rings (clamp it with clampBevel first), and both caps. |
| extrusionDepths | depth per shape in px: a number (px), a percentage string of the shape's width ('60%'), or an array of numbers (px). widths(i): shape i's width in px. |
| extrusionMaterialSpec | The mesh material spec of a defaulted material attribute (core litMaterialAttributes): null for Plotly's model; CSS colors become sRGB tuples, a matcap URL a texture (onTextureLoad is called once it has loaded). |
| heatmapColumns | The columns of a heatmap top px tall at zmax (see the module comment), their cells inset by the gaps (gapX / gapY: half the gap in data units). Cells without a value have NaN corners. |
| over | color (straight alpha) times opacity over under (opaque): the color the flat trace shows. Prisms are drawn opaque, so they keep writing depth (translucent ones would need sorting that nested and adjacent prisms defeat); what is under a shape in the flat trace is the paper or, for a nested tile, its parent. |
| paperColor | The paper color (paper_bgcolor, alpha dropped; white when unset or transparent). |
| polygonOutline | A simple polygon (flat [x0, y0, x1, y1, …], either orientation) with sharp corners; cap: its triangulation (indices of the polygon's points, e.g. from earcut), default a fan (convex). |
| raycastSlab | Where a ray (in the slab's own world frame) first meets the slab from z0 to z1: its front face (or its plane within NEAR px of it, where the lines along the edge are drawn) or a wall facing the ray, inside the world box clip (x0, y0, x1, y1). The hit point on a wall is moved a hair inside the fill. |
| rectOutline | A rectangle from (x0, y0) to (x1, y1) (any order) with corners rounded by radius in segments steps (sharp corners for radius 0). |
| rectPrismVertexCount | Vertices of one rect prism with a bevel of segments (> 0) or none (0). |
| rectShapes | Tiles (rect data, world px) as rect shapes, inset by half their outline width (the outlines become gaps); a tile inside an earlier one stands on its top. d.items: the item of each rect. |
| sectorOutline | An annular sector around (cx, cy) from inner to outer radius and angle a0 to a1 (radians, counter-clockwise, a1 > a0), the arcs in arcSegments steps; inner = 0 is a pie slice. Sharp corners; the cap is a strip between the arcs. |
| slabGeometry | The slab geometry of a fill triangulation for a data → world transform. Vertices at the same point count as one, so an edge two triangles share is found however they number it. |
| syncDomain | The lazily loaded side of extrudeDomain (see the module comment): capture added (the primitives the trace view added), set the trace's camera and draw. Returns the extrusion primitive, if the trace is in 2.5D. items: per slice, the item its depth is read at. |
| syncExtrudedFills | Draw a scatter trace's fill as a slab when the trace has depth (see the module comment; the lazily loaded side of extrudeFills): creates, updates or removes the extrusion primitive and returns it; hides the flat fill while extruded and lifts the trace's other primitives in added (those still drawn) onto the slab's front. depth is px, or a percentage of the plot area's width. fill must have loaded (fill.fill). |
| syncExtrudedRects | Draw a trace's rects extruded when it has depth (plan E9.10; see extrudeRects in extrusion-loader.ts, which calls this once the chunk has loaded): creates, updates or (for a flat trace) removes the extrusion primitive and returns it. The flat rects are hidden while extruded; lift (labels, error bars) moves to the front faces and out of the 2.5D view's clipping. rects' data gives the shapes and colors (fill, opacity); the trace gives depth (widths along the position axis, orientation), bevel and material. |
| syncHeatmapColumns | Draw a heatmap's cells as columns when its trace has depth (see the module comment; the lazily loaded side of extrudeHeatmap): creates, updates or removes the extrusion primitive and returns it. depth is the height at zmax in px, or a percentage of the mean cell width. |
| view3dCamera | The 2.5D camera of a viewport whose rect (container px, top-left origin) is drawn into area (see the module comment). |
| view3dProject | Where the world point (x, y, z) of a viewport (rect-local px, bottom-left origin) appears, in container px (top-left origin). |
| view3dRay | The pointer ray through a container point (sx, sy): its world origin (on the near plane) and direction (toward the scene, unnormalized). |
| view3dUnproject | The world point of the plot plane (z = 0) under a container point (sx, sy); NaN when the ray runs parallel to the plane. |
| writeSlab | Write a slab from z0 to z1: the front triangles and the walls (no back face). |
References
DomainCamera
Re-exports DomainCamera
DomainHost
Re-exports DomainHost
DomainShape
Re-exports DomainShape
DomainView
Re-exports DomainView
ExtrusionData
Re-exports ExtrusionData
ExtrusionHit
Re-exports ExtrusionHit
ExtrusionHost
Re-exports ExtrusionHost
ExtrusionPrimitive
Re-exports ExtrusionPrimitive
LiftedPrimitive
Re-exports LiftedPrimitive
Outline
Re-exports Outline
PrismBuffers
Re-exports PrismBuffers
View3DAngles
Re-exports View3DAngles
View3DCamera
Re-exports View3DCamera
View3DProjector
Re-exports View3DProjector