@mk7s/holochart-traces-3d
Classes
| Class | Description |
|---|---|
| Scene3D | The live scene (see the module comment). Get it with acquireScene. |
| SceneLighting | The lights of one live scene (see the module comment). |
Interfaces
| Interface | Description |
|---|---|
| Bar3dCalc | - |
| Bar3dTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| Bar3dTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| Bar3dTraceMarker | Bar style. |
| Bar3dTraceMarkerLine | The edges of the boxes. |
| Bar3dTraceMaterial | The material of the surface (Holochart extension). Plotly figures keep the default, plotly. |
| ConeCalc | - |
| ConeTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| ConeTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| IsoCalc | - |
| IsosurfaceTraceCaps | Caps on the grid's boundary. |
| IsosurfaceTraceCapsX | The caps at the grid's first and last x. |
| IsosurfaceTraceCapsY | The caps at the grid's first and last y. |
| IsosurfaceTraceCapsZ | The caps at the grid's first and last z. |
| IsosurfaceTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| IsosurfaceTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| IsosurfaceTraceSlices | Slices through the grid. |
| IsosurfaceTraceSlicesX | Slices of constant x. |
| IsosurfaceTraceSlicesY | Slices of constant y. |
| IsosurfaceTraceSlicesZ | Slices of constant z. |
| IsosurfaceTraceSpaceframe | The space frame. |
| IsosurfaceTraceSurface | The isosurfaces. |
| LightRigUser | What takes the scene's rig: a mesh primitive (or its lazy loader). |
| Mesh3dCalc | - |
| Mesh3dTraceContour | The contour drawn through the hovered point. |
| Mesh3dTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| Mesh3dTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| Scatter3dCalc | What scatter3d's calc produces. |
| Scatter3dTraceErrorX | Error bars along the x axis, drawn as 3D segments through the points. |
| Scatter3dTraceErrorY | Error bars along the y axis, drawn as 3D segments through the points. |
| Scatter3dTraceErrorZ | Error bars along the z axis, drawn as 3D segments through the points. |
| Scatter3dTraceLine | Line style (mode lines). |
| Scatter3dTraceLineLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| Scatter3dTraceLineLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| Scatter3dTraceLineRibbon | The ribbon of render: 'ribbon'. |
| Scatter3dTraceMarker | Marker style (mode markers). |
| Scatter3dTraceMarkerLine | Marker outline. |
| Scatter3dTraceProjection | Shadows of the markers on the scene's walls. |
| Scatter3dTraceProjectionX | Shadow of the markers on the wall perpendicular to the x axis. |
| Scatter3dTraceProjectionY | Shadow of the markers on the wall perpendicular to the y axis. |
| Scatter3dTraceProjectionZ | Shadow of the markers on the wall perpendicular to the z axis. |
| SceneAxis | One axis of a laid-out scene. |
| SceneCalc | What every 3D trace's calc carries (the contract of sceneCrossTraceLayout): its autorange contribution, set by calc, and the laid-out scene, set before plot. |
| SceneCamera | A scene camera in scene units (Plotly's scene.camera without projection). |
| SceneContext | What acquireScene needs: a trace's plot context or a component's draw context. |
| SceneExtremes | What a 3D trace contributes to its scene's autorange: the [min, max] of its finite linear coordinates on each axis (undefined when it has none on that axis). Plotly pads the union by 1/32 of its span on each side. |
| SceneLayout | A scene laid out for one pass. |
| SceneLightingDefaults | Plotly's lighting / lightposition defaults of one trace type. |
| ScreenPoint | A point on screen: container px (top-left origin) and NDC depth (−1 near … 1 far). |
| StreamGrid | A rectilinear grid with a vector per node. |
| StreamSet | Integrated streamlines: samples of every tube, one after another. |
| StreamtubeCalc | - |
| StreamtubeTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| StreamtubeTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| StreamtubeTraceStarts | Where the tubes start. Default: the x–z plane at the lowest y of the grid, at every x and z node but the first and last. |
| SurfaceCalc | What surface calc holds. |
| SurfaceTraceContours | Contour lines of constant x, y and z. |
| SurfaceTraceContoursX | Contour lines of constant x: drawn in the surface's shader (exact at any zoom), and projected onto the walls with project. |
| SurfaceTraceContoursXProject | Projections of the contour lines (and highlight lines) onto the axis walls. |
| SurfaceTraceContoursY | Contour lines of constant y: drawn in the surface's shader (exact at any zoom), and projected onto the walls with project. |
| SurfaceTraceContoursYProject | Projections of the contour lines (and highlight lines) onto the axis walls. |
| SurfaceTraceContoursZ | Contour lines of constant z: drawn in the surface's shader (exact at any zoom), and projected onto the walls with project. |
| SurfaceTraceContoursZProject | Projections of the contour lines (and highlight lines) onto the axis walls. |
| SurfaceTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| SurfaceTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| SurfaceTraceWireframe | A wireframe over the surface: its grid lines, drawn in the shader (Holochart extension, not in Plotly). |
| VolumeTraceCaps | Caps on the grid's boundary. |
| VolumeTraceCapsX | The caps at the grid's first and last x. |
| VolumeTraceCapsY | The caps at the grid's first and last y. |
| VolumeTraceCapsZ | The caps at the grid's first and last z. |
| VolumeTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
| VolumeTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
| VolumeTraceRaymarch | Ray-marching options (render: 'raymarch'). |
| VolumeTraceSlices | Slices through the grid. |
| VolumeTraceSlicesX | Slices of constant x. |
| VolumeTraceSlicesY | Slices of constant y. |
| VolumeTraceSlicesZ | Slices of constant z. |
| VolumeTraceSpaceframe | The space frame. |
| VolumeTraceSurface | The isosurfaces. |
Type Aliases
| Type Alias | Description |
|---|---|
| Bar3dTrace | True 3D bars on an x/y grid (a Holochart extension): lit boxes of height z at (x, y), categorical or numeric, stacked across traces with stackgroup, colored per bar or by height through a colorscale, one instanced draw call per trace. |
| ConeTrace | A 3D vector field drawn as cones: one lit cone per position, pointing along its vector, sized by the vector norms and colored by them through a colorscale (one instanced draw call). |
| IsosurfaceTrace | Isosurfaces of a scalar field on a 3D grid: surfaces where the value is constant, between isomin and isomax, with caps, slices and a space frame, colored by value. |
| Mesh3dTrace | 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. |
| Scatter3dTrace | Markers, lines and text at x, y, z in a 3D scene (layout.scene), with colorscales, error bars, wall shadows (projection) and a surface through the points (surfaceaxis). |
| SceneCrossTrace | See SceneCalc.sceneCrossTrace. |
| SceneLightingTrace | Trace types with Plotly lighting / lightposition attributes. |
| SceneProjection | - |
| StreamtubeTrace | Stream tubes through a 3D vector field on a grid: streamlines integrated from starting points, drawn as lit tubes colored by the vector norm, with the radius following the divergence. |
| SurfaceTrace | Surface: a grid of heights drawn as a lit 3D surface, built on the GPU from a height texture, with contour lines, projections and an optional wireframe. |
| Traces3d | Any trace of @mk7s/holochart-traces-3d, discriminated on type. Type a partial bundle's figures with it: FigureInput<Traces3d>. |
| VolumeTrace | A scalar field on a 3D grid drawn as a volume: stacked translucent isosurfaces (as Plotly) or GPU ray marching, with an opacity scale, colored by value. |
Variables
| Variable | Description |
|---|---|
| bar3d | - |
| bar3dAttributes | The bar3d schema. |
| cone | - |
| coneAttributes | The cone schema. |
| isosurface | - |
| isosurfaceAttributes | The isosurface schema. |
| mesh3d | - |
| mesh3dAttributes | The mesh3d schema. |
| scatter3d | - |
| scatter3dAttributes | scatter3d. |
| sceneA11y | TraceModule.a11y of the 3D traces: their scene's view keys and their descriptions. |
| sceneAttributes | The scene subplot container family (scene, scene2, …). |
| sceneComponent | The scene component: layout.scene* attributes and defaults, axes drawing and 3D controls (see the module comment). traces3d includes it; register it with 3D traces in partial bundles. |
| sceneIdAttribute | The scene trace attribute of 3D traces (spread into their schemas). |
| sceneMaterialAttributes | The material trace attribute (Holochart extension, E8.7): core's litMaterialAttributes, shared with extruded 2D traces. Spread into a trace schema. Unset parameters keep the three.js material's defaults (seeded from Plotly's lighting: roughness, and shininess / specular for phong). |
| streamtube | - |
| streamtubeAttributes | The streamtube schema. |
| surface | - |
| surfaceAttributes | The surface schema. Common trace attributes (name, opacity, hoverinfo, …) come from core. |
| traces3d | The scene component and every 3D trace module, for register(...traces3d). |
| volume | - |
| volumeAttributes | The volume schema. |
Functions
| Function | Description |
|---|---|
| acquireScene | The live scene id for this pass: its viewport (created on first use), updated with layout (a trace passes its calc.scene; else the pass's laid-out scene, or the previous layout, or one laid out without data). undefined when the scene isn't in the layout or the context has no subplotViewport (hand-built contexts). |
| interpolateCamera | The camera at progress t from from to to (see cameraTween). |
| sceneCrossTraceLayout | The shared crossTraceLayout of every 3D trace module (register it as the module's crossTraceLayout, with subplotDomain: sceneSubplotDomain): once per layout pass, with every visible 3D trace, it lays out each scene from its traces' sceneExtremes and hands the result to each of them (calc.scene) and to the scene component. |
| sceneExtent | [min, max] of the finite values of values, or undefined for none. |
| sceneFor | The live scene of a 3D trace in the pass of fullLayout (hover and picking: hoverPoints gets the full layout of the pass), once the trace's view or the component acquired it. |
| sceneLightingAttributes | Plotly's lighting and lightposition trace attributes with the defaults of defaults (a trace type of SCENE_LIGHTING_DEFAULTS or custom defaults). Spread into a trace schema. |
| sceneMeshLighting | The mesh primitive's lighting fields of a defaulted trace: Plotly's lighting / lightposition, material (null for Plotly's model) and the shadow flags. onTextureLoad is called when a material.matcap image has loaded (request a frame). |
| sceneOf | The scene id of a 3D trace. |
| sceneScales | The data ↔ linear scales of scene id's axes for calc (d2l, d2lArray), from the scene defaults (type, categories); cached per full layout. Their ranges are not the axis ranges. |
| sceneSubplotDomain | The scene domain of a 3D trace: the runtime's subplotDomain hook (placed like polar). |
| supplySceneLightingDefaults | Coerce lighting, lightposition and material (call from a 3D trace's supplyDefaults). |