react-cheminfo 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chrome/ui/NavLink.d.ts.map +1 -1
- package/lib/chrome/ui/NavLink.js +4 -3
- package/lib/chrome/ui/NavLink.js.map +1 -1
- package/lib/chrome/ui/SiteFooter.d.ts +8 -0
- package/lib/chrome/ui/SiteFooter.d.ts.map +1 -1
- package/lib/chrome/ui/SiteFooter.js +7 -2
- package/lib/chrome/ui/SiteFooter.js.map +1 -1
- package/lib/chrome/ui/SiteHeader.d.ts +11 -0
- package/lib/chrome/ui/SiteHeader.d.ts.map +1 -1
- package/lib/chrome/ui/SiteHeader.js +7 -2
- package/lib/chrome/ui/SiteHeader.js.map +1 -1
- package/lib/chrome/ui/navItem.d.ts +12 -0
- package/lib/chrome/ui/navItem.d.ts.map +1 -1
- package/lib/chrome/ui/navItem.js.map +1 -1
- package/lib/core.d.ts +1 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +1 -0
- package/lib/core.js.map +1 -1
- package/lib/download/core/figureLegend.d.ts +90 -0
- package/lib/download/core/figureLegend.d.ts.map +1 -0
- package/lib/download/core/figureLegend.js +77 -0
- package/lib/download/core/figureLegend.js.map +1 -0
- package/lib/download/core/figureSvg.d.ts.map +1 -1
- package/lib/download/core/figureSvg.js +71 -1
- package/lib/download/core/figureSvg.js.map +1 -1
- package/lib/download/core/figureSvgDocument.d.ts +9 -2
- package/lib/download/core/figureSvgDocument.d.ts.map +1 -1
- package/lib/download/core/figureSvgDocument.js +4 -1
- package/lib/download/core/figureSvgDocument.js.map +1 -1
- package/lib/download/core/figureTarget.d.ts +11 -0
- package/lib/download/core/figureTarget.d.ts.map +1 -1
- package/lib/download/core/figureTarget.js +19 -0
- package/lib/download/core/figureTarget.js.map +1 -1
- package/lib/download/core/index.d.ts +3 -1
- package/lib/download/core/index.d.ts.map +1 -1
- package/lib/download/core/index.js +2 -1
- package/lib/download/core/index.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts +1 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +13 -0
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
- package/lib/ecosystem/ui/glyphs.js +5 -0
- package/lib/ecosystem/ui/glyphs.js.map +1 -1
- package/lib/overlay/ui/OverlayLegend.d.ts.map +1 -1
- package/lib/overlay/ui/OverlayLegend.js +1 -1
- package/lib/overlay/ui/OverlayLegend.js.map +1 -1
- package/lib/projection/core/projectionCopy.d.ts +4 -0
- package/lib/projection/core/projectionCopy.d.ts.map +1 -1
- package/lib/projection/core/projectionCopy.js +3 -0
- package/lib/projection/core/projectionCopy.js.map +1 -1
- package/lib/projection/core/projectionOptions.d.ts +12 -0
- package/lib/projection/core/projectionOptions.d.ts.map +1 -1
- package/lib/projection/core/projectionOptions.js +27 -1
- package/lib/projection/core/projectionOptions.js.map +1 -1
- package/lib/projection/core/projectionStrings.d.ts +4 -0
- package/lib/projection/core/projectionStrings.d.ts.map +1 -1
- package/lib/projection/core/projectionStrings.js +14 -0
- package/lib/projection/core/projectionStrings.js.map +1 -1
- package/lib/projection/core/projectionTabDefaults.d.ts.map +1 -1
- package/lib/projection/core/projectionTabDefaults.js +12 -0
- package/lib/projection/core/projectionTabDefaults.js.map +1 -1
- package/lib/projection/core/projectionTabs.d.ts +1 -1
- package/lib/projection/core/projectionTabs.d.ts.map +1 -1
- package/lib/projection/core/projectionTabs.js +9 -0
- package/lib/projection/core/projectionTabs.js.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.d.ts +6 -0
- package/lib/projection/ui/ProjectionMapTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.js +2 -1
- package/lib/projection/ui/ProjectionMapTab.js.map +1 -1
- package/lib/projection/ui/ProjectionPanel.d.ts +6 -0
- package/lib/projection/ui/ProjectionPanel.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPanel.js +15 -1
- package/lib/projection/ui/ProjectionPanel.js.map +1 -1
- package/lib/projection/ui/ProjectionReadout.d.ts +7 -0
- package/lib/projection/ui/ProjectionReadout.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionReadout.js +5 -4
- package/lib/projection/ui/ProjectionReadout.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceControls.d.ts +51 -0
- package/lib/projection/ui/ProjectionSpaceControls.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionSpaceControls.js +71 -0
- package/lib/projection/ui/ProjectionSpaceControls.js.map +1 -0
- package/lib/projection/ui/ProjectionSpaceMore.d.ts +32 -0
- package/lib/projection/ui/ProjectionSpaceMore.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionSpaceMore.js +57 -0
- package/lib/projection/ui/ProjectionSpaceMore.js.map +1 -0
- package/lib/projection/ui/ProjectionSpaceTab.d.ts +98 -0
- package/lib/projection/ui/ProjectionSpaceTab.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionSpaceTab.js +66 -0
- package/lib/projection/ui/ProjectionSpaceTab.js.map +1 -0
- package/lib/projection/ui/ProjectionViewer.d.ts +1 -0
- package/lib/projection/ui/ProjectionViewer.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionViewer.js +2 -1
- package/lib/projection/ui/ProjectionViewer.js.map +1 -1
- package/lib/projection/ui/index.d.ts +1 -0
- package/lib/projection/ui/index.d.ts.map +1 -1
- package/lib/projection/ui/index.js.map +1 -1
- package/lib/projection/ui/projectionBarModel.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarModel.js +3 -2
- package/lib/projection/ui/projectionBarModel.js.map +1 -1
- package/lib/projection/ui/projectionBarReadings.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarReadings.js +17 -0
- package/lib/projection/ui/projectionBarReadings.js.map +1 -1
- package/lib/projection/ui/projectionBarSlots.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarSlots.js +17 -0
- package/lib/projection/ui/projectionBarSlots.js.map +1 -1
- package/lib/projection/ui/projectionCloudChoices.d.ts +18 -0
- package/lib/projection/ui/projectionCloudChoices.d.ts.map +1 -0
- package/lib/projection/ui/projectionCloudChoices.js +19 -0
- package/lib/projection/ui/projectionCloudChoices.js.map +1 -0
- package/lib/projection/ui/projectionEllipsoid.d.ts +38 -0
- package/lib/projection/ui/projectionEllipsoid.d.ts.map +1 -0
- package/lib/projection/ui/projectionEllipsoid.js +71 -0
- package/lib/projection/ui/projectionEllipsoid.js.map +1 -0
- package/lib/projection/ui/projectionMapChrome.d.ts +8 -0
- package/lib/projection/ui/projectionMapChrome.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapChrome.js +10 -6
- package/lib/projection/ui/projectionMapChrome.js.map +1 -1
- package/lib/projection/ui/projectionMapView.d.ts +13 -0
- package/lib/projection/ui/projectionMapView.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapView.js +26 -0
- package/lib/projection/ui/projectionMapView.js.map +1 -1
- package/lib/projection/ui/projectionSpaceModel.d.ts +14 -0
- package/lib/projection/ui/projectionSpaceModel.d.ts.map +1 -0
- package/lib/projection/ui/projectionSpaceModel.js +14 -0
- package/lib/projection/ui/projectionSpaceModel.js.map +1 -0
- package/lib/projection/ui/projectionViewerProps.d.ts +34 -0
- package/lib/projection/ui/projectionViewerProps.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPlot.d.ts +1 -1
- package/lib/scatter/ui/ScatterPlot.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPlot.js +18 -2
- package/lib/scatter/ui/ScatterPlot.js.map +1 -1
- package/lib/scatter/ui/lassoGesture.d.ts +14 -2
- package/lib/scatter/ui/lassoGesture.d.ts.map +1 -1
- package/lib/scatter/ui/lassoGesture.js +4 -1
- package/lib/scatter/ui/lassoGesture.js.map +1 -1
- package/lib/scatter/ui/scatterPlotProps.d.ts +34 -0
- package/lib/scatter/ui/scatterPlotProps.d.ts.map +1 -1
- package/lib/scatter/ui/useScatterInteraction.d.ts +9 -0
- package/lib/scatter/ui/useScatterInteraction.d.ts.map +1 -1
- package/lib/scatter/ui/useScatterInteraction.js +9 -1
- package/lib/scatter/ui/useScatterInteraction.js.map +1 -1
- package/lib/scatter3d/core/cloudGesture.d.ts +17 -0
- package/lib/scatter3d/core/cloudGesture.d.ts.map +1 -0
- package/lib/scatter3d/core/cloudGesture.js +2 -0
- package/lib/scatter3d/core/cloudGesture.js.map +1 -0
- package/lib/scatter3d/core/confidenceEllipsoid.d.ts +63 -0
- package/lib/scatter3d/core/confidenceEllipsoid.d.ts.map +1 -0
- package/lib/scatter3d/core/confidenceEllipsoid.js +128 -0
- package/lib/scatter3d/core/confidenceEllipsoid.js.map +1 -0
- package/lib/scatter3d/core/cubeFrame.d.ts +40 -0
- package/lib/scatter3d/core/cubeFrame.d.ts.map +1 -0
- package/lib/scatter3d/core/cubeFrame.js +58 -0
- package/lib/scatter3d/core/cubeFrame.js.map +1 -0
- package/lib/scatter3d/core/cubePoints.d.ts +35 -0
- package/lib/scatter3d/core/cubePoints.d.ts.map +1 -0
- package/lib/scatter3d/core/cubePoints.js +50 -0
- package/lib/scatter3d/core/cubePoints.js.map +1 -0
- package/lib/scatter3d/core/ellipsoidCoverage.d.ts +32 -0
- package/lib/scatter3d/core/ellipsoidCoverage.d.ts.map +1 -0
- package/lib/scatter3d/core/ellipsoidCoverage.js +83 -0
- package/lib/scatter3d/core/ellipsoidCoverage.js.map +1 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.d.ts +42 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.d.ts.map +1 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.js +52 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.js.map +1 -0
- package/lib/scatter3d/core/index.d.ts +29 -0
- package/lib/scatter3d/core/index.d.ts.map +1 -0
- package/lib/scatter3d/core/index.js +22 -0
- package/lib/scatter3d/core/index.js.map +1 -0
- package/lib/scatter3d/core/orbitCamera.d.ts +113 -0
- package/lib/scatter3d/core/orbitCamera.d.ts.map +1 -0
- package/lib/scatter3d/core/orbitCamera.js +104 -0
- package/lib/scatter3d/core/orbitCamera.js.map +1 -0
- package/lib/scatter3d/core/symmetricEigen.d.ts +47 -0
- package/lib/scatter3d/core/symmetricEigen.d.ts.map +1 -0
- package/lib/scatter3d/core/symmetricEigen.js +219 -0
- package/lib/scatter3d/core/symmetricEigen.js.map +1 -0
- package/lib/scatter3d/ui/CloudFrameLayer.d.ts +33 -0
- package/lib/scatter3d/ui/CloudFrameLayer.d.ts.map +1 -0
- package/lib/scatter3d/ui/CloudFrameLayer.js +37 -0
- package/lib/scatter3d/ui/CloudFrameLayer.js.map +1 -0
- package/lib/scatter3d/ui/CloudPointLayer.d.ts +62 -0
- package/lib/scatter3d/ui/CloudPointLayer.d.ts.map +1 -0
- package/lib/scatter3d/ui/CloudPointLayer.js +67 -0
- package/lib/scatter3d/ui/CloudPointLayer.js.map +1 -0
- package/lib/scatter3d/ui/CloudShellLayer.d.ts +52 -0
- package/lib/scatter3d/ui/CloudShellLayer.d.ts.map +1 -0
- package/lib/scatter3d/ui/CloudShellLayer.js +40 -0
- package/lib/scatter3d/ui/CloudShellLayer.js.map +1 -0
- package/lib/scatter3d/ui/ScatterCloud.d.ts +24 -0
- package/lib/scatter3d/ui/ScatterCloud.d.ts.map +1 -0
- package/lib/scatter3d/ui/ScatterCloud.js +189 -0
- package/lib/scatter3d/ui/ScatterCloud.js.map +1 -0
- package/lib/scatter3d/ui/cloudGeometry.d.ts +108 -0
- package/lib/scatter3d/ui/cloudGeometry.d.ts.map +1 -0
- package/lib/scatter3d/ui/cloudGeometry.js +122 -0
- package/lib/scatter3d/ui/cloudGeometry.js.map +1 -0
- package/lib/scatter3d/ui/cloudShellStyles.d.ts +36 -0
- package/lib/scatter3d/ui/cloudShellStyles.d.ts.map +1 -0
- package/lib/scatter3d/ui/cloudShellStyles.js +62 -0
- package/lib/scatter3d/ui/cloudShellStyles.js.map +1 -0
- package/lib/scatter3d/ui/cloudZoom.d.ts +21 -0
- package/lib/scatter3d/ui/cloudZoom.d.ts.map +1 -0
- package/lib/scatter3d/ui/cloudZoom.js +22 -0
- package/lib/scatter3d/ui/cloudZoom.js.map +1 -0
- package/lib/scatter3d/ui/index.d.ts +29 -0
- package/lib/scatter3d/ui/index.d.ts.map +1 -0
- package/lib/scatter3d/ui/index.js +21 -0
- package/lib/scatter3d/ui/index.js.map +1 -0
- package/lib/scatter3d/ui/scatterCloudModel.d.ts +60 -0
- package/lib/scatter3d/ui/scatterCloudModel.d.ts.map +1 -0
- package/lib/scatter3d/ui/scatterCloudModel.js +66 -0
- package/lib/scatter3d/ui/scatterCloudModel.js.map +1 -0
- package/lib/scatter3d/ui/scatterCloudProps.d.ts +185 -0
- package/lib/scatter3d/ui/scatterCloudProps.d.ts.map +1 -0
- package/lib/scatter3d/ui/scatterCloudProps.js +9 -0
- package/lib/scatter3d/ui/scatterCloudProps.js.map +1 -0
- package/lib/scatter3d/ui/useOrbitDrag.d.ts +60 -0
- package/lib/scatter3d/ui/useOrbitDrag.d.ts.map +1 -0
- package/lib/scatter3d/ui/useOrbitDrag.js +129 -0
- package/lib/scatter3d/ui/useOrbitDrag.js.map +1 -0
- package/lib/ui.d.ts +1 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +1 -0
- package/lib/ui.js.map +1 -1
- package/package.json +1 -1
- package/src/chrome/ui/NavLink.tsx +5 -3
- package/src/chrome/ui/SiteFooter.tsx +16 -1
- package/src/chrome/ui/SiteHeader.tsx +19 -1
- package/src/chrome/ui/navItem.ts +12 -0
- package/src/core.ts +1 -0
- package/src/download/core/figureLegend.ts +167 -0
- package/src/download/core/figureSvg.ts +81 -1
- package/src/download/core/figureSvgDocument.ts +13 -3
- package/src/download/core/figureTarget.ts +21 -0
- package/src/download/core/index.ts +8 -0
- package/src/ecosystem/core/sites.ts +14 -0
- package/src/ecosystem/ui/glyphs.tsx +26 -0
- package/src/overlay/ui/OverlayLegend.tsx +7 -1
- package/src/projection/core/projectionCopy.ts +9 -0
- package/src/projection/core/projectionOptions.ts +48 -3
- package/src/projection/core/projectionStrings.ts +16 -0
- package/src/projection/core/projectionTabDefaults.ts +12 -0
- package/src/projection/core/projectionTabs.ts +10 -1
- package/src/projection/ui/ProjectionMapTab.tsx +8 -0
- package/src/projection/ui/ProjectionPanel.tsx +63 -0
- package/src/projection/ui/ProjectionReadout.tsx +16 -6
- package/src/projection/ui/ProjectionSpaceControls.tsx +219 -0
- package/src/projection/ui/ProjectionSpaceMore.tsx +169 -0
- package/src/projection/ui/ProjectionSpaceTab.tsx +217 -0
- package/src/projection/ui/ProjectionViewer.tsx +3 -0
- package/src/projection/ui/index.ts +1 -0
- package/src/projection/ui/projectionBarModel.ts +3 -2
- package/src/projection/ui/projectionBarReadings.ts +18 -0
- package/src/projection/ui/projectionBarSlots.tsx +19 -0
- package/src/projection/ui/projectionCloudChoices.ts +23 -0
- package/src/projection/ui/projectionEllipsoid.ts +78 -0
- package/src/projection/ui/projectionMapChrome.ts +26 -5
- package/src/projection/ui/projectionMapView.ts +45 -0
- package/src/projection/ui/projectionSpaceModel.ts +14 -0
- package/src/projection/ui/projectionViewerProps.ts +35 -0
- package/src/scatter/ui/ScatterPlot.tsx +21 -2
- package/src/scatter/ui/lassoGesture.ts +15 -2
- package/src/scatter/ui/scatterPlotProps.ts +35 -0
- package/src/scatter/ui/useScatterInteraction.ts +22 -1
- package/src/scatter3d/core/cloudGesture.ts +16 -0
- package/src/scatter3d/core/confidenceEllipsoid.ts +177 -0
- package/src/scatter3d/core/cubeFrame.ts +72 -0
- package/src/scatter3d/core/cubePoints.ts +75 -0
- package/src/scatter3d/core/ellipsoidCoverage.ts +86 -0
- package/src/scatter3d/core/ellipsoidSilhouette.ts +76 -0
- package/src/scatter3d/core/index.ts +52 -0
- package/src/scatter3d/core/orbitCamera.ts +159 -0
- package/src/scatter3d/core/symmetricEigen.ts +273 -0
- package/src/scatter3d/ui/CloudFrameLayer.tsx +97 -0
- package/src/scatter3d/ui/CloudPointLayer.tsx +132 -0
- package/src/scatter3d/ui/CloudShellLayer.tsx +107 -0
- package/src/scatter3d/ui/ScatterCloud.tsx +312 -0
- package/src/scatter3d/ui/cloudGeometry.ts +200 -0
- package/src/scatter3d/ui/cloudShellStyles.ts +74 -0
- package/src/scatter3d/ui/cloudZoom.ts +22 -0
- package/src/scatter3d/ui/index.ts +41 -0
- package/src/scatter3d/ui/scatterCloudModel.ts +98 -0
- package/src/scatter3d/ui/scatterCloudProps.ts +191 -0
- package/src/scatter3d/ui/useOrbitDrag.ts +220 -0
- package/src/ui.ts +1 -0
- package/styles/chrome.css +29 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudGeometry.js","sourceRoot":"","sources":["../../../src/scatter3d/ui/cloudGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAMrE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAU/B;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,KAAa,EACb,MAAc,EACd,IAAY;IAEZ,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,OAAO;QACL,IAAI,EAAE,EAAE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AAC;AAcD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAoD,EACpD,MAAmB,EACnB,QAAuB;IAEvB,MAAM,KAAK,GAAmB,EAAE,CAAC;IACjC,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/C,KAAK,CAAC,IAAI,CAAC;YACT,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YAClB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YAClB,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YAChB,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;SACjB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How solid the glass is, and how it thickens from the middle to the rim.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* How solid one wall of the glass is, seen square on, by default.
|
|
6
|
+
*
|
|
7
|
+
* Low, because a ray straight through a shell already meets two walls, and two
|
|
8
|
+
* shells that overlap put four in the reader's way.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SHELL_FILL_OPACITY = 0.1;
|
|
11
|
+
/** One stop of the glass gradient. */
|
|
12
|
+
export interface ShellGlassStop {
|
|
13
|
+
/** How far out it sits, from `0` at the middle to `1` at the rim. */
|
|
14
|
+
offset: number;
|
|
15
|
+
/** How solid the glass is there. */
|
|
16
|
+
opacity: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The gradient one shell is filled with, which is what gives it its relief.
|
|
20
|
+
*
|
|
21
|
+
* A shell is a surface, not a filled solid, so what the reader looks through
|
|
22
|
+
* is two walls of it. Straight through the middle they are met square on and
|
|
23
|
+
* the glass is at its thinnest; towards the rim the same two walls are met at
|
|
24
|
+
* a closing angle and the path through them lengthens as the secant of it, so
|
|
25
|
+
* the shell swells towards its edge and reads as round. That is the whole of
|
|
26
|
+
* the modelling the tessellated version did, minus the seams between the faces
|
|
27
|
+
* it needed to do it.
|
|
28
|
+
*
|
|
29
|
+
* The walls are composited rather than added, so two of them at a tenth are
|
|
30
|
+
* not a fifth but a nineteenth-something — the same arithmetic the browser was
|
|
31
|
+
* doing when they were stacked polygons.
|
|
32
|
+
* @param strength - How solid one wall is, after the group's own opacity.
|
|
33
|
+
* @returns The stops, from the middle outwards.
|
|
34
|
+
*/
|
|
35
|
+
export declare function shellGlassStops(strength: number): ShellGlassStop[];
|
|
36
|
+
//# sourceMappingURL=cloudShellStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudShellStyles.d.ts","sourceRoot":"","sources":["../../../src/scatter3d/ui/cloudShellStyles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAYtC,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAOlE"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How solid the glass is, and how it thickens from the middle to the rim.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* How solid one wall of the glass is, seen square on, by default.
|
|
6
|
+
*
|
|
7
|
+
* Low, because a ray straight through a shell already meets two walls, and two
|
|
8
|
+
* shells that overlap put four in the reader's way.
|
|
9
|
+
*/
|
|
10
|
+
export const SHELL_FILL_OPACITY = 0.1;
|
|
11
|
+
/**
|
|
12
|
+
* How many walls' worth of glass the rim is allowed to reach.
|
|
13
|
+
*
|
|
14
|
+
* The path through a shell grows as the secant of the angle it is seen at, so
|
|
15
|
+
* at the silhouette it is unbounded and the rim would go opaque. Held to a few
|
|
16
|
+
* walls it reads as the swell of a ball; unheld it reads as a ring drawn round
|
|
17
|
+
* a disc, which is the wireframe this fill replaced.
|
|
18
|
+
*/
|
|
19
|
+
const RIM_WALLS = 6;
|
|
20
|
+
/**
|
|
21
|
+
* The gradient one shell is filled with, which is what gives it its relief.
|
|
22
|
+
*
|
|
23
|
+
* A shell is a surface, not a filled solid, so what the reader looks through
|
|
24
|
+
* is two walls of it. Straight through the middle they are met square on and
|
|
25
|
+
* the glass is at its thinnest; towards the rim the same two walls are met at
|
|
26
|
+
* a closing angle and the path through them lengthens as the secant of it, so
|
|
27
|
+
* the shell swells towards its edge and reads as round. That is the whole of
|
|
28
|
+
* the modelling the tessellated version did, minus the seams between the faces
|
|
29
|
+
* it needed to do it.
|
|
30
|
+
*
|
|
31
|
+
* The walls are composited rather than added, so two of them at a tenth are
|
|
32
|
+
* not a fifth but a nineteenth-something — the same arithmetic the browser was
|
|
33
|
+
* doing when they were stacked polygons.
|
|
34
|
+
* @param strength - How solid one wall is, after the group's own opacity.
|
|
35
|
+
* @returns The stops, from the middle outwards.
|
|
36
|
+
*/
|
|
37
|
+
export function shellGlassStops(strength) {
|
|
38
|
+
const wall = Math.min(1, Math.max(0, strength));
|
|
39
|
+
const clear = 1 - wall;
|
|
40
|
+
return GLASS_OFFSETS.map((offset) => ({
|
|
41
|
+
offset,
|
|
42
|
+
opacity: round(1 - clear ** wallsAt(offset)),
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* How much glass a ray meets at a given distance out from the middle.
|
|
47
|
+
* @param offset - How far out, from `0` at the middle to `1` at the rim.
|
|
48
|
+
* @returns The number of walls' worth, held to {@link RIM_WALLS}.
|
|
49
|
+
*/
|
|
50
|
+
function wallsAt(offset) {
|
|
51
|
+
const facing = Math.sqrt(Math.max(0, 1 - offset * offset));
|
|
52
|
+
if (facing <= 0)
|
|
53
|
+
return RIM_WALLS;
|
|
54
|
+
return Math.min(RIM_WALLS, 2 / facing);
|
|
55
|
+
}
|
|
56
|
+
/*
|
|
57
|
+
* Close together near the rim, where the glass thickens quickest, and sparse
|
|
58
|
+
* through the middle, where it barely changes.
|
|
59
|
+
*/
|
|
60
|
+
const GLASS_OFFSETS = [0, 0.3, 0.5, 0.66, 0.78, 0.87, 0.93, 0.97, 1];
|
|
61
|
+
const round = (value) => Math.round(value * 10000) / 10000;
|
|
62
|
+
//# sourceMappingURL=cloudShellStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudShellStyles.js","sourceRoot":"","sources":["../../../src/scatter3d/ui/cloudShellStyles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,SAAS,GAAG,CAAC,CAAC;AAUpB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC;IACvB,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACpC,MAAM;QACN,OAAO,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;KAC7C,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,SAAS,OAAO,CAAC,MAAc;IAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;IAC3D,IAAI,MAAM,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAClC,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAErE,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How far the reader may stand back from the box, and how near they may get.
|
|
3
|
+
*
|
|
4
|
+
* A cloud without a zoom cannot be read where its groups overlap, which on a
|
|
5
|
+
* projection is exactly where the reader is looking. The range is kept modest
|
|
6
|
+
* at both ends: past four the frame is off the picture and there is nothing
|
|
7
|
+
* left to say which way is which, and below four tenths the cloud is a smudge
|
|
8
|
+
* in the middle of an empty box.
|
|
9
|
+
*/
|
|
10
|
+
/** How far the wheel may zoom out and in. */
|
|
11
|
+
export declare const CLOUD_ZOOM_RANGE: {
|
|
12
|
+
readonly min: 0.4;
|
|
13
|
+
readonly max: 4;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A zoom held inside what the box can usefully be seen at.
|
|
17
|
+
* @param zoom - The zoom asked for.
|
|
18
|
+
* @returns The zoom to draw at; `1` for anything that is not a number.
|
|
19
|
+
*/
|
|
20
|
+
export declare function clampCloudZoom(zoom: number): number;
|
|
21
|
+
//# sourceMappingURL=cloudZoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudZoom.d.ts","sourceRoot":"","sources":["../../../src/scatter3d/ui/cloudZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB;;;CAAgC,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How far the reader may stand back from the box, and how near they may get.
|
|
3
|
+
*
|
|
4
|
+
* A cloud without a zoom cannot be read where its groups overlap, which on a
|
|
5
|
+
* projection is exactly where the reader is looking. The range is kept modest
|
|
6
|
+
* at both ends: past four the frame is off the picture and there is nothing
|
|
7
|
+
* left to say which way is which, and below four tenths the cloud is a smudge
|
|
8
|
+
* in the middle of an empty box.
|
|
9
|
+
*/
|
|
10
|
+
/** How far the wheel may zoom out and in. */
|
|
11
|
+
export const CLOUD_ZOOM_RANGE = { min: 0.4, max: 4 };
|
|
12
|
+
/**
|
|
13
|
+
* A zoom held inside what the box can usefully be seen at.
|
|
14
|
+
* @param zoom - The zoom asked for.
|
|
15
|
+
* @returns The zoom to draw at; `1` for anything that is not a number.
|
|
16
|
+
*/
|
|
17
|
+
export function clampCloudZoom(zoom) {
|
|
18
|
+
if (!Number.isFinite(zoom))
|
|
19
|
+
return 1;
|
|
20
|
+
return Math.min(CLOUD_ZOOM_RANGE.max, Math.max(CLOUD_ZOOM_RANGE.min, zoom));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=cloudZoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudZoom.js","sourceRoot":"","sources":["../../../src/scatter3d/ui/cloudZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAW,CAAC;AAE9D;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACrC,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A cloud of samples in a box the reader can turn.
|
|
3
|
+
*
|
|
4
|
+
* It is the `scatter` domain's twin, and deliberately so: the same selection,
|
|
5
|
+
* the same lasso, the same hover card, the same labels and the same group
|
|
6
|
+
* colours, so that a reader who has learned the map has learned this too. What
|
|
7
|
+
* is new is everything the third axis forces — a box to say which way is up, a
|
|
8
|
+
* drag that turns it, glass shells instead of outlines, and one scale across
|
|
9
|
+
* all three axes, because a solid seen from an angle has nowhere to write
|
|
10
|
+
* three sets of tick labels.
|
|
11
|
+
*/
|
|
12
|
+
export type { CloudFrameLayerProps } from './CloudFrameLayer.tsx';
|
|
13
|
+
export { CloudFrameLayer } from './CloudFrameLayer.tsx';
|
|
14
|
+
export type { CloudPointLayerProps } from './CloudPointLayer.tsx';
|
|
15
|
+
export { CloudPointLayer } from './CloudPointLayer.tsx';
|
|
16
|
+
export type { CloudShell, CloudShellLayerProps } from './CloudShellLayer.tsx';
|
|
17
|
+
export { CloudShellLayer } from './CloudShellLayer.tsx';
|
|
18
|
+
export type { CloudCloud, CloudOutline, CloudSegment, CloudView, } from './cloudGeometry.ts';
|
|
19
|
+
export { CLOUD_FILL, CLOUD_MARGIN, cloudView, projectCloud, projectSegments, projectShellOutline, } from './cloudGeometry.ts';
|
|
20
|
+
export type { ShellGlassStop } from './cloudShellStyles.ts';
|
|
21
|
+
export { SHELL_FILL_OPACITY, shellGlassStops } from './cloudShellStyles.ts';
|
|
22
|
+
export { CLOUD_ZOOM_RANGE, clampCloudZoom } from './cloudZoom.ts';
|
|
23
|
+
export type { CloudShellsInput } from './scatterCloudModel.ts';
|
|
24
|
+
export { cloudLabel, cloudShells } from './scatterCloudModel.ts';
|
|
25
|
+
export type { CloudGesture, ScatterCloudProps } from './scatterCloudProps.ts';
|
|
26
|
+
export { ScatterCloud } from './ScatterCloud.tsx';
|
|
27
|
+
export type { OrbitDrag, OrbitDragOptions } from './useOrbitDrag.ts';
|
|
28
|
+
export { useOrbitDrag } from './useOrbitDrag.ts';
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scatter3d/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,eAAe,EACf,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A cloud of samples in a box the reader can turn.
|
|
3
|
+
*
|
|
4
|
+
* It is the `scatter` domain's twin, and deliberately so: the same selection,
|
|
5
|
+
* the same lasso, the same hover card, the same labels and the same group
|
|
6
|
+
* colours, so that a reader who has learned the map has learned this too. What
|
|
7
|
+
* is new is everything the third axis forces — a box to say which way is up, a
|
|
8
|
+
* drag that turns it, glass shells instead of outlines, and one scale across
|
|
9
|
+
* all three axes, because a solid seen from an angle has nowhere to write
|
|
10
|
+
* three sets of tick labels.
|
|
11
|
+
*/
|
|
12
|
+
export { CloudFrameLayer } from "./CloudFrameLayer.js";
|
|
13
|
+
export { CloudPointLayer } from "./CloudPointLayer.js";
|
|
14
|
+
export { CloudShellLayer } from "./CloudShellLayer.js";
|
|
15
|
+
export { CLOUD_FILL, CLOUD_MARGIN, cloudView, projectCloud, projectSegments, projectShellOutline, } from "./cloudGeometry.js";
|
|
16
|
+
export { SHELL_FILL_OPACITY, shellGlassStops } from "./cloudShellStyles.js";
|
|
17
|
+
export { CLOUD_ZOOM_RANGE, clampCloudZoom } from "./cloudZoom.js";
|
|
18
|
+
export { cloudLabel, cloudShells } from "./scatterCloudModel.js";
|
|
19
|
+
export { ScatterCloud } from "./ScatterCloud.js";
|
|
20
|
+
export { useOrbitDrag } from "./useOrbitDrag.js";
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scatter3d/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAOxD,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,eAAe,EACf,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a cloud is made of before any of it is drawn: the shell around each
|
|
3
|
+
* group, and the sentence a screen reader is given instead of the picture.
|
|
4
|
+
*
|
|
5
|
+
* It is kept out of the component for the same reason the flat scatter's model
|
|
6
|
+
* is — a shell has to be cut before there is anything to project, and cutting
|
|
7
|
+
* it inside the render callback would cut it again on every turn.
|
|
8
|
+
*/
|
|
9
|
+
import type { EllipseSize } from '../../scatter/core/confidenceEllipse.ts';
|
|
10
|
+
import type { ScatterGroupInk } from '../../scatter/ui/scatterPlotModel.ts';
|
|
11
|
+
import type { ScatterGroup } from '../../scatter/ui/scatterPlotProps.ts';
|
|
12
|
+
import type { Vector3 } from '../core/orbitCamera.ts';
|
|
13
|
+
import type { CloudShell } from './CloudShellLayer.tsx';
|
|
14
|
+
/** What {@link cloudShells} needs to fit one shell per group. */
|
|
15
|
+
export interface CloudShellsInput {
|
|
16
|
+
/** Every sample, in cube units. */
|
|
17
|
+
cube: readonly Vector3[];
|
|
18
|
+
/** Which group each sample belongs to, as an index into `groups`. */
|
|
19
|
+
groupOf: ArrayLike<number>;
|
|
20
|
+
/** The groups, in the order they are coloured. */
|
|
21
|
+
groups: readonly ScatterGroup[];
|
|
22
|
+
/** The colour and the strength each group is drawn at. */
|
|
23
|
+
ink: ScatterGroupInk;
|
|
24
|
+
/** How large the shells are. */
|
|
25
|
+
size: EllipseSize;
|
|
26
|
+
/**
|
|
27
|
+
* How many samples a group needs before it is given a shell.
|
|
28
|
+
* @default 4
|
|
29
|
+
*/
|
|
30
|
+
minimumPoints?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One shell per group that has enough samples to have a shape.
|
|
34
|
+
*
|
|
35
|
+
* The shells are fitted in cube units rather than in the data's own, because
|
|
36
|
+
* the three axes were stretched to one cube and a shell fitted before that
|
|
37
|
+
* stretch would not sit on the cloud the reader is looking at. It is the same
|
|
38
|
+
* reasoning the map uses when it fits its outlines in pixels.
|
|
39
|
+
*
|
|
40
|
+
* A group the reader has switched off in the legend keeps its shell and loses
|
|
41
|
+
* its strength, so the shape it was making is still visible behind the groups
|
|
42
|
+
* that are left — which is the whole point of switching one off.
|
|
43
|
+
* @param input - See {@link CloudShellsInput}.
|
|
44
|
+
* @returns The shells, in group order. A group too small for a shape is left out rather than given a shell that describes its handful of samples.
|
|
45
|
+
*/
|
|
46
|
+
export declare function cloudShells(input: CloudShellsInput): CloudShell[];
|
|
47
|
+
/**
|
|
48
|
+
* What a screen reader is told the figure shows.
|
|
49
|
+
*
|
|
50
|
+
* It names all three axes, because a reader who cannot see the box has no
|
|
51
|
+
* frame to read them off, and the frame is where a sighted reader learns which
|
|
52
|
+
* axis is which.
|
|
53
|
+
* @param xLabel - What the axis running left to right is called.
|
|
54
|
+
* @param yLabel - What the axis running bottom to top is called.
|
|
55
|
+
* @param zLabel - What the axis running away from the reader is called.
|
|
56
|
+
* @param count - How many samples there are.
|
|
57
|
+
* @returns The sentence.
|
|
58
|
+
*/
|
|
59
|
+
export declare function cloudLabel(xLabel: string, yLabel: string, zLabel: string, count: number): string;
|
|
60
|
+
//# sourceMappingURL=scatterCloudModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatterCloudModel.d.ts","sourceRoot":"","sources":["../../../src/scatter3d/ui/scatterCloudModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IACzB,qEAAqE;IACrE,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3B,kDAAkD;IAClD,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,0DAA0D;IAC1D,GAAG,EAAE,eAAe,CAAC;IACrB,gCAAgC;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,UAAU,EAAE,CA0BjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAER"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a cloud is made of before any of it is drawn: the shell around each
|
|
3
|
+
* group, and the sentence a screen reader is given instead of the picture.
|
|
4
|
+
*
|
|
5
|
+
* It is kept out of the component for the same reason the flat scatter's model
|
|
6
|
+
* is — a shell has to be cut before there is anything to project, and cutting
|
|
7
|
+
* it inside the render callback would cut it again on every turn.
|
|
8
|
+
*/
|
|
9
|
+
import { confidenceEllipsoid } from "../core/confidenceEllipsoid.js";
|
|
10
|
+
/**
|
|
11
|
+
* One shell per group that has enough samples to have a shape.
|
|
12
|
+
*
|
|
13
|
+
* The shells are fitted in cube units rather than in the data's own, because
|
|
14
|
+
* the three axes were stretched to one cube and a shell fitted before that
|
|
15
|
+
* stretch would not sit on the cloud the reader is looking at. It is the same
|
|
16
|
+
* reasoning the map uses when it fits its outlines in pixels.
|
|
17
|
+
*
|
|
18
|
+
* A group the reader has switched off in the legend keeps its shell and loses
|
|
19
|
+
* its strength, so the shape it was making is still visible behind the groups
|
|
20
|
+
* that are left — which is the whole point of switching one off.
|
|
21
|
+
* @param input - See {@link CloudShellsInput}.
|
|
22
|
+
* @returns The shells, in group order. A group too small for a shape is left out rather than given a shell that describes its handful of samples.
|
|
23
|
+
*/
|
|
24
|
+
export function cloudShells(input) {
|
|
25
|
+
const { cube, groupOf, groups, ink, size, minimumPoints } = input;
|
|
26
|
+
const held = groups.map(() => []);
|
|
27
|
+
const count = Math.min(cube.length, groupOf.length);
|
|
28
|
+
for (let index = 0; index < count; index++) {
|
|
29
|
+
const group = groupOf[index];
|
|
30
|
+
if (group === undefined || group < 0 || group >= groups.length)
|
|
31
|
+
continue;
|
|
32
|
+
held[group].push(cube[index]);
|
|
33
|
+
}
|
|
34
|
+
const shells = [];
|
|
35
|
+
for (const [group, entry] of groups.entries()) {
|
|
36
|
+
const ellipsoid = confidenceEllipsoid(held[group], {
|
|
37
|
+
size,
|
|
38
|
+
minimumPoints,
|
|
39
|
+
});
|
|
40
|
+
if (ellipsoid === null)
|
|
41
|
+
continue;
|
|
42
|
+
shells.push({
|
|
43
|
+
id: entry.id,
|
|
44
|
+
color: ink.colors[group] ?? entry.color,
|
|
45
|
+
ellipsoid,
|
|
46
|
+
opacity: ink.opacities[group] ?? 1,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return shells;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* What a screen reader is told the figure shows.
|
|
53
|
+
*
|
|
54
|
+
* It names all three axes, because a reader who cannot see the box has no
|
|
55
|
+
* frame to read them off, and the frame is where a sighted reader learns which
|
|
56
|
+
* axis is which.
|
|
57
|
+
* @param xLabel - What the axis running left to right is called.
|
|
58
|
+
* @param yLabel - What the axis running bottom to top is called.
|
|
59
|
+
* @param zLabel - What the axis running away from the reader is called.
|
|
60
|
+
* @param count - How many samples there are.
|
|
61
|
+
* @returns The sentence.
|
|
62
|
+
*/
|
|
63
|
+
export function cloudLabel(xLabel, yLabel, zLabel, count) {
|
|
64
|
+
return `A three-dimensional scatter plot of ${count} samples: ${xLabel} across, ${yLabel} up, and ${zLabel} into the picture.`;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=scatterCloudModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatterCloudModel.js","sourceRoot":"","sources":["../../../src/scatter3d/ui/scatterCloudModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAwBrE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE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c,EACd,MAAc,EACd,KAAa;IAEb,OAAO,uCAAuC,KAAK,aAAa,MAAM,YAAY,MAAM,YAAY,MAAM,oBAAoB,CAAC;AACjI,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a caller hands a `ScatterCloud`.
|
|
3
|
+
*
|
|
4
|
+
* The types live beside the component rather than inside it because the
|
|
5
|
+
* component's own file would otherwise be mostly prose, exactly as the flat
|
|
6
|
+
* scatter's are.
|
|
7
|
+
*/
|
|
8
|
+
import type { ReactNode } from 'react';
|
|
9
|
+
import type { EllipseSize } from '../../scatter/core/confidenceEllipse.ts';
|
|
10
|
+
import type { ScatterSelectionMode } from '../../scatter/core/scatterSelection.ts';
|
|
11
|
+
import type { ScatterGroup, ScatterPointOpen } from '../../scatter/ui/scatterPlotProps.ts';
|
|
12
|
+
import type { SelectionChange } from '../../scatter/ui/useScatterSelection.ts';
|
|
13
|
+
import type { CloudGesture } from '../core/cloudGesture.ts';
|
|
14
|
+
import type { OrbitCamera } from '../core/orbitCamera.ts';
|
|
15
|
+
export type { CloudGesture } from '../core/cloudGesture.ts';
|
|
16
|
+
/** What a `ScatterCloud` needs. */
|
|
17
|
+
export interface ScatterCloudProps {
|
|
18
|
+
/** Where every sample sits along the axis that runs left to right, in data units. */
|
|
19
|
+
x: ArrayLike<number>;
|
|
20
|
+
/** Along the axis that runs bottom to top, in the same order. */
|
|
21
|
+
y: ArrayLike<number>;
|
|
22
|
+
/** Along the axis that runs away from the reader. */
|
|
23
|
+
z: ArrayLike<number>;
|
|
24
|
+
/** Total width, in pixels, from `useContainerSize`. */
|
|
25
|
+
width: number;
|
|
26
|
+
/** Total height. */
|
|
27
|
+
height: number;
|
|
28
|
+
/** What the axis running left to right is called, written on the frame. */
|
|
29
|
+
xLabel: string;
|
|
30
|
+
/** What the axis running bottom to top is called. */
|
|
31
|
+
yLabel: string;
|
|
32
|
+
/** What the axis running away from the reader is called. */
|
|
33
|
+
zLabel: string;
|
|
34
|
+
/**
|
|
35
|
+
* Which group each sample belongs to, as an index into `groups`. A sample
|
|
36
|
+
* with `-1`, or an index outside the range, is drawn in the muted ink and
|
|
37
|
+
* left out of every shell.
|
|
38
|
+
* @default undefined — every sample is one crowd
|
|
39
|
+
*/
|
|
40
|
+
groupOf?: ArrayLike<number>;
|
|
41
|
+
/**
|
|
42
|
+
* The groups, in the order they are coloured and listed.
|
|
43
|
+
* @default undefined
|
|
44
|
+
*/
|
|
45
|
+
groups?: readonly ScatterGroup[];
|
|
46
|
+
/**
|
|
47
|
+
* Which groups are drawn faint, by id — what a legend entry switches.
|
|
48
|
+
* @default undefined — every group is drawn in full
|
|
49
|
+
*/
|
|
50
|
+
mutedGroups?: ReadonlySet<string>;
|
|
51
|
+
/**
|
|
52
|
+
* How large the group shells are, or `null` for none. A share is read in
|
|
53
|
+
* three dimensions here, so the same share gives a wider shell than the same
|
|
54
|
+
* call gives on the map — which is the point of asking for a share rather
|
|
55
|
+
* than for a distance.
|
|
56
|
+
* @default null
|
|
57
|
+
*/
|
|
58
|
+
ellipsoid?: EllipseSize | null;
|
|
59
|
+
/**
|
|
60
|
+
* How many samples a group needs before it is given a shell. Below four a
|
|
61
|
+
* group has no volume to measure, so anything less is read as four.
|
|
62
|
+
* @default 4
|
|
63
|
+
*/
|
|
64
|
+
ellipsoidMinimumPoints?: number;
|
|
65
|
+
/**
|
|
66
|
+
* How solid the glass is; `0` draws no shells at all.
|
|
67
|
+
* @default SHELL_FILL_OPACITY
|
|
68
|
+
*/
|
|
69
|
+
ellipsoidFillOpacity?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Whether each group's name is written once, over the middle of its own
|
|
72
|
+
* shell. It needs `groups`, since it is their names it writes.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
showGroupLabels?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* What each sample is called, written beside its own dot. A sample whose
|
|
78
|
+
* entry is `undefined` is left unnamed.
|
|
79
|
+
* @default undefined — no sample is named
|
|
80
|
+
*/
|
|
81
|
+
pointLabels?: ReadonlyArray<string | undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* Radius of a dot at the middle of the box, in pixels. One at the front is
|
|
84
|
+
* drawn larger and one at the back smaller, about this.
|
|
85
|
+
* @default 3.5
|
|
86
|
+
*/
|
|
87
|
+
pointRadius?: number;
|
|
88
|
+
/**
|
|
89
|
+
* The index from which samples are drawn as outlines rather than filled,
|
|
90
|
+
* which is how one the model was fitted on is told from one placed into it
|
|
91
|
+
* afterwards.
|
|
92
|
+
* @default undefined — every sample is filled
|
|
93
|
+
*/
|
|
94
|
+
outlinedFrom?: number;
|
|
95
|
+
/**
|
|
96
|
+
* What a drag does. The cloud never changes it on its own, because the
|
|
97
|
+
* control belongs in the bar above the figure rather than on top of the
|
|
98
|
+
* picture, so it is a plain setting rather than a controlled value.
|
|
99
|
+
* @default 'turn'
|
|
100
|
+
*/
|
|
101
|
+
gesture?: CloudGesture;
|
|
102
|
+
/**
|
|
103
|
+
* Where the reader is standing. Present, the caller owns the camera, which
|
|
104
|
+
* is how a site puts a viewpoint in a share link.
|
|
105
|
+
* @default undefined — the cloud keeps its own
|
|
106
|
+
*/
|
|
107
|
+
camera?: OrbitCamera;
|
|
108
|
+
/**
|
|
109
|
+
* Called with the camera every frame of a turn leaves behind.
|
|
110
|
+
* @default undefined
|
|
111
|
+
*/
|
|
112
|
+
onCameraChange?: (camera: OrbitCamera) => void;
|
|
113
|
+
/**
|
|
114
|
+
* How far in the reader has zoomed; `1` is the resting size. Present, the
|
|
115
|
+
* caller owns it.
|
|
116
|
+
* @default undefined — the cloud keeps its own
|
|
117
|
+
*/
|
|
118
|
+
zoom?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Called with the zoom a wheel asks for.
|
|
121
|
+
* @default undefined
|
|
122
|
+
*/
|
|
123
|
+
onZoomChange?: (zoom: number) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Whether the wheel zooms the box. On, because a cloud that cannot be zoomed
|
|
126
|
+
* cannot be read where its groups overlap; a figure set in a column of prose
|
|
127
|
+
* should turn it off so a reader on their way past keeps their scroll.
|
|
128
|
+
* @default true
|
|
129
|
+
*/
|
|
130
|
+
wheelZoom?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* The selected rows. Present, the caller owns the selection.
|
|
133
|
+
* @default undefined — the cloud keeps its own
|
|
134
|
+
*/
|
|
135
|
+
selected?: readonly number[];
|
|
136
|
+
/**
|
|
137
|
+
* The rows selected before the reader touches anything.
|
|
138
|
+
* @default undefined
|
|
139
|
+
*/
|
|
140
|
+
defaultSelected?: readonly number[];
|
|
141
|
+
/**
|
|
142
|
+
* Called when a lasso is released or a dot is tapped — never while a lasso
|
|
143
|
+
* is being drawn, and never while the box is being turned.
|
|
144
|
+
* @default undefined
|
|
145
|
+
*/
|
|
146
|
+
onSelectionChange?: (change: SelectionChange) => void;
|
|
147
|
+
/**
|
|
148
|
+
* What a gesture with no modifier held does to the selection. Shift always
|
|
149
|
+
* adds and Alt always removes, exactly as on the map.
|
|
150
|
+
* @default 'replace'
|
|
151
|
+
*/
|
|
152
|
+
selectMode?: ScatterSelectionMode;
|
|
153
|
+
/**
|
|
154
|
+
* Called with the row under the pointer, or `-1`.
|
|
155
|
+
* @default undefined
|
|
156
|
+
*/
|
|
157
|
+
onHoverChange?: (index: number) => void;
|
|
158
|
+
/**
|
|
159
|
+
* Called when the reader double-clicks a sample, exactly as on the flat map:
|
|
160
|
+
* the gesture for "tell me more about this one", or "let me change it".
|
|
161
|
+
*
|
|
162
|
+
* It fires whichever gesture a drag is set to, because a double click is not
|
|
163
|
+
* a drag — a reader turning the box must not have to switch to Select to
|
|
164
|
+
* open a sample. The sample is selected first, since a double click is also
|
|
165
|
+
* two clicks; the map says why, and the two behave alike on purpose.
|
|
166
|
+
* @default undefined
|
|
167
|
+
*/
|
|
168
|
+
onPointDoubleClick?: (point: ScatterPointOpen) => void;
|
|
169
|
+
/**
|
|
170
|
+
* What floats over the figure — a bar, a key, a caption, a card.
|
|
171
|
+
* @default undefined
|
|
172
|
+
*/
|
|
173
|
+
overlay?: ReactNode;
|
|
174
|
+
/**
|
|
175
|
+
* What a screen reader is told the figure shows.
|
|
176
|
+
* @default a sentence built from the three axis names and the sample count
|
|
177
|
+
*/
|
|
178
|
+
label?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Value of the `data-testid` attribute of the wrapper.
|
|
181
|
+
* @default undefined
|
|
182
|
+
*/
|
|
183
|
+
testId?: string;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=scatterCloudProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatterCloudProps.d.ts","sourceRoot":"","sources":["../../../src/scatter3d/ui/scatterCloudProps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,mCAAmC;AACnC,MAAM,WAAW,iBAAiB;IAChC,qFAAqF;IACrF,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACrB,iEAAiE;IACjE,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACrB,qDAAqD;IACrD,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACrB,uDAAuD;IACvD,KAAK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;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD;;;;OAIG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a caller hands a `ScatterCloud`.
|
|
3
|
+
*
|
|
4
|
+
* The types live beside the component rather than inside it because the
|
|
5
|
+
* component's own file would otherwise be mostly prose, exactly as the flat
|
|
6
|
+
* scatter's are.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=scatterCloudProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatterCloudProps.js","sourceRoot":"","sources":["../../../src/scatter3d/ui/scatterCloudProps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ScatterSelectionMode } from '../../scatter/core/scatterSelection.ts';
|
|
2
|
+
import type { ScatterSurfaceProps } from '../../scatter/ui/lassoGesture.ts';
|
|
3
|
+
import type { OrbitCamera } from '../core/orbitCamera.ts';
|
|
4
|
+
/** What {@link useOrbitDrag} needs. */
|
|
5
|
+
export interface OrbitDragOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Whether a drag turns the box at all. Off, the surface still reports a tap,
|
|
8
|
+
* so the reader can pick a sample while the drag belongs to something else.
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
/** Called with the camera each frame of a drag leaves behind. */
|
|
13
|
+
onOrbit: (turn: (camera: OrbitCamera) => OrbitCamera) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Called when a press and release happened in one place — a click, however
|
|
16
|
+
* the reader's hand shook.
|
|
17
|
+
* @default undefined
|
|
18
|
+
*/
|
|
19
|
+
onTap?: (x: number, y: number, mode: ScatterSelectionMode) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Called with the pointer's position on every frame it moves without
|
|
22
|
+
* turning, which is what raises the card under it.
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
25
|
+
onMove?: (x: number, y: number) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Called when the pointer leaves the surface without a drag in progress.
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
onLeave?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* What a tap with no modifier held does to the selection.
|
|
33
|
+
* @default 'replace'
|
|
34
|
+
*/
|
|
35
|
+
mode?: ScatterSelectionMode;
|
|
36
|
+
}
|
|
37
|
+
/** A drag that turns the box, and the taps it lets through. */
|
|
38
|
+
export interface OrbitDrag {
|
|
39
|
+
/** Whether the box is being turned right now. */
|
|
40
|
+
turning: boolean;
|
|
41
|
+
/** Spread onto the transparent rectangle over the figure. */
|
|
42
|
+
surface: ScatterSurfaceProps;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Turning the box with the pointer.
|
|
46
|
+
*
|
|
47
|
+
* It is the lasso's twin and is built the same way — the pointer is captured
|
|
48
|
+
* on the way down so a drag that wanders off the figure keeps turning it, all
|
|
49
|
+
* three ways a capture can end lead to one function, and moves are coalesced
|
|
50
|
+
* to one a frame because a pointer emits many per frame and each one that
|
|
51
|
+
* reaches the caller repaints every dot and every face.
|
|
52
|
+
*
|
|
53
|
+
* A press that goes nowhere is a tap rather than a turn of no degrees, because
|
|
54
|
+
* nobody presses a mouse button without moving it a pixel or two and a reader
|
|
55
|
+
* who meant to pick a sample must not have to hold their hand still to do it.
|
|
56
|
+
* @param options - See {@link OrbitDragOptions}.
|
|
57
|
+
* @returns The drag. See {@link OrbitDrag}.
|
|
58
|
+
*/
|
|
59
|
+
export declare function useOrbitDrag(options: OrbitDragOptions): OrbitDrag;
|
|
60
|
+
//# sourceMappingURL=useOrbitDrag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrbitDrag.d.ts","sourceRoot":"","sources":["../../../src/scatter3d/ui/useOrbitDrag.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAQ5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,uCAAuC;AACvC,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,KAAK,IAAI,CAAC;IAC9D;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACnE;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC7B;AAED,+DAA+D;AAC/D,MAAM,WAAW,SAAS;IACxB,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CA6HjE"}
|