matterviz 0.4.0 → 0.4.2
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/dist/EmptyState.svelte +10 -4
- package/dist/FilePicker.svelte +12 -14
- package/dist/Icon.svelte +7 -4
- package/dist/MillerIndexInput.svelte +2 -2
- package/dist/app.css +53 -0
- package/dist/brillouin/BrillouinZone.svelte +132 -219
- package/dist/brillouin/BrillouinZone.svelte.d.ts +9 -20
- package/dist/brillouin/BrillouinZoneControls.svelte +3 -6
- package/dist/brillouin/BrillouinZoneExportPane.svelte +47 -96
- package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +1 -1
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +15 -42
- package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +2 -3
- package/dist/brillouin/BrillouinZoneScene.svelte +63 -230
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +3 -23
- package/dist/brillouin/ReciprocalVectors.svelte +39 -0
- package/dist/brillouin/ReciprocalVectors.svelte.d.ts +9 -0
- package/dist/brillouin/compute.d.ts +2 -0
- package/dist/brillouin/compute.js +80 -77
- package/dist/brillouin/geometry.d.ts +8 -0
- package/dist/brillouin/geometry.js +57 -0
- package/dist/brillouin/index.d.ts +2 -0
- package/dist/brillouin/index.js +2 -0
- package/dist/brillouin/types.d.ts +2 -2
- package/dist/chempot-diagram/ChemPotDiagram.svelte +33 -38
- package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +143 -246
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +4 -1
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +652 -976
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +7 -1
- package/dist/chempot-diagram/async-compute.svelte.js +1 -1
- package/dist/chempot-diagram/color.d.ts +3 -6
- package/dist/chempot-diagram/color.js +5 -5
- package/dist/chempot-diagram/compute.d.ts +3 -3
- package/dist/chempot-diagram/compute.js +3 -1
- package/dist/chempot-diagram/controls-state.svelte.d.ts +10 -0
- package/dist/chempot-diagram/controls-state.svelte.js +42 -0
- package/dist/chempot-diagram/export.d.ts +47 -0
- package/dist/chempot-diagram/export.js +133 -0
- package/dist/chempot-diagram/index.d.ts +1 -0
- package/dist/chempot-diagram/index.js +1 -0
- package/dist/chempot-diagram/pointer.d.ts +0 -10
- package/dist/chempot-diagram/pointer.js +4 -4
- package/dist/chempot-diagram/types.d.ts +3 -3
- package/dist/colors/index.d.ts +0 -4
- package/dist/colors/index.js +21 -22
- package/dist/composition/BarChart.svelte +37 -31
- package/dist/composition/BubbleChart.svelte +17 -17
- package/dist/composition/Composition.svelte +7 -11
- package/dist/composition/Formula.svelte +18 -25
- package/dist/composition/FormulaFilter.svelte +96 -98
- package/dist/composition/PieChart.svelte +60 -46
- package/dist/composition/chem-sys.js +3 -2
- package/dist/composition/format.js +4 -3
- package/dist/composition/index.d.ts +2 -0
- package/dist/composition/index.js +14 -0
- package/dist/composition/parse.d.ts +2 -3
- package/dist/composition/parse.js +27 -28
- package/dist/constants.js +11 -9
- package/dist/controls.d.ts +1 -0
- package/dist/controls.js +0 -1
- package/dist/convex-hull/ConvexHull.svelte +20 -25
- package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -4
- package/dist/convex-hull/ConvexHull2D.svelte +176 -256
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull3D.svelte +269 -804
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull4D.svelte +236 -755
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullChrome.svelte +264 -0
- package/dist/convex-hull/ConvexHullChrome.svelte.d.ts +30 -0
- package/dist/convex-hull/ConvexHullControls.svelte +128 -49
- package/dist/convex-hull/ConvexHullControls.svelte.d.ts +7 -6
- package/dist/convex-hull/ConvexHullInfoPane.svelte +18 -5
- package/dist/convex-hull/ConvexHullInfoPane.svelte.d.ts +6 -5
- package/dist/convex-hull/ConvexHullStats.svelte +210 -351
- package/dist/convex-hull/ConvexHullStats.svelte.d.ts +3 -1
- package/dist/convex-hull/ConvexHullTooltip.svelte +16 -14
- package/dist/convex-hull/ConvexHullTooltip.svelte.d.ts +2 -1
- package/dist/convex-hull/GasPressureControls.svelte +5 -12
- package/dist/convex-hull/StructurePopup.svelte +17 -21
- package/dist/convex-hull/StructurePopup.svelte.d.ts +2 -0
- package/dist/convex-hull/TemperatureSlider.svelte +4 -10
- package/dist/convex-hull/barycentric-coords.d.ts +2 -4
- package/dist/convex-hull/barycentric-coords.js +6 -33
- package/dist/convex-hull/canvas-interactions.svelte.d.ts +79 -0
- package/dist/convex-hull/canvas-interactions.svelte.js +279 -0
- package/dist/convex-hull/helpers.d.ts +47 -17
- package/dist/convex-hull/helpers.js +186 -101
- package/dist/convex-hull/hull-state.svelte.d.ts +44 -0
- package/dist/convex-hull/hull-state.svelte.js +124 -0
- package/dist/convex-hull/index.d.ts +9 -7
- package/dist/convex-hull/index.js +7 -2
- package/dist/convex-hull/thermodynamics.js +109 -937
- package/dist/convex-hull/types.d.ts +12 -4
- package/dist/convex-hull/types.js +12 -0
- package/dist/coordination/CoordinationBarPlot.svelte +41 -43
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +1 -1
- package/dist/coordination/calc-coordination.d.ts +1 -1
- package/dist/coordination/calc-coordination.js +28 -25
- package/dist/element/BohrAtom.svelte +6 -8
- package/dist/element/ElementHeading.svelte +4 -1
- package/dist/element/ElementPhoto.svelte +11 -9
- package/dist/element/ElementStats.svelte +12 -10
- package/dist/element/ElementTile.svelte +24 -29
- package/dist/element/ElementTile.svelte.d.ts +1 -1
- package/dist/element/Nucleus.svelte +4 -2
- package/dist/element/data.d.ts +1 -2
- package/dist/element/helpers.d.ts +4 -0
- package/dist/element/helpers.js +18 -0
- package/dist/element/index.d.ts +1 -0
- package/dist/element/index.js +3 -0
- package/dist/feedback/DragOverlay.svelte +5 -3
- package/dist/feedback/DragOverlay.svelte.d.ts +2 -1
- package/dist/feedback/StatusMessage.svelte +20 -7
- package/dist/fermi-surface/FermiSlice.svelte +21 -18
- package/dist/fermi-surface/FermiSurface.svelte +78 -165
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +9 -20
- package/dist/fermi-surface/FermiSurfaceControls.svelte +6 -20
- package/dist/fermi-surface/FermiSurfaceScene.svelte +93 -272
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +3 -23
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +9 -6
- package/dist/fermi-surface/compute.js +14 -13
- package/dist/fermi-surface/export.js +4 -15
- package/dist/fermi-surface/index.d.ts +0 -1
- package/dist/fermi-surface/index.js +0 -1
- package/dist/fermi-surface/parse.d.ts +1 -1
- package/dist/fermi-surface/parse.js +84 -97
- package/dist/fermi-surface/types.d.ts +2 -2
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +161 -185
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +6 -5
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +12 -9
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +5 -5
- package/dist/heatmap-matrix/index.d.ts +8 -2
- package/dist/icons.d.ts +4 -0
- package/dist/icons.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/io/ExportPane.svelte +170 -0
- package/dist/io/ExportPane.svelte.d.ts +17 -0
- package/dist/io/decompress.d.ts +2 -1
- package/dist/io/decompress.js +22 -36
- package/dist/io/export.d.ts +9 -1
- package/dist/io/export.js +37 -29
- package/dist/io/fetch.d.ts +2 -4
- package/dist/io/fetch.js +0 -11
- package/dist/io/file-drop.d.ts +7 -0
- package/dist/io/file-drop.js +13 -0
- package/dist/io/index.d.ts +1 -0
- package/dist/io/index.js +3 -0
- package/dist/io/is-binary.d.ts +9 -0
- package/dist/io/is-binary.js +45 -1
- package/dist/io/types.d.ts +13 -0
- package/dist/io/url-drop.js +13 -25
- package/dist/isosurface/Isosurface.svelte +17 -23
- package/dist/isosurface/IsosurfaceControls.svelte +37 -42
- package/dist/isosurface/parse-vaspwave.d.ts +3 -0
- package/dist/isosurface/parse-vaspwave.js +138 -0
- package/dist/isosurface/parse.js +50 -48
- package/dist/labels.d.ts +6 -2
- package/dist/labels.js +44 -14
- package/dist/layout/FullscreenButton.svelte +34 -0
- package/dist/layout/FullscreenButton.svelte.d.ts +10 -0
- package/dist/layout/FullscreenToggle.svelte +12 -12
- package/dist/layout/InfoCard.svelte +7 -18
- package/dist/layout/InfoTag.svelte +1 -3
- package/dist/layout/NumberRangeInput.svelte +46 -0
- package/dist/layout/NumberRangeInput.svelte.d.ts +12 -0
- package/dist/layout/PropertyFilter.svelte +2 -6
- package/dist/layout/SettingsSection.svelte +21 -17
- package/dist/layout/SubpageGrid.svelte +3 -1
- package/dist/layout/ViewerChrome.svelte +115 -0
- package/dist/layout/ViewerChrome.svelte.d.ts +18 -0
- package/dist/layout/fullscreen.d.ts +4 -0
- package/dist/layout/fullscreen.js +3 -5
- package/dist/layout/fullscreen.svelte.d.ts +8 -0
- package/dist/layout/fullscreen.svelte.js +36 -0
- package/dist/layout/index.d.ts +4 -0
- package/dist/layout/index.js +4 -0
- package/dist/layout/json-tree/JsonNode.svelte +8 -11
- package/dist/layout/json-tree/JsonTree.svelte +53 -77
- package/dist/layout/json-tree/JsonValue.svelte +7 -15
- package/dist/layout/json-tree/utils.js +14 -23
- package/dist/math.d.ts +9 -3
- package/dist/math.js +37 -21
- package/dist/overlays/ContextMenu.svelte +4 -2
- package/dist/overlays/CopyButton.svelte +11 -5
- package/dist/overlays/DragControlTab.svelte +6 -1
- package/dist/overlays/DraggablePane.svelte +81 -26
- package/dist/overlays/DraggablePane.svelte.d.ts +1 -0
- package/dist/overlays/GlassChip.svelte +30 -0
- package/dist/overlays/GlassChip.svelte.d.ts +8 -0
- package/dist/overlays/InfoPaneCards.svelte +11 -23
- package/dist/overlays/index.d.ts +11 -0
- package/dist/overlays/index.js +26 -0
- package/dist/overlays/portal.d.ts +2 -0
- package/dist/overlays/portal.js +14 -0
- package/dist/periodic-table/PeriodicTable.svelte +115 -146
- package/dist/periodic-table/PeriodicTable.svelte.d.ts +5 -3
- package/dist/periodic-table/PeriodicTableControls.svelte +11 -63
- package/dist/periodic-table/TableInset.svelte +9 -4
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +50 -71
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +6 -8
- package/dist/phase-diagram/PhaseDiagramControls.svelte +73 -96
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +4 -3
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +4 -2
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +2 -3
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +49 -134
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +3 -4
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +54 -58
- package/dist/phase-diagram/TdbInfoPanel.svelte +21 -15
- package/dist/phase-diagram/build-diagram.js +3 -3
- package/dist/phase-diagram/colors.js +1 -1
- package/dist/phase-diagram/diagram-input.d.ts +1 -2
- package/dist/phase-diagram/parse.d.ts +2 -1
- package/dist/phase-diagram/parse.js +15 -15
- package/dist/phase-diagram/svg-to-diagram.js +21 -15
- package/dist/phase-diagram/utils.js +2 -3
- package/dist/plot/bar/BarPlot.svelte +494 -692
- package/dist/plot/bar/BarPlot.svelte.d.ts +9 -15
- package/dist/plot/bar/BarPlotControls.svelte +1 -3
- package/dist/plot/bar/BarPlotControls.svelte.d.ts +5 -7
- package/dist/plot/bar/SpacegroupBarPlot.svelte +31 -37
- package/dist/plot/bar/data.d.ts +5 -4
- package/dist/plot/bar/data.js +2 -1
- package/dist/plot/box/BoxPlot.svelte +361 -439
- package/dist/plot/box/BoxPlot.svelte.d.ts +6 -3
- package/dist/plot/box/BoxPlotControls.svelte.d.ts +1 -1
- package/dist/plot/box/Violin.svelte.d.ts +2 -1
- package/dist/plot/box/box-plot.d.ts +3 -2
- package/dist/plot/box/box-plot.js +6 -3
- package/dist/plot/box/kde.d.ts +2 -1
- package/dist/plot/box/kde.js +4 -4
- package/dist/plot/core/auto-place.d.ts +1 -1
- package/dist/plot/core/auto-place.js +5 -2
- package/dist/plot/core/axis-utils.d.ts +12 -7
- package/dist/plot/core/axis-utils.js +48 -48
- package/dist/plot/core/components/AxisLabel.svelte +82 -20
- package/dist/plot/core/components/AxisLabel.svelte.d.ts +1 -0
- package/dist/plot/core/components/ColorBar.svelte +106 -111
- package/dist/plot/core/components/ColorBar.svelte.d.ts +5 -4
- package/dist/plot/core/components/ColorScaleSelect.svelte +1 -1
- package/dist/plot/core/components/FillArea.svelte +10 -17
- package/dist/plot/core/components/HierarchyControls.svelte +249 -0
- package/dist/plot/{sunburst/SunburstControls.svelte.d.ts → core/components/HierarchyControls.svelte.d.ts} +12 -8
- package/dist/plot/core/components/InteractiveAxisLabel.svelte +1 -1
- package/dist/plot/core/components/InteractiveAxisLabel.svelte.d.ts +1 -1
- package/dist/plot/core/components/Line.svelte +21 -11
- package/dist/plot/core/components/Line.svelte.d.ts +5 -2
- package/dist/plot/core/components/PlotAxis.svelte +42 -18
- package/dist/plot/core/components/PlotAxis.svelte.d.ts +2 -1
- package/dist/plot/core/components/PlotControls.svelte +65 -41
- package/dist/plot/core/components/PlotControls.svelte.d.ts +1 -1
- package/dist/plot/core/components/PlotLegend.svelte +31 -35
- package/dist/plot/core/components/PlotMarginals.svelte +616 -0
- package/dist/plot/core/components/PlotMarginals.svelte.d.ts +15 -0
- package/dist/plot/core/components/PlotTooltip.svelte +1 -1
- package/dist/plot/core/components/PortalSelect.svelte +4 -8
- package/dist/plot/core/components/ReferenceLine.svelte +27 -24
- package/dist/plot/core/components/ReferenceLine3D.svelte +56 -59
- package/dist/plot/core/components/ReferenceLine3D.svelte.d.ts +4 -4
- package/dist/plot/core/components/ReferencePlane.svelte +9 -10
- package/dist/plot/core/components/ReferencePlane.svelte.d.ts +4 -4
- package/dist/plot/core/components/ZeroLines.svelte +4 -8
- package/dist/plot/core/components/ZoomRect.svelte +1 -2
- package/dist/plot/core/components/index.d.ts +1 -0
- package/dist/plot/core/components/index.js +1 -0
- package/dist/plot/core/data-cleaning-signal.d.ts +46 -0
- package/dist/plot/core/data-cleaning-signal.js +467 -0
- package/dist/plot/core/data-cleaning.d.ts +2 -42
- package/dist/plot/core/data-cleaning.js +29 -476
- package/dist/plot/core/data-transform.js +9 -5
- package/dist/plot/core/fill-utils.d.ts +7 -4
- package/dist/plot/core/fill-utils.js +34 -9
- package/dist/plot/core/index.d.ts +1 -0
- package/dist/plot/core/index.js +1 -0
- package/dist/plot/core/interactions.d.ts +5 -1
- package/dist/plot/core/interactions.js +14 -2
- package/dist/plot/core/layout.d.ts +3 -1
- package/dist/plot/core/layout.js +22 -13
- package/dist/plot/core/marginals.d.ts +170 -0
- package/dist/plot/core/marginals.js +436 -0
- package/dist/plot/core/pan-zoom.svelte.d.ts +35 -0
- package/dist/plot/core/pan-zoom.svelte.js +221 -0
- package/dist/plot/core/placed-tween.svelte.d.ts +21 -0
- package/dist/plot/core/placed-tween.svelte.js +68 -0
- package/dist/plot/core/reference-line.d.ts +10 -10
- package/dist/plot/core/reference-line.js +7 -7
- package/dist/plot/core/scales.d.ts +40 -25
- package/dist/plot/core/scales.js +49 -21
- package/dist/plot/core/svg.d.ts +2 -1
- package/dist/plot/core/types/fills.d.ts +101 -0
- package/dist/plot/core/types/fills.js +15 -0
- package/dist/plot/core/types/plot-3d.d.ts +87 -0
- package/dist/plot/core/types/plot-3d.js +4 -0
- package/dist/plot/core/types/reference-lines.d.ts +140 -0
- package/dist/plot/core/types/reference-lines.js +9 -0
- package/dist/plot/core/types.d.ts +47 -331
- package/dist/plot/core/types.js +23 -20
- package/dist/plot/core/utils/hierarchy-chart.d.ts +51 -0
- package/dist/plot/core/utils/hierarchy-chart.js +179 -0
- package/dist/plot/core/utils/hierarchy-labels.d.ts +20 -0
- package/dist/plot/core/utils/hierarchy-labels.js +99 -0
- package/dist/plot/core/utils/label-placement.d.ts +1 -1
- package/dist/plot/core/utils/label-placement.js +5 -5
- package/dist/plot/core/utils.d.ts +2 -1
- package/dist/plot/histogram/Histogram.svelte +373 -631
- package/dist/plot/histogram/Histogram.svelte.d.ts +7 -7
- package/dist/plot/histogram/HistogramControls.svelte +30 -28
- package/dist/plot/histogram/HistogramControls.svelte.d.ts +1 -1
- package/dist/plot/histogram/histogram.d.ts +31 -0
- package/dist/plot/histogram/histogram.js +70 -0
- package/dist/plot/histogram/index.d.ts +1 -0
- package/dist/plot/histogram/index.js +1 -0
- package/dist/plot/index.d.ts +1 -0
- package/dist/plot/index.js +1 -0
- package/dist/plot/sankey/Sankey.svelte +79 -73
- package/dist/plot/sankey/Sankey.svelte.d.ts +3 -3
- package/dist/plot/sankey/SankeyControls.svelte +22 -16
- package/dist/plot/sankey/sankey.js +3 -1
- package/dist/plot/scatter/BinnedScatterPlot.svelte +264 -112
- package/dist/plot/scatter/BinnedScatterPlot.svelte.d.ts +11 -4
- package/dist/plot/scatter/ElementScatter.svelte +4 -1
- package/dist/plot/scatter/ScatterPlot.svelte +623 -821
- package/dist/plot/scatter/ScatterPlot.svelte.d.ts +9 -15
- package/dist/plot/scatter/ScatterPlotControls.svelte +18 -19
- package/dist/plot/scatter/ScatterPlotControls.svelte.d.ts +1 -1
- package/dist/plot/scatter/ScatterPoint.svelte +16 -9
- package/dist/plot/scatter/binned-scatter-types.d.ts +6 -12
- package/dist/plot/scatter/binned-scatter-types.js +6 -1
- package/dist/plot/scatter/index.d.ts +1 -1
- package/dist/plot/scatter/scatter-data.d.ts +1 -1
- package/dist/plot/scatter/scatter-data.js +8 -7
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte +40 -60
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte.d.ts +6 -14
- package/dist/plot/scatter-3d/ScatterPlot3DControls.svelte +17 -15
- package/dist/plot/scatter-3d/ScatterPlot3DControls.svelte.d.ts +5 -5
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte +232 -234
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte.d.ts +5 -14
- package/dist/plot/scatter-3d/Surface3D.svelte +9 -17
- package/dist/plot/scatter-3d/Surface3D.svelte.d.ts +4 -3
- package/dist/plot/sunburst/Sunburst.svelte +256 -338
- package/dist/plot/sunburst/Sunburst.svelte.d.ts +4 -3
- package/dist/plot/sunburst/index.d.ts +1 -1
- package/dist/plot/sunburst/index.js +2 -1
- package/dist/plot/sunburst/render.d.ts +2 -2
- package/dist/plot/sunburst/render.js +47 -22
- package/dist/plot/sunburst/sunburst.d.ts +5 -1
- package/dist/plot/sunburst/sunburst.js +14 -4
- package/dist/plot/treemap/Treemap.svelte +907 -0
- package/dist/plot/treemap/Treemap.svelte.d.ts +84 -0
- package/dist/plot/treemap/index.d.ts +3 -0
- package/dist/plot/treemap/index.js +4 -0
- package/dist/plot/treemap/treemap.d.ts +26 -0
- package/dist/plot/treemap/treemap.js +99 -0
- package/dist/rdf/RdfPlot.svelte +22 -26
- package/dist/rdf/RdfPlot.svelte.d.ts +1 -1
- package/dist/rdf/calc-rdf.js +4 -8
- package/dist/sanitize.js +14 -3
- package/dist/scene/SceneCamera.svelte +62 -0
- package/dist/scene/SceneCamera.svelte.d.ts +19 -0
- package/dist/scene/bind-renderer.svelte.d.ts +2 -0
- package/dist/scene/bind-renderer.svelte.js +22 -0
- package/dist/scene/index.d.ts +4 -0
- package/dist/scene/index.js +5 -0
- package/dist/scene/props.js +52 -0
- package/dist/scene/types.d.ts +26 -0
- package/dist/scene/types.js +1 -0
- package/dist/settings.d.ts +33 -11
- package/dist/settings.js +136 -51
- package/dist/spectral/Bands.svelte +231 -237
- package/dist/spectral/Bands.svelte.d.ts +3 -2
- package/dist/spectral/BandsAndDos.svelte +29 -29
- package/dist/spectral/BrillouinBandsDos.svelte +21 -29
- package/dist/spectral/Dos.svelte +75 -77
- package/dist/spectral/Dos.svelte.d.ts +2 -1
- package/dist/spectral/helpers.d.ts +9 -9
- package/dist/spectral/helpers.js +66 -70
- package/dist/state.svelte.d.ts +0 -7
- package/dist/state.svelte.js +5 -24
- package/dist/structure/Arrow.svelte +6 -21
- package/dist/structure/ArrowInstances.svelte +160 -0
- package/dist/structure/ArrowInstances.svelte.d.ts +16 -0
- package/dist/structure/AtomLegend.svelte +115 -75
- package/dist/structure/AtomLegend.svelte.d.ts +1 -1
- package/dist/structure/Bond.svelte +31 -23
- package/dist/structure/CanvasTooltip.svelte +16 -3
- package/dist/structure/CellSelect.svelte +22 -29
- package/dist/structure/CellSelect.svelte.d.ts +2 -1
- package/dist/structure/Cylinder.svelte +24 -40
- package/dist/structure/InstancedAtoms.svelte +114 -0
- package/dist/structure/InstancedAtoms.svelte.d.ts +15 -0
- package/dist/structure/Lattice.svelte +85 -149
- package/dist/structure/SiteLabels.svelte +122 -0
- package/dist/structure/SiteLabels.svelte.d.ts +18 -0
- package/dist/structure/Structure.svelte +725 -735
- package/dist/structure/Structure.svelte.d.ts +8 -16
- package/dist/structure/StructureCarousel.svelte +630 -0
- package/dist/structure/StructureCarousel.svelte.d.ts +19 -0
- package/dist/structure/StructureControls.svelte +298 -325
- package/dist/structure/StructureControls.svelte.d.ts +5 -3
- package/dist/structure/StructureExportPane.svelte +62 -168
- package/dist/structure/StructureExportPane.svelte.d.ts +4 -5
- package/dist/structure/StructureInfoPane.svelte +77 -69
- package/dist/structure/StructureInfoPane.svelte.d.ts +6 -6
- package/dist/structure/StructureScene.svelte +758 -600
- package/dist/structure/StructureScene.svelte.d.ts +24 -20
- package/dist/structure/StructureViewport.svelte +386 -0
- package/dist/structure/StructureViewport.svelte.d.ts +63 -0
- package/dist/structure/atom-label-placement.d.ts +18 -0
- package/dist/structure/atom-label-placement.js +115 -0
- package/dist/structure/atom-properties.d.ts +3 -1
- package/dist/structure/atom-properties.js +115 -54
- package/dist/structure/bond-order-perception.js +2 -4
- package/dist/structure/bonding.d.ts +12 -2
- package/dist/structure/bonding.js +172 -73
- package/dist/structure/edit-history.d.ts +6 -0
- package/dist/structure/edit-history.js +27 -0
- package/dist/structure/export.d.ts +25 -4
- package/dist/structure/export.js +103 -153
- package/dist/structure/format-detect.d.ts +1 -0
- package/dist/structure/format-detect.js +22 -0
- package/dist/structure/geometry.d.ts +9 -0
- package/dist/structure/geometry.js +27 -0
- package/dist/structure/index.d.ts +18 -1
- package/dist/structure/index.js +15 -2
- package/dist/structure/measure.d.ts +1 -1
- package/dist/structure/measure.js +6 -12
- package/dist/structure/parse.d.ts +5 -3
- package/dist/structure/parse.js +551 -567
- package/dist/structure/partial-occupancy.d.ts +0 -1
- package/dist/structure/partial-occupancy.js +5 -3
- package/dist/structure/pbc.d.ts +1 -1
- package/dist/structure/pbc.js +204 -51
- package/dist/structure/polyhedra.d.ts +40 -0
- package/dist/structure/polyhedra.js +587 -0
- package/dist/structure/site.d.ts +4 -0
- package/dist/structure/site.js +1 -0
- package/dist/structure/supercell.d.ts +1 -2
- package/dist/structure/supercell.js +10 -15
- package/dist/structure/validation.js +5 -6
- package/dist/symmetry/SymmetryElementControls.svelte +69 -0
- package/dist/symmetry/SymmetryElementControls.svelte.d.ts +9 -0
- package/dist/symmetry/SymmetryElements.svelte +350 -0
- package/dist/symmetry/SymmetryElements.svelte.d.ts +24 -0
- package/dist/symmetry/SymmetryStats.svelte +142 -49
- package/dist/symmetry/WyckoffTable.svelte +58 -16
- package/dist/symmetry/WyckoffTable.svelte.d.ts +3 -0
- package/dist/symmetry/cell-transform.js +8 -14
- package/dist/symmetry/index.d.ts +15 -4
- package/dist/symmetry/index.js +308 -81
- package/dist/symmetry/spacegroups.d.ts +5 -1
- package/dist/symmetry/spacegroups.js +18 -3
- package/dist/symmetry/symmetry-elements.d.ts +33 -0
- package/dist/symmetry/symmetry-elements.js +521 -0
- package/dist/symmetry/wyckoff-db.d.ts +9 -0
- package/dist/symmetry/wyckoff-db.js +87 -0
- package/dist/table/HeatmapTable.svelte +1104 -378
- package/dist/table/HeatmapTable.svelte.d.ts +12 -2
- package/dist/table/ToggleMenu.svelte +5 -12
- package/dist/table/index.d.ts +21 -6
- package/dist/table/index.js +34 -21
- package/dist/theme/ThemeControl.svelte +16 -8
- package/dist/theme/index.d.ts +1 -5
- package/dist/theme/index.js +4 -10
- package/dist/theme/themes.mjs +14 -7
- package/dist/tooltip/KCoords.svelte +4 -1
- package/dist/tooltip/TooltipContent.svelte +2 -5
- package/dist/trajectory/Trajectory.svelte +556 -352
- package/dist/trajectory/Trajectory.svelte.d.ts +10 -22
- package/dist/trajectory/TrajectoryError.svelte +11 -8
- package/dist/trajectory/TrajectoryExportPane.svelte +28 -54
- package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +4 -5
- package/dist/trajectory/TrajectoryInfoPane.svelte +88 -99
- package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +3 -2
- package/dist/trajectory/constants.js +6 -2
- package/dist/trajectory/extract.js +73 -71
- package/dist/trajectory/format-detect.d.ts +0 -1
- package/dist/trajectory/format-detect.js +13 -17
- package/dist/trajectory/frame-reader.d.ts +2 -1
- package/dist/trajectory/frame-reader.js +74 -136
- package/dist/trajectory/helpers.d.ts +12 -2
- package/dist/trajectory/helpers.js +68 -37
- package/dist/trajectory/index.d.ts +1 -0
- package/dist/trajectory/index.js +3 -0
- package/dist/trajectory/parse/ase.d.ts +9 -1
- package/dist/trajectory/parse/ase.js +47 -32
- package/dist/trajectory/parse/diagnostics.d.ts +3 -0
- package/dist/trajectory/parse/diagnostics.js +14 -0
- package/dist/trajectory/parse/h5-utils.d.ts +13 -0
- package/dist/trajectory/parse/h5-utils.js +109 -0
- package/dist/trajectory/parse/hdf5.d.ts +1 -1
- package/dist/trajectory/parse/hdf5.js +116 -106
- package/dist/trajectory/parse/index.d.ts +3 -4
- package/dist/trajectory/parse/index.js +68 -119
- package/dist/trajectory/parse/lammps.d.ts +0 -2
- package/dist/trajectory/parse/lammps.js +14 -16
- package/dist/trajectory/parse/pymatgen.d.ts +2 -0
- package/dist/trajectory/parse/pymatgen.js +74 -0
- package/dist/trajectory/parse/vasp.js +13 -9
- package/dist/trajectory/parse/vaspout-electronic.d.ts +13 -0
- package/dist/trajectory/parse/vaspout-electronic.js +207 -0
- package/dist/trajectory/parse/vaspout-h5.d.ts +5 -0
- package/dist/trajectory/parse/vaspout-h5.js +284 -0
- package/dist/trajectory/parse/xyz.d.ts +9 -21
- package/dist/trajectory/parse/xyz.js +38 -39
- package/dist/trajectory/plotting.d.ts +8 -10
- package/dist/trajectory/plotting.js +102 -127
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +8 -1
- package/dist/xrd/XrdPlot.svelte +56 -85
- package/dist/xrd/broadening.d.ts +2 -1
- package/dist/xrd/broadening.js +2 -1
- package/dist/xrd/calc-xrd.js +8 -15
- package/dist/xrd/index.d.ts +2 -2
- package/dist/xrd/parse.d.ts +0 -1
- package/dist/xrd/parse.js +56 -73
- package/package.json +77 -36
- package/dist/api/mp.d.ts +0 -6
- package/dist/api/mp.js +0 -22
- package/dist/element/data.json +0 -11864
- package/dist/fermi-surface/marching-cubes.d.ts +0 -2
- package/dist/fermi-surface/marching-cubes.js +0 -2
- package/dist/plot/core/hover-lock.svelte.d.ts +0 -14
- package/dist/plot/core/hover-lock.svelte.js +0 -45
- package/dist/plot/sunburst/SunburstControls.svelte +0 -200
- package/dist/structure/label-placement.d.ts +0 -14
- package/dist/structure/label-placement.js +0 -72
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { PaneProps, PaneToggleProps } from '../overlays'
|
|
2
3
|
import type { ColorSchemeName, D3InterpolateName } from '../colors'
|
|
3
4
|
import { AXIS_COLORS, ELEMENT_COLOR_SCHEMES } from '../colors'
|
|
4
5
|
import IsosurfaceControls from '../isosurface/IsosurfaceControls.svelte'
|
|
5
6
|
import type { IsosurfaceSettings, VolumetricData } from '../isosurface/types'
|
|
6
7
|
import { format_num } from '../labels'
|
|
7
|
-
import { SettingsSection } from '../layout'
|
|
8
|
+
import { NumberRangeInput, SettingsSection } from '../layout'
|
|
8
9
|
import { to_degrees, to_radians } from '../math'
|
|
9
10
|
import DraggablePane from '../overlays/DraggablePane.svelte'
|
|
10
11
|
import { ColorScaleSelect } from '../plot'
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
VECTOR_PALETTE,
|
|
20
21
|
} from './'
|
|
21
22
|
import type { AtomColorConfig } from './atom-properties'
|
|
23
|
+
import { get_majority_element } from './bonding'
|
|
22
24
|
import { is_valid_supercell_input } from './supercell'
|
|
23
25
|
import type { CellType } from '../symmetry'
|
|
24
26
|
import type { MoyoDataset } from '@spglib/moyo-wasm'
|
|
@@ -54,6 +56,7 @@
|
|
|
54
56
|
volumetric_data = $bindable<VolumetricData[]>(),
|
|
55
57
|
isosurface_settings = $bindable<IsosurfaceSettings>(),
|
|
56
58
|
active_volume_idx = $bindable(0),
|
|
59
|
+
polyhedra_rendered_elements = [],
|
|
57
60
|
pane_props = {},
|
|
58
61
|
toggle_props = {},
|
|
59
62
|
...rest
|
|
@@ -74,8 +77,9 @@
|
|
|
74
77
|
volumetric_data?: VolumetricData[] // Volumetric data volumes for isosurface controls
|
|
75
78
|
isosurface_settings?: IsosurfaceSettings // Isosurface rendering settings
|
|
76
79
|
active_volume_idx?: number // Active volume index
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
polyhedra_rendered_elements?: string[] // elements currently anchoring polyhedra
|
|
81
|
+
pane_props?: PaneProps
|
|
82
|
+
toggle_props?: PaneToggleProps
|
|
79
83
|
} = $props()
|
|
80
84
|
|
|
81
85
|
// Color scheme selection state
|
|
@@ -93,15 +97,13 @@
|
|
|
93
97
|
|
|
94
98
|
// Sync local selection to config
|
|
95
99
|
$effect(() => {
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
) atom_color_config.scale = color_scale_selected[0]
|
|
100
|
+
if (color_scale_selected[0] && color_scale_selected[0] !== atom_color_config.scale)
|
|
101
|
+
atom_color_config.scale = color_scale_selected[0]
|
|
99
102
|
})
|
|
100
103
|
// Sync config to local selection (for external updates)
|
|
101
104
|
$effect(() => {
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
) color_scale_selected = [atom_color_config.scale]
|
|
105
|
+
if (atom_color_config.scale && atom_color_config.scale !== color_scale_selected[0])
|
|
106
|
+
color_scale_selected = [atom_color_config.scale]
|
|
105
107
|
})
|
|
106
108
|
// Auto-set scale_type based on mode
|
|
107
109
|
$effect(() => {
|
|
@@ -112,9 +114,47 @@
|
|
|
112
114
|
}
|
|
113
115
|
})
|
|
114
116
|
|
|
115
|
-
|
|
117
|
+
// Unique majority elements in the structure, for polyhedra center toggles.
|
|
118
|
+
// Majority (not all) species so the list matches what compute_polyhedra can
|
|
119
|
+
// actually use as centers - minority occupancies of disordered sites never are.
|
|
120
|
+
let structure_elements = $derived(
|
|
121
|
+
[
|
|
122
|
+
...new Set((structure?.sites ?? []).flatMap((site) => get_majority_element(site) ?? [])),
|
|
123
|
+
].sort(),
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
// An element counts as an enabled polyhedra center if it isn't excluded and is
|
|
127
|
+
// either force-included or currently rendered. Using configured intent (not just
|
|
128
|
+
// the transient render state) keeps the checkbox reversible: a force-included
|
|
129
|
+
// element that the CN/geometry filters can't render still shows checked, so the
|
|
130
|
+
// user can toggle it back off.
|
|
131
|
+
const is_polyhedra_center_enabled = (element: string): boolean => {
|
|
132
|
+
const excluded = scene_props.polyhedra_excluded_elements ?? []
|
|
133
|
+
const included = scene_props.polyhedra_included_elements ?? []
|
|
134
|
+
return (
|
|
135
|
+
!excluded.includes(element) &&
|
|
136
|
+
(included.includes(element) || polyhedra_rendered_elements.includes(element))
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Toggle an element as polyhedra center. Enabled elements get excluded; disabled
|
|
141
|
+
// ones get force-included (which also bypasses the automatic hiding of spectator
|
|
142
|
+
// cations like Li/Na/Ba).
|
|
143
|
+
function toggle_polyhedra_element(element: string) {
|
|
144
|
+
const excluded = scene_props.polyhedra_excluded_elements ?? []
|
|
145
|
+
const included = scene_props.polyhedra_included_elements ?? []
|
|
146
|
+
if (is_polyhedra_center_enabled(element)) {
|
|
147
|
+
scene_props.polyhedra_excluded_elements = [...new Set([...excluded, element])]
|
|
148
|
+
scene_props.polyhedra_included_elements = included.filter((el) => el !== element)
|
|
149
|
+
} else {
|
|
150
|
+
scene_props.polyhedra_excluded_elements = excluded.filter((el) => el !== element)
|
|
151
|
+
scene_props.polyhedra_included_elements = [...new Set([...included, element])]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const hex_color_pattern = /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i
|
|
116
156
|
const color_mix_pattern =
|
|
117
|
-
/^color-mix\(in srgb,\s*(
|
|
157
|
+
/^color-mix\(in srgb,\s*(?<hex>#[0-9a-f]{3}(?:[0-9a-f]{3})?)\s+(?<pct>\d+(?:\.\d+)?)%,\s*transparent\)$/i
|
|
118
158
|
|
|
119
159
|
const as_hex_color = (color: string | undefined, fallback: string): string =>
|
|
120
160
|
color?.match(hex_color_pattern)?.[0] ?? fallback
|
|
@@ -141,10 +181,7 @@
|
|
|
141
181
|
: { hex_color, opacity: 1 }
|
|
142
182
|
}
|
|
143
183
|
|
|
144
|
-
const default_site_label_color = as_hex_color(
|
|
145
|
-
DEFAULTS.structure.site_label_color,
|
|
146
|
-
`#111111`,
|
|
147
|
-
)
|
|
184
|
+
const default_site_label_color = as_hex_color(DEFAULTS.structure.site_label_color, `#111111`)
|
|
148
185
|
const default_site_label_bg = parse_label_bg_color(
|
|
149
186
|
DEFAULTS.structure.site_label_bg_color,
|
|
150
187
|
`#000000`,
|
|
@@ -189,10 +226,10 @@
|
|
|
189
226
|
|
|
190
227
|
if (!external_color_changed) scene_props.site_label_color = site_label_hex_color
|
|
191
228
|
if (!external_bg_changed) {
|
|
192
|
-
scene_props.site_label_bg_color =
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
229
|
+
scene_props.site_label_bg_color = `color-mix(in srgb, ${site_label_bg_hex_color} ${format_num(
|
|
230
|
+
site_label_background_opacity,
|
|
231
|
+
`.1~%`,
|
|
232
|
+
)}, transparent)`
|
|
196
233
|
}
|
|
197
234
|
|
|
198
235
|
last_synced_site_label_color = scene_props.site_label_color
|
|
@@ -203,9 +240,7 @@
|
|
|
203
240
|
scene_props.site_label_offset ??= [...DEFAULTS.structure.site_label_offset]
|
|
204
241
|
|
|
205
242
|
// Collect available vector property keys from the structure
|
|
206
|
-
let available_vector_keys = $derived(
|
|
207
|
-
structure ? get_structure_vector_keys(structure) : [],
|
|
208
|
-
)
|
|
243
|
+
let available_vector_keys = $derived(structure ? get_structure_vector_keys(structure) : [])
|
|
209
244
|
const is_key_visible = (key: string): boolean =>
|
|
210
245
|
scene_props.vector_configs?.[key]?.visible !== false
|
|
211
246
|
|
|
@@ -293,6 +328,7 @@
|
|
|
293
328
|
current_values={{
|
|
294
329
|
show_atoms: scene_props.show_atoms,
|
|
295
330
|
show_bonds: scene_props.show_bonds,
|
|
331
|
+
show_polyhedra: scene_props.show_polyhedra,
|
|
296
332
|
show_image_atoms,
|
|
297
333
|
show_site_labels: scene_props.show_site_labels,
|
|
298
334
|
show_site_indices: scene_props.show_site_indices,
|
|
@@ -302,6 +338,7 @@
|
|
|
302
338
|
on_reset={() => {
|
|
303
339
|
scene_props.show_atoms = DEFAULTS.structure.show_atoms
|
|
304
340
|
scene_props.show_bonds = DEFAULTS.structure.show_bonds
|
|
341
|
+
scene_props.show_polyhedra = DEFAULTS.structure.show_polyhedra
|
|
305
342
|
scene_props.show_site_labels = DEFAULTS.structure.show_site_labels
|
|
306
343
|
scene_props.show_site_indices = DEFAULTS.structure.show_site_indices
|
|
307
344
|
scene_props.vector_configs = default_vector_configs(available_vector_keys)
|
|
@@ -340,6 +377,7 @@
|
|
|
340
377
|
</label>
|
|
341
378
|
{#if available_vector_keys.length > 0}
|
|
342
379
|
{#each available_vector_keys as key, idx (key)}
|
|
380
|
+
{@const key_visible = is_key_visible(key)}
|
|
343
381
|
<label
|
|
344
382
|
{@attach tooltip({
|
|
345
383
|
content: `Toggle ${key} vectors`,
|
|
@@ -348,18 +386,18 @@
|
|
|
348
386
|
>
|
|
349
387
|
<input
|
|
350
388
|
type="checkbox"
|
|
351
|
-
checked={
|
|
352
|
-
onchange={() => update_vector_config(key, { visible: !
|
|
389
|
+
checked={key_visible}
|
|
390
|
+
onchange={() => update_vector_config(key, { visible: !key_visible })}
|
|
353
391
|
/>
|
|
354
392
|
<input
|
|
355
393
|
type="color"
|
|
356
394
|
aria-label={`${key} vector color`}
|
|
357
395
|
value={scene_props.vector_configs?.[key]?.color ??
|
|
358
|
-
|
|
396
|
+
VECTOR_PALETTE[idx % VECTOR_PALETTE.length]}
|
|
359
397
|
onchange={(evt) =>
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
398
|
+
update_vector_config(key, {
|
|
399
|
+
color: evt.currentTarget.value,
|
|
400
|
+
})}
|
|
363
401
|
style="width: 22px; height: 22px; padding: 0; border: none; cursor: pointer"
|
|
364
402
|
/>
|
|
365
403
|
{key}
|
|
@@ -386,10 +424,18 @@
|
|
|
386
424
|
>
|
|
387
425
|
Bonds:
|
|
388
426
|
<select bind:value={scene_props.show_bonds}>
|
|
389
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.show_bonds.enum ?? {}) as
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
427
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.show_bonds.enum ?? {}) as [value, label] (value)}
|
|
428
|
+
<option {value}>{label}</option>
|
|
429
|
+
{/each}
|
|
430
|
+
</select>
|
|
431
|
+
</label>
|
|
432
|
+
<label
|
|
433
|
+
{@attach tooltip({ content: SETTINGS_CONFIG.structure.show_polyhedra.description })}
|
|
434
|
+
style="gap: 6pt"
|
|
435
|
+
>
|
|
436
|
+
Polyhedra:
|
|
437
|
+
<select bind:value={scene_props.show_polyhedra}>
|
|
438
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.show_polyhedra.enum ?? {}) as [value, label] (value)}
|
|
393
439
|
<option {value}>{label}</option>
|
|
394
440
|
{/each}
|
|
395
441
|
</select>
|
|
@@ -426,127 +472,60 @@
|
|
|
426
472
|
Projection
|
|
427
473
|
</span>
|
|
428
474
|
<select bind:value={scene_props.camera_projection}>
|
|
429
|
-
{#each Object.entries(
|
|
430
|
-
SETTINGS_CONFIG.structure.camera_projection.enum ?? {},
|
|
431
|
-
) as
|
|
432
|
-
[value, label]
|
|
433
|
-
(value)
|
|
434
|
-
}
|
|
475
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.camera_projection.enum ?? {}) as [value, label] (value)}
|
|
435
476
|
<option {value}>{label}</option>
|
|
436
477
|
{/each}
|
|
437
478
|
</select>
|
|
438
479
|
</label>
|
|
439
|
-
<
|
|
440
|
-
{
|
|
480
|
+
<NumberRangeInput
|
|
481
|
+
min={0}
|
|
482
|
+
max={2}
|
|
483
|
+
step={0.01}
|
|
484
|
+
bind:value={scene_props.auto_rotate}
|
|
485
|
+
title={SETTINGS_CONFIG.structure.auto_rotate.description}
|
|
486
|
+
>Auto-rotate speed</NumberRangeInput
|
|
441
487
|
>
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
bind:value={scene_props.auto_rotate}
|
|
449
|
-
/>
|
|
450
|
-
<input
|
|
451
|
-
type="range"
|
|
452
|
-
min={0}
|
|
453
|
-
max={2}
|
|
454
|
-
step={0.01}
|
|
455
|
-
bind:value={scene_props.auto_rotate}
|
|
456
|
-
/>
|
|
457
|
-
</label>
|
|
458
|
-
<label
|
|
459
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.rotate_speed.description })}
|
|
488
|
+
<NumberRangeInput
|
|
489
|
+
min={0}
|
|
490
|
+
max={2}
|
|
491
|
+
step={0.05}
|
|
492
|
+
bind:value={scene_props.rotate_speed}
|
|
493
|
+
title={SETTINGS_CONFIG.structure.rotate_speed.description}>Rotate speed</NumberRangeInput
|
|
460
494
|
>
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
bind:value={scene_props.rotate_speed}
|
|
468
|
-
/>
|
|
469
|
-
<input
|
|
470
|
-
type="range"
|
|
471
|
-
min={0}
|
|
472
|
-
max={2}
|
|
473
|
-
step={0.05}
|
|
474
|
-
bind:value={scene_props.rotate_speed}
|
|
475
|
-
/>
|
|
476
|
-
</label>
|
|
477
|
-
<label
|
|
478
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_speed.description })}
|
|
495
|
+
<NumberRangeInput
|
|
496
|
+
min={0.1}
|
|
497
|
+
max={0.8}
|
|
498
|
+
step={0.02}
|
|
499
|
+
bind:value={scene_props.zoom_speed}
|
|
500
|
+
title={SETTINGS_CONFIG.structure.zoom_speed.description}>Zoom speed</NumberRangeInput
|
|
479
501
|
>
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
bind:value={scene_props.zoom_speed}
|
|
487
|
-
/>
|
|
488
|
-
<input
|
|
489
|
-
type="range"
|
|
490
|
-
min={0.1}
|
|
491
|
-
max={0.8}
|
|
492
|
-
step={0.02}
|
|
493
|
-
bind:value={scene_props.zoom_speed}
|
|
494
|
-
/>
|
|
495
|
-
</label>
|
|
496
|
-
<label
|
|
497
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.pan_speed.description })}
|
|
502
|
+
<NumberRangeInput
|
|
503
|
+
min={0}
|
|
504
|
+
max={2}
|
|
505
|
+
step={0.01}
|
|
506
|
+
bind:value={scene_props.pan_speed}
|
|
507
|
+
title={SETTINGS_CONFIG.structure.pan_speed.description}>Pan speed</NumberRangeInput
|
|
498
508
|
>
|
|
499
|
-
Pan speed
|
|
500
|
-
<input
|
|
501
|
-
type="number"
|
|
502
|
-
min={0}
|
|
503
|
-
max={2}
|
|
504
|
-
step={0.01}
|
|
505
|
-
bind:value={scene_props.pan_speed}
|
|
506
|
-
/>
|
|
507
|
-
<input
|
|
508
|
-
type="range"
|
|
509
|
-
min={0}
|
|
510
|
-
max={2}
|
|
511
|
-
step={0.01}
|
|
512
|
-
bind:value={scene_props.pan_speed}
|
|
513
|
-
/>
|
|
514
|
-
</label>
|
|
515
509
|
<label
|
|
516
510
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_to_cursor.description })}
|
|
517
511
|
>
|
|
518
512
|
<input type="checkbox" bind:checked={scene_props.zoom_to_cursor} />
|
|
519
513
|
<span>Zoom to cursor</span>
|
|
520
514
|
</label>
|
|
521
|
-
<
|
|
522
|
-
{
|
|
515
|
+
<NumberRangeInput
|
|
516
|
+
min={0.01}
|
|
517
|
+
max={0.3}
|
|
518
|
+
step={0.01}
|
|
519
|
+
bind:value={scene_props.rotation_damping}
|
|
520
|
+
title={SETTINGS_CONFIG.structure.rotation_damping.description}
|
|
521
|
+
>Rotation damping</NumberRangeInput
|
|
523
522
|
>
|
|
524
|
-
Rotation damping
|
|
525
|
-
<input
|
|
526
|
-
type="number"
|
|
527
|
-
min={0.01}
|
|
528
|
-
max={0.3}
|
|
529
|
-
step={0.01}
|
|
530
|
-
bind:value={scene_props.rotation_damping}
|
|
531
|
-
/>
|
|
532
|
-
<input
|
|
533
|
-
type="range"
|
|
534
|
-
min={0.01}
|
|
535
|
-
max={0.3}
|
|
536
|
-
step={0.01}
|
|
537
|
-
bind:value={scene_props.rotation_damping}
|
|
538
|
-
/>
|
|
539
|
-
</label>
|
|
540
523
|
|
|
541
524
|
Axis Rotation
|
|
542
525
|
<div class="rotation-axes">
|
|
543
526
|
{#each AXIS_COLORS as [axis, color], idx (axis)}
|
|
544
527
|
<div>
|
|
545
|
-
<div
|
|
546
|
-
{@attach tooltip()}
|
|
547
|
-
title="{axis}-axis rotation in degrees"
|
|
548
|
-
style:color
|
|
549
|
-
>
|
|
528
|
+
<div {@attach tooltip()} title="{axis}-axis rotation in degrees" style:color>
|
|
550
529
|
<span>{axis.toUpperCase()} = </span>
|
|
551
530
|
<input
|
|
552
531
|
type="number"
|
|
@@ -554,8 +533,7 @@
|
|
|
554
533
|
max={360}
|
|
555
534
|
step={1}
|
|
556
535
|
value={rotation_degrees[idx].toFixed(0)}
|
|
557
|
-
oninput={(event) =>
|
|
558
|
-
update_rotation(axis, Number(event.currentTarget.value))}
|
|
536
|
+
oninput={(event) => update_rotation(axis, Number(event.currentTarget.value))}
|
|
559
537
|
style:color
|
|
560
538
|
style="margin: 0"
|
|
561
539
|
/>
|
|
@@ -595,34 +573,21 @@
|
|
|
595
573
|
color_scale_selected = [DEFAULTS.structure.atom_color_scale]
|
|
596
574
|
}}
|
|
597
575
|
>
|
|
598
|
-
<
|
|
599
|
-
{
|
|
576
|
+
<NumberRangeInput
|
|
577
|
+
min={0.2}
|
|
578
|
+
max={2}
|
|
579
|
+
step={0.05}
|
|
580
|
+
bind:value={scene_props.atom_radius}
|
|
581
|
+
title={SETTINGS_CONFIG.structure.atom_radius.description}
|
|
582
|
+
>Radius <small>(Å)</small></NumberRangeInput
|
|
600
583
|
>
|
|
601
|
-
Radius <small>(Å)</small>
|
|
602
|
-
<input
|
|
603
|
-
type="number"
|
|
604
|
-
min={0.2}
|
|
605
|
-
max={2}
|
|
606
|
-
step={0.05}
|
|
607
|
-
bind:value={scene_props.atom_radius}
|
|
608
|
-
/>
|
|
609
|
-
<input
|
|
610
|
-
type="range"
|
|
611
|
-
min={0.2}
|
|
612
|
-
max={2}
|
|
613
|
-
step={0.05}
|
|
614
|
-
bind:value={scene_props.atom_radius}
|
|
615
|
-
/>
|
|
616
|
-
</label>
|
|
617
584
|
<label
|
|
618
585
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.same_size_atoms.description })}
|
|
619
586
|
>
|
|
620
587
|
Same size atoms
|
|
621
588
|
<input type="checkbox" bind:checked={scene_props.same_size_atoms} />
|
|
622
589
|
</label>
|
|
623
|
-
<label
|
|
624
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.color_scheme.description })}
|
|
625
|
-
>
|
|
590
|
+
<label {@attach tooltip({ content: SETTINGS_CONFIG.color_scheme.description })}>
|
|
626
591
|
Color scheme
|
|
627
592
|
<Select
|
|
628
593
|
options={Object.keys(ELEMENT_COLOR_SCHEMES)}
|
|
@@ -637,14 +602,12 @@
|
|
|
637
602
|
aria-label="Color scheme"
|
|
638
603
|
>
|
|
639
604
|
{#snippet children({ option })}
|
|
640
|
-
{@const option_style =
|
|
641
|
-
`display: flex; align-items: center; gap: 6pt; justify-content: space-between;`}
|
|
605
|
+
{@const option_style = `display: flex; align-items: center; gap: 6pt; justify-content: space-between;`}
|
|
642
606
|
<div style={option_style}>
|
|
643
607
|
{option}
|
|
644
608
|
<div style="display: flex; gap: 3pt">
|
|
645
609
|
{#each get_representative_colors(String(option)) as color (color)}
|
|
646
|
-
{@const color_style =
|
|
647
|
-
`width: 15px; height: 15px; border-radius: 2px; background: ${color};`}
|
|
610
|
+
{@const color_style = `width: 15px; height: 15px; border-radius: 2px; background: ${color};`}
|
|
648
611
|
<div style={color_style}></div>
|
|
649
612
|
{/each}
|
|
650
613
|
</div>
|
|
@@ -657,10 +620,7 @@
|
|
|
657
620
|
>
|
|
658
621
|
Atom coloring
|
|
659
622
|
<select bind:value={atom_color_config.mode}>
|
|
660
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.atom_color_mode.enum || {}) as
|
|
661
|
-
[value, label]
|
|
662
|
-
(value)
|
|
663
|
-
}
|
|
623
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.atom_color_mode.enum || {}) as [value, label] (value)}
|
|
664
624
|
<option {value} disabled={!sym_data && value === `wyckoff`}>{label}</option>
|
|
665
625
|
{/each}
|
|
666
626
|
</select>
|
|
@@ -808,31 +768,16 @@
|
|
|
808
768
|
scene_props.vector_color_mode = DEFAULTS.structure.vector_color_mode
|
|
809
769
|
scene_props.vector_color_scale = DEFAULTS.structure.vector_color_scale
|
|
810
770
|
scene_props.vector_normalize = DEFAULTS.structure.vector_normalize
|
|
811
|
-
scene_props.vector_uniform_thickness =
|
|
812
|
-
DEFAULTS.structure.vector_uniform_thickness
|
|
771
|
+
scene_props.vector_uniform_thickness = DEFAULTS.structure.vector_uniform_thickness
|
|
813
772
|
scene_props.vector_origin_gap = DEFAULTS.structure.vector_origin_gap
|
|
814
773
|
for (const key of available_vector_keys) {
|
|
815
774
|
update_vector_config(key, { scale: null })
|
|
816
775
|
}
|
|
817
776
|
}}
|
|
818
777
|
>
|
|
819
|
-
<
|
|
820
|
-
Global Scale
|
|
821
|
-
|
|
822
|
-
type="number"
|
|
823
|
-
min={0.001}
|
|
824
|
-
max={5}
|
|
825
|
-
step={0.001}
|
|
826
|
-
bind:value={scene_props.vector_scale}
|
|
827
|
-
/>
|
|
828
|
-
<input
|
|
829
|
-
type="range"
|
|
830
|
-
min={0.001}
|
|
831
|
-
max={5}
|
|
832
|
-
step={0.001}
|
|
833
|
-
bind:value={scene_props.vector_scale}
|
|
834
|
-
/>
|
|
835
|
-
</label>
|
|
778
|
+
<NumberRangeInput min={0.001} max={5} step={0.001} bind:value={scene_props.vector_scale}
|
|
779
|
+
>Global Scale</NumberRangeInput
|
|
780
|
+
>
|
|
836
781
|
<label
|
|
837
782
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.vector_normalize.description })}
|
|
838
783
|
style="gap: 6pt"
|
|
@@ -841,7 +786,9 @@
|
|
|
841
786
|
Normalize
|
|
842
787
|
</label>
|
|
843
788
|
<label
|
|
844
|
-
{@attach tooltip({
|
|
789
|
+
{@attach tooltip({
|
|
790
|
+
content: SETTINGS_CONFIG.structure.vector_uniform_thickness.description,
|
|
791
|
+
})}
|
|
845
792
|
style="gap: 6pt"
|
|
846
793
|
>
|
|
847
794
|
<input type="checkbox" bind:checked={scene_props.vector_uniform_thickness} />
|
|
@@ -873,35 +820,24 @@
|
|
|
873
820
|
</label>
|
|
874
821
|
{/if}
|
|
875
822
|
{#if available_vector_keys.length > 1}
|
|
876
|
-
<
|
|
877
|
-
{
|
|
823
|
+
<NumberRangeInput
|
|
824
|
+
min={0}
|
|
825
|
+
max={0.5}
|
|
826
|
+
step={0.02}
|
|
827
|
+
bind:value={scene_props.vector_origin_gap}
|
|
828
|
+
title={SETTINGS_CONFIG.structure.vector_origin_gap.description}
|
|
829
|
+
>Origin Gap</NumberRangeInput
|
|
878
830
|
>
|
|
879
|
-
Origin Gap
|
|
880
|
-
<input
|
|
881
|
-
type="number"
|
|
882
|
-
min={0}
|
|
883
|
-
max={0.5}
|
|
884
|
-
step={0.02}
|
|
885
|
-
bind:value={scene_props.vector_origin_gap}
|
|
886
|
-
/>
|
|
887
|
-
<input
|
|
888
|
-
type="range"
|
|
889
|
-
min={0}
|
|
890
|
-
max={0.5}
|
|
891
|
-
step={0.02}
|
|
892
|
-
bind:value={scene_props.vector_origin_gap}
|
|
893
|
-
/>
|
|
894
|
-
</label>
|
|
895
831
|
{#each available_vector_keys as key (key)}
|
|
896
832
|
{#if is_key_visible(key)}
|
|
897
|
-
{@const on_scale = (
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
update_vector_config(key, { scale: Number.isNaN(parsed) ? 1.0 : parsed })
|
|
902
|
-
}}
|
|
833
|
+
{@const on_scale = (evt: Event & { currentTarget: HTMLInputElement }) => {
|
|
834
|
+
const parsed = parseFloat(evt.currentTarget.value)
|
|
835
|
+
update_vector_config(key, { scale: Number.isNaN(parsed) ? 1.0 : parsed })
|
|
836
|
+
}}
|
|
903
837
|
<label
|
|
904
|
-
{@attach tooltip({
|
|
838
|
+
{@attach tooltip({
|
|
839
|
+
content: `Scale multiplier for ${key} arrows (applied on top of global scale)`,
|
|
840
|
+
})}
|
|
905
841
|
>
|
|
906
842
|
{key} scale
|
|
907
843
|
<input
|
|
@@ -963,7 +899,9 @@
|
|
|
963
899
|
</label>
|
|
964
900
|
<label>
|
|
965
901
|
<span
|
|
966
|
-
{@attach tooltip({
|
|
902
|
+
{@attach tooltip({
|
|
903
|
+
content: `Create supercells by repeating the unit cell. Examples: "2x2x2", "3x1x2", or "2"`,
|
|
904
|
+
})}
|
|
967
905
|
>
|
|
968
906
|
Supercell Scaling
|
|
969
907
|
</span>
|
|
@@ -980,8 +918,8 @@
|
|
|
980
918
|
pattern="^(\d+|\d+x\d+x\d+)$"
|
|
981
919
|
aria-invalid={!supercell_input_valid}
|
|
982
920
|
title={supercell_input_valid
|
|
983
|
-
|
|
984
|
-
|
|
921
|
+
? `Valid supercell scaling: ${supercell_scaling}`
|
|
922
|
+
: `Invalid format. Use "2x2x2", "3x1x2", or "2"`}
|
|
985
923
|
/>
|
|
986
924
|
</label>
|
|
987
925
|
{#if supercell_loading}
|
|
@@ -1005,48 +943,15 @@
|
|
|
1005
943
|
</div>
|
|
1006
944
|
{/if}
|
|
1007
945
|
|
|
1008
|
-
{#each [
|
|
1009
|
-
{
|
|
1010
|
-
label: `Edge color`,
|
|
1011
|
-
color_prop: `cell_edge_color`,
|
|
1012
|
-
opacity_prop: `cell_edge_opacity`,
|
|
1013
|
-
step: 0.05,
|
|
1014
|
-
},
|
|
1015
|
-
{
|
|
1016
|
-
label: `Surface color`,
|
|
1017
|
-
color_prop: `cell_surface_color`,
|
|
1018
|
-
opacity_prop: `cell_surface_opacity`,
|
|
1019
|
-
step: 0.01,
|
|
1020
|
-
},
|
|
1021
|
-
] as const as
|
|
1022
|
-
{ label, color_prop, opacity_prop, step }
|
|
1023
|
-
(label)
|
|
1024
|
-
}
|
|
946
|
+
{#each [{ label: `Edge color`, color_prop: `cell_edge_color`, opacity_prop: `cell_edge_opacity`, step: 0.05 }, { label: `Surface color`, color_prop: `cell_surface_color`, opacity_prop: `cell_surface_opacity`, step: 0.01 }] as const as { label, color_prop, opacity_prop, step } (label)}
|
|
1025
947
|
<div class="pane-row">
|
|
1026
948
|
<label>
|
|
1027
949
|
{label}
|
|
1028
|
-
<input
|
|
1029
|
-
type="color"
|
|
1030
|
-
bind:value={lattice_props[color_prop]}
|
|
1031
|
-
/>
|
|
950
|
+
<input type="color" bind:value={lattice_props[color_prop]} />
|
|
1032
951
|
</label>
|
|
1033
|
-
<
|
|
952
|
+
<NumberRangeInput min={0} max={1} {step} bind:value={lattice_props[opacity_prop]}>
|
|
1034
953
|
opacity
|
|
1035
|
-
|
|
1036
|
-
type="number"
|
|
1037
|
-
min={0}
|
|
1038
|
-
max={1}
|
|
1039
|
-
{step}
|
|
1040
|
-
bind:value={lattice_props[opacity_prop]}
|
|
1041
|
-
/>
|
|
1042
|
-
<input
|
|
1043
|
-
type="range"
|
|
1044
|
-
min={0}
|
|
1045
|
-
max={1}
|
|
1046
|
-
{step}
|
|
1047
|
-
bind:value={lattice_props[opacity_prop]}
|
|
1048
|
-
/>
|
|
1049
|
-
</label>
|
|
954
|
+
</NumberRangeInput>
|
|
1050
955
|
</div>
|
|
1051
956
|
{/each}
|
|
1052
957
|
</SettingsSection>
|
|
@@ -1075,17 +980,9 @@
|
|
|
1075
980
|
}}
|
|
1076
981
|
/>
|
|
1077
982
|
</label>
|
|
1078
|
-
<
|
|
983
|
+
<NumberRangeInput min={0} max={1} step={0.02} bind:value={background_opacity}>
|
|
1079
984
|
Opacity
|
|
1080
|
-
|
|
1081
|
-
type="number"
|
|
1082
|
-
min={0}
|
|
1083
|
-
max={1}
|
|
1084
|
-
step={0.02}
|
|
1085
|
-
bind:value={background_opacity}
|
|
1086
|
-
/>
|
|
1087
|
-
<input type="range" min={0} max={1} step={0.02} bind:value={background_opacity} />
|
|
1088
|
-
</label>
|
|
985
|
+
</NumberRangeInput>
|
|
1089
986
|
</div>
|
|
1090
987
|
</SettingsSection>
|
|
1091
988
|
|
|
@@ -1100,44 +997,22 @@
|
|
|
1100
997
|
scene_props.ambient_light = DEFAULTS.structure.ambient_light
|
|
1101
998
|
}}
|
|
1102
999
|
>
|
|
1103
|
-
<
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
bind:value={scene_props.directional_light}
|
|
1120
|
-
/>
|
|
1121
|
-
</label>
|
|
1122
|
-
<label>
|
|
1123
|
-
<span title="Intensity of the ambient light" {@attach tooltip()}>
|
|
1124
|
-
Ambient light
|
|
1125
|
-
</span>
|
|
1126
|
-
<input
|
|
1127
|
-
type="number"
|
|
1128
|
-
min={0.5}
|
|
1129
|
-
max={3}
|
|
1130
|
-
step={0.05}
|
|
1131
|
-
bind:value={scene_props.ambient_light}
|
|
1132
|
-
/>
|
|
1133
|
-
<input
|
|
1134
|
-
type="range"
|
|
1135
|
-
min={0.5}
|
|
1136
|
-
max={3}
|
|
1137
|
-
step={0.05}
|
|
1138
|
-
bind:value={scene_props.ambient_light}
|
|
1139
|
-
/>
|
|
1140
|
-
</label>
|
|
1000
|
+
<NumberRangeInput
|
|
1001
|
+
min={0}
|
|
1002
|
+
max={4}
|
|
1003
|
+
step={0.01}
|
|
1004
|
+
bind:value={scene_props.directional_light}
|
|
1005
|
+
title={SETTINGS_CONFIG.structure.directional_light.description}
|
|
1006
|
+
>Directional light</NumberRangeInput
|
|
1007
|
+
>
|
|
1008
|
+
<NumberRangeInput
|
|
1009
|
+
min={0.5}
|
|
1010
|
+
max={3}
|
|
1011
|
+
step={0.05}
|
|
1012
|
+
bind:value={scene_props.ambient_light}
|
|
1013
|
+
title={SETTINGS_CONFIG.structure.ambient_light.description}
|
|
1014
|
+
>Ambient light</NumberRangeInput
|
|
1015
|
+
>
|
|
1141
1016
|
</SettingsSection>
|
|
1142
1017
|
|
|
1143
1018
|
{#if scene_props.show_bonds && scene_props.show_bonds !== `never`}
|
|
@@ -1160,12 +1035,7 @@
|
|
|
1160
1035
|
>
|
|
1161
1036
|
<label>
|
|
1162
1037
|
Strategy <select bind:value={scene_props.bonding_strategy}>
|
|
1163
|
-
{#each Object.entries(
|
|
1164
|
-
SETTINGS_CONFIG.structure.bonding_strategy.enum ?? {},
|
|
1165
|
-
) as
|
|
1166
|
-
[value, label]
|
|
1167
|
-
(value)
|
|
1168
|
-
}
|
|
1038
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.bonding_strategy.enum ?? {}) as [value, label] (value)}
|
|
1169
1039
|
<option {value}>{label}</option>
|
|
1170
1040
|
{/each}
|
|
1171
1041
|
</select>
|
|
@@ -1179,15 +1049,12 @@
|
|
|
1179
1049
|
</label>
|
|
1180
1050
|
{#if scene_props.auto_bond_order}
|
|
1181
1051
|
<label
|
|
1182
|
-
{@attach tooltip({
|
|
1052
|
+
{@attach tooltip({
|
|
1053
|
+
content: SETTINGS_CONFIG.structure.aromatic_display.description,
|
|
1054
|
+
})}
|
|
1183
1055
|
>
|
|
1184
1056
|
Aromatic display <select bind:value={scene_props.aromatic_display}>
|
|
1185
|
-
{#each Object.entries(
|
|
1186
|
-
SETTINGS_CONFIG.structure.aromatic_display.enum ?? {},
|
|
1187
|
-
) as
|
|
1188
|
-
[value, label]
|
|
1189
|
-
(value)
|
|
1190
|
-
}
|
|
1057
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.aromatic_display.enum ?? {}) as [value, label] (value)}
|
|
1191
1058
|
<option {value}>{label}</option>
|
|
1192
1059
|
{/each}
|
|
1193
1060
|
</select>
|
|
@@ -1196,23 +1063,129 @@
|
|
|
1196
1063
|
<label>
|
|
1197
1064
|
Color <input type="color" bind:value={scene_props.bond_color} />
|
|
1198
1065
|
</label>
|
|
1199
|
-
<
|
|
1066
|
+
<NumberRangeInput
|
|
1067
|
+
min={0.05}
|
|
1068
|
+
max={0.5}
|
|
1069
|
+
step={0.05}
|
|
1070
|
+
bind:value={scene_props.bond_thickness}
|
|
1071
|
+
>
|
|
1200
1072
|
Thickness
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1073
|
+
</NumberRangeInput>
|
|
1074
|
+
</SettingsSection>
|
|
1075
|
+
{/if}
|
|
1076
|
+
|
|
1077
|
+
{#if scene_props.show_polyhedra && scene_props.show_polyhedra !== `never`}
|
|
1078
|
+
<SettingsSection
|
|
1079
|
+
title="Polyhedra"
|
|
1080
|
+
current_values={{
|
|
1081
|
+
polyhedra_opacity: scene_props.polyhedra_opacity,
|
|
1082
|
+
polyhedra_show_edges: scene_props.polyhedra_show_edges,
|
|
1083
|
+
polyhedra_edge_color: scene_props.polyhedra_edge_color,
|
|
1084
|
+
polyhedra_color_mode: scene_props.polyhedra_color_mode,
|
|
1085
|
+
polyhedra_color: scene_props.polyhedra_color,
|
|
1086
|
+
polyhedra_hide_center_atoms: scene_props.polyhedra_hide_center_atoms,
|
|
1087
|
+
polyhedra_min_neighbors: scene_props.polyhedra_min_neighbors,
|
|
1088
|
+
polyhedra_max_neighbors: scene_props.polyhedra_max_neighbors,
|
|
1089
|
+
polyhedra_excluded_elements: scene_props.polyhedra_excluded_elements,
|
|
1090
|
+
polyhedra_included_elements: scene_props.polyhedra_included_elements,
|
|
1091
|
+
}}
|
|
1092
|
+
on_reset={() => {
|
|
1093
|
+
scene_props.polyhedra_opacity = DEFAULTS.structure.polyhedra_opacity
|
|
1094
|
+
scene_props.polyhedra_show_edges = DEFAULTS.structure.polyhedra_show_edges
|
|
1095
|
+
scene_props.polyhedra_edge_color = DEFAULTS.structure.polyhedra_edge_color
|
|
1096
|
+
scene_props.polyhedra_color_mode = DEFAULTS.structure.polyhedra_color_mode
|
|
1097
|
+
scene_props.polyhedra_color = DEFAULTS.structure.polyhedra_color
|
|
1098
|
+
scene_props.polyhedra_hide_center_atoms =
|
|
1099
|
+
DEFAULTS.structure.polyhedra_hide_center_atoms
|
|
1100
|
+
scene_props.polyhedra_min_neighbors = DEFAULTS.structure.polyhedra_min_neighbors
|
|
1101
|
+
scene_props.polyhedra_max_neighbors = DEFAULTS.structure.polyhedra_max_neighbors
|
|
1102
|
+
scene_props.polyhedra_excluded_elements =
|
|
1103
|
+
DEFAULTS.structure.polyhedra_excluded_elements
|
|
1104
|
+
scene_props.polyhedra_included_elements =
|
|
1105
|
+
DEFAULTS.structure.polyhedra_included_elements
|
|
1106
|
+
}}
|
|
1107
|
+
>
|
|
1108
|
+
<NumberRangeInput
|
|
1109
|
+
min={0}
|
|
1110
|
+
max={1}
|
|
1111
|
+
step={0.05}
|
|
1112
|
+
bind:value={scene_props.polyhedra_opacity}
|
|
1113
|
+
title={SETTINGS_CONFIG.structure.polyhedra_opacity.description}
|
|
1114
|
+
>Opacity</NumberRangeInput
|
|
1115
|
+
>
|
|
1116
|
+
<label
|
|
1117
|
+
{@attach tooltip({
|
|
1118
|
+
content: SETTINGS_CONFIG.structure.polyhedra_color_mode.description,
|
|
1119
|
+
})}
|
|
1120
|
+
>
|
|
1121
|
+
Color <select bind:value={scene_props.polyhedra_color_mode}>
|
|
1122
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.polyhedra_color_mode.enum ?? {}) as [value, label] (value)}
|
|
1123
|
+
<option {value}>{label}</option>
|
|
1124
|
+
{/each}
|
|
1125
|
+
</select>
|
|
1126
|
+
{#if scene_props.polyhedra_color_mode === `uniform`}
|
|
1127
|
+
<input type="color" bind:value={scene_props.polyhedra_color} />
|
|
1128
|
+
{/if}
|
|
1129
|
+
</label>
|
|
1130
|
+
<label
|
|
1131
|
+
style="gap: 6pt"
|
|
1132
|
+
{@attach tooltip({
|
|
1133
|
+
content: SETTINGS_CONFIG.structure.polyhedra_show_edges.description,
|
|
1134
|
+
})}
|
|
1135
|
+
>
|
|
1136
|
+
<input type="checkbox" bind:checked={scene_props.polyhedra_show_edges} />
|
|
1137
|
+
Edges
|
|
1138
|
+
{#if scene_props.polyhedra_show_edges}
|
|
1139
|
+
<input type="color" bind:value={scene_props.polyhedra_edge_color} />
|
|
1140
|
+
{/if}
|
|
1141
|
+
</label>
|
|
1142
|
+
<label
|
|
1143
|
+
style="gap: 6pt"
|
|
1144
|
+
{@attach tooltip({
|
|
1145
|
+
content: SETTINGS_CONFIG.structure.polyhedra_hide_center_atoms.description,
|
|
1146
|
+
})}
|
|
1147
|
+
>
|
|
1148
|
+
<input type="checkbox" bind:checked={scene_props.polyhedra_hide_center_atoms} />
|
|
1149
|
+
Hide center atoms
|
|
1215
1150
|
</label>
|
|
1151
|
+
<NumberRangeInput
|
|
1152
|
+
min={4}
|
|
1153
|
+
max={12}
|
|
1154
|
+
step={1}
|
|
1155
|
+
bind:value={scene_props.polyhedra_min_neighbors}
|
|
1156
|
+
title={SETTINGS_CONFIG.structure.polyhedra_min_neighbors.description}
|
|
1157
|
+
>Min neighbors</NumberRangeInput
|
|
1158
|
+
>
|
|
1159
|
+
<NumberRangeInput
|
|
1160
|
+
min={4}
|
|
1161
|
+
max={16}
|
|
1162
|
+
step={1}
|
|
1163
|
+
bind:value={scene_props.polyhedra_max_neighbors}
|
|
1164
|
+
title={SETTINGS_CONFIG.structure.polyhedra_max_neighbors.description}
|
|
1165
|
+
>Max neighbors</NumberRangeInput
|
|
1166
|
+
>
|
|
1167
|
+
{#if structure_elements.length > 0}
|
|
1168
|
+
<div
|
|
1169
|
+
style="display: flex; flex-wrap: wrap; gap: 8pt; align-items: center"
|
|
1170
|
+
{@attach tooltip({
|
|
1171
|
+
content: `${
|
|
1172
|
+
SETTINGS_CONFIG.structure.polyhedra_excluded_elements.description
|
|
1173
|
+
}. Force-including a spectator center (alkali or heavy alkaline-earth, e.g. Li, Na, Ba) may render its polyhedra truncated at cell boundaries.`,
|
|
1174
|
+
})}
|
|
1175
|
+
>
|
|
1176
|
+
Centers:
|
|
1177
|
+
{#each structure_elements as element (element)}
|
|
1178
|
+
<label style="gap: 4pt">
|
|
1179
|
+
<input
|
|
1180
|
+
type="checkbox"
|
|
1181
|
+
checked={is_polyhedra_center_enabled(element)}
|
|
1182
|
+
onchange={() => toggle_polyhedra_element(element)}
|
|
1183
|
+
/>
|
|
1184
|
+
{element}
|
|
1185
|
+
</label>
|
|
1186
|
+
{/each}
|
|
1187
|
+
</div>
|
|
1188
|
+
{/if}
|
|
1216
1189
|
</SettingsSection>
|
|
1217
1190
|
{/if}
|
|
1218
1191
|
</DraggablePane>
|