@mkbabb/glass-ui 4.0.1 → 4.2.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/dist/{CardAction-CW7a0m8M.js → CardAction-DlVP2evz.js} +72 -53
- package/dist/{CommandShortcut-DvZNQ_HF.js → CommandShortcut-By-VQcLO.js} +25 -14
- package/dist/{ConfiguratorRow-BR4l-ixA.js → ConfiguratorRow-YMXdINHx.js} +14 -14
- package/dist/ContextMenuContent-CMWn6huB.js +90 -0
- package/dist/{ContextMenuSubContent-xol4sD2q.js → ContextMenuSubContent-DvwWCUc0.js} +16 -16
- package/dist/{DataTable-CuKwF7wr.js → DataTable-C4tG3eIJ.js} +4 -4
- package/dist/DialogContent-D8U9ZfWS.js +121 -0
- package/dist/DialogFooter-DoLy0ewI.js +80 -0
- package/dist/DialogScrollContent-BMekN7gq.js +93 -0
- package/dist/{FadingScroll-DI6hQhT9.js → FadingScroll-P8B30rAD.js} +1 -1
- package/dist/HoverCardContent-DAmGYglo.js +88 -0
- package/dist/{HoverPopover-CbqbNwgU.js → HoverPopover-DYpBOzzF.js} +1 -1
- package/dist/{IconChip-BTD-nay5.js → IconChip-CQa7XZYc.js} +7 -5
- package/dist/{IconTooltip-Bl8gFZ8d.js → IconTooltip-_df8M3xm.js} +1 -1
- package/dist/Input-CyU4_hIC.js +57 -0
- package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
- package/dist/{Notification-VUwexFUf.js → Notification-BlSPJhtZ.js} +4 -4
- package/dist/NumberFieldContent-Z3VxGu_6.js +140 -0
- package/dist/PagerDots-CYlqVFd4.js +196 -0
- package/dist/PaperBackdrop-DYWgrnh8.js +42 -0
- package/dist/{PopoverContent-DL7E6vJP.js → PopoverContent-BuKyHZSz.js} +2 -2
- package/dist/{Progress-DctG61iZ.js → Progress-C9SsdwIZ.js} +1 -1
- package/dist/{ScrollingText-yOpBzFYq.js → ScrollingText-DY3W1Jfh.js} +2 -2
- package/dist/SelectScrollDownButton-3mFHX_R-.js +260 -0
- package/dist/{SelectSeparator-DXswVdRz.js → SelectSeparator-CNRGG7Ew.js} +1 -1
- package/dist/Separator-Cf9-JFgi.js +44 -0
- package/dist/Switch-uf-UKPA2.js +49 -0
- package/dist/{Toaster-Bw4xR8xV.js → Toaster-ozrsR4mP.js} +2 -2
- package/dist/{ToggleGroupItem-pEM9vIhs.js → ToggleGroupItem-BpzaVzNm.js} +6 -6
- package/dist/TooltipProvider-QQVM_80r.js +109 -0
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +16 -32
- package/dist/api/types-extra.d.ts +33 -0
- package/dist/api.js +2 -2
- package/dist/aurora.js +629 -269
- package/dist/badge-Bt14yURi.js +72 -0
- package/dist/badge.js +1 -1
- package/dist/border-progress.js +49 -57
- package/dist/button-D1W9PrzI.js +130 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -3
- package/dist/card.js +1 -1
- package/dist/carousel.js +235 -106
- package/dist/chipVariants-BJQ0I2kB.js +18 -0
- package/dist/collapsible.js +1 -1
- package/dist/color-B9jZdhJX.js +116 -0
- package/dist/color.js +2 -2
- package/dist/command.js +1 -1
- package/dist/completion-seal.d.ts +1 -0
- package/dist/completion-seal.js +89 -0
- package/dist/components/custom/aurora/Aurora.vue.d.ts +10 -5
- package/dist/components/custom/aurora/composables/color.d.ts +13 -0
- package/dist/components/custom/aurora/composables/frameLoop.d.ts +9 -0
- package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
- package/dist/components/custom/aurora/composables/runtime.d.ts +12 -0
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +12 -3
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +8 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +47 -0
- package/dist/components/custom/aurora/constants/renderMode.d.ts +16 -8
- package/dist/components/custom/aurora/constants/shaders/aurora-mediums.wgsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/border-progress/composables/spectrum-walk.d.ts +25 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +14 -18
- package/dist/components/custom/border-progress/index.d.ts +1 -1
- package/dist/components/custom/completion-seal/CompletionSeal.vue.d.ts +21 -0
- package/dist/components/custom/completion-seal/composables/useCompletionSeal.d.ts +37 -0
- package/dist/components/custom/completion-seal/constants.d.ts +46 -0
- package/dist/components/custom/completion-seal/index.d.ts +4 -0
- package/dist/components/custom/concentric/Concentric.vue.d.ts +15 -12
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +12 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -3
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
- package/dist/components/custom/concentric/constants.d.ts +69 -24
- package/dist/components/custom/concentric/index.d.ts +2 -2
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +2 -2
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -1
- package/dist/components/custom/configurator/Configurator.vue.d.ts +23 -2
- package/dist/components/custom/configurator/index.d.ts +1 -1
- package/dist/components/custom/confirm-dialog/ConfirmDialog.vue.d.ts +3 -3
- package/dist/components/custom/constellation/Constellation.vue.d.ts +5 -4
- package/dist/components/custom/constellation/composables/constellationGLSetup.d.ts +10 -0
- package/dist/components/custom/constellation/composables/constellationWGPUSetup.d.ts +19 -0
- package/dist/components/custom/constellation/composables/uniformBridgeWGPU.d.ts +66 -0
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +3 -10
- package/dist/components/custom/constellation/constants.d.ts +33 -0
- package/dist/components/custom/constellation/constellationField.d.ts +31 -1
- package/dist/components/custom/constellation/constellationInteraction.d.ts +23 -14
- package/dist/components/custom/constellation/constellationRender.d.ts +25 -0
- package/dist/components/custom/constellation/constellationTypes.d.ts +38 -0
- package/dist/components/custom/constellation/constellationWell.d.ts +15 -0
- package/dist/components/custom/constellation/index.d.ts +5 -5
- package/dist/components/custom/constellation/shaders/constellation-lines.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-lines.wgsl.d.ts +1 -0
- package/dist/components/custom/constellation/shaders/constellation-points.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-points.wgsl.d.ts +1 -0
- package/dist/components/custom/deck/DeckPager.vue.d.ts +29 -0
- package/dist/components/custom/deck/composables/useDeck.d.ts +27 -0
- package/dist/components/custom/deck/composables/useDeckKeyboard.d.ts +25 -0
- package/dist/components/custom/deck/composables/useDeckSpring.d.ts +22 -0
- package/dist/components/custom/deck/constants.d.ts +14 -0
- package/dist/components/custom/deck/index.d.ts +8 -0
- package/dist/components/custom/dock/DockDropdownTrigger.vue.d.ts +4 -3
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +22 -0
- package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
- package/dist/components/custom/dock/DockStack.vue.d.ts +78 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +21 -3
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +78 -67
- package/dist/components/custom/dock/composables/index.d.ts +3 -0
- package/dist/components/custom/dock/composables/railProjection.d.ts +45 -0
- package/dist/components/custom/dock/composables/useDockContextSilhouette.d.ts +192 -0
- package/dist/components/custom/dock/composables/useDockFission.d.ts +158 -0
- package/dist/components/custom/dock/composables/useDockItemDrag.d.ts +18 -0
- package/dist/components/custom/dock/composables/useDockSearch.d.ts +85 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +49 -0
- package/dist/components/custom/dock/constants.d.ts +32 -17
- package/dist/components/custom/dock/index.d.ts +8 -2
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +15 -11
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +69 -6
- package/dist/components/custom/dot-flow-field/composables/flowGLProgram.d.ts +8 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupGL.d.ts +9 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupGLFlow.d.ts +12 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupWGPU.d.ts +7 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +50 -9
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +6 -5
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +23 -9
- package/dist/components/custom/dot-flow-field/constants.d.ts +92 -20
- package/dist/components/custom/dot-flow-field/index.d.ts +2 -2
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -1
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +31 -18
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -1
- package/dist/components/custom/dot-matrix/DotMatrix.vue.d.ts +43 -0
- package/dist/components/custom/dot-matrix/composables/dotMatrixField.d.ts +89 -0
- package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +61 -0
- package/dist/components/custom/dot-matrix/composables/useDotMatrix.d.ts +34 -0
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +34 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +72 -0
- package/dist/components/custom/dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +4 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -0
- package/dist/components/custom/easing/EasingPicker.vue.d.ts +2 -2
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +5 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +11 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +44 -47
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +24 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +31 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +56 -0
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +61 -37
- package/dist/components/custom/fourier-field/constants.d.ts +114 -4
- package/dist/components/custom/fourier-field/index.d.ts +23 -18
- package/dist/components/custom/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +4 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +9 -1
- package/dist/components/custom/goo-blob/composables/easing.d.ts +1 -0
- package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +1 -0
- package/dist/components/custom/goo-blob/constants.d.ts +26 -1
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball-noise.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-palette.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/types.d.ts +86 -1
- package/dist/components/custom/goo-dot-matrix/GooDotMatrix.vue.d.ts +49 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotLattice.d.ts +24 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +79 -0
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +45 -0
- package/dist/components/custom/goo-dot-matrix/composables/useGooDotMatrix.d.ts +31 -0
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +115 -0
- package/dist/components/custom/goo-dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +13 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +4 -0
- package/dist/components/custom/goo-filter/GooFilter.vue.d.ts +22 -0
- package/dist/components/custom/goo-filter/index.d.ts +1 -0
- package/dist/components/custom/handmark/brush.d.ts +17 -17
- package/dist/components/custom/handmark/constants.d.ts +28 -8
- package/dist/components/custom/handmark/geometry.d.ts +34 -1
- package/dist/components/custom/handmark/index.d.ts +1 -1
- package/dist/components/custom/icon-chip/types.d.ts +10 -0
- package/dist/components/custom/labeled-field/LabeledField.vue.d.ts +21 -2
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +15 -0
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +9 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/pager-dots/pagerWindow.d.ts +9 -0
- package/dist/components/custom/paper-backdrop/PaperBackdrop.vue.d.ts +18 -0
- package/dist/components/custom/paper-grid/PaperGrid.vue.d.ts +42 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +105 -0
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +18 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +21 -0
- package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +16 -0
- package/dist/components/custom/paper-grid/composables/usePaperGrid.d.ts +31 -0
- package/dist/components/custom/paper-grid/constants.d.ts +95 -0
- package/dist/components/custom/paper-grid/index.d.ts +5 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +4 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -0
- package/dist/components/custom/search/FuzzySearch.vue.d.ts +8 -2
- package/dist/components/custom/search/SearchBar.vue.d.ts +8 -0
- package/dist/components/custom/search/index.d.ts +2 -0
- package/dist/components/custom/search/searchVariants.d.ts +19 -0
- package/dist/components/custom/selectable-chip/SelectableChip.vue.d.ts +50 -0
- package/dist/components/custom/selectable-chip/chipVariants.d.ts +39 -0
- package/dist/components/custom/selectable-chip/index.d.ts +2 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +15 -0
- package/dist/components/custom/split-chars/SplitChars.vue.d.ts +39 -0
- package/dist/components/custom/split-chars/index.d.ts +1 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +8 -6
- package/dist/components/custom/tabs/constants.d.ts +28 -2
- package/dist/components/custom/timeline/ScrubberTimeline.vue.d.ts +16 -0
- package/dist/components/custom/timeline/geometry.d.ts +0 -8
- package/dist/components/custom/toggle-chip/index.d.ts +15 -4
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +32 -17
- package/dist/components/custom/watercolor-dot/useWatercolorBlob.d.ts +10 -5
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/useControlSize.d.ts +46 -0
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +17 -3
- package/dist/components/ui/badge/Badge.vue.d.ts +14 -0
- package/dist/components/ui/badge/index.d.ts +1 -0
- package/dist/components/ui/button/Button.vue.d.ts +1 -0
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +46 -1
- package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
- package/dist/components/ui/command/CommandDialog.vue.d.ts +9 -3
- package/dist/components/ui/command/CommandList.vue.d.ts +3 -0
- package/dist/components/ui/context-menu/ContextMenuContent.vue.d.ts +5 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +9 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +33 -14
- package/dist/components/ui/drawer/constants.d.ts +8 -6
- package/dist/components/ui/drawer/index.d.ts +12 -2
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +4 -0
- package/dist/components/ui/hover-card/HoverCardContent.vue.d.ts +3 -0
- package/dist/components/ui/input/Input.vue.d.ts +3 -0
- package/dist/components/ui/number-field/NumberFieldInput.vue.d.ts +6 -1
- package/dist/components/ui/select/SelectContent.vue.d.ts +12 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +9 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +2 -0
- package/dist/components/ui/textarea/Textarea.vue.d.ts +3 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +3 -0
- package/dist/composables/color/index.d.ts +2 -0
- package/dist/composables/color/useAccentTone.d.ts +34 -0
- package/dist/composables/dom/index.d.ts +1 -0
- package/dist/composables/dom/useDragVelocity.d.ts +46 -0
- package/dist/composables/glass/useVizChoreography.d.ts +123 -0
- package/dist/composables/glass/wave/index.d.ts +4 -0
- package/dist/composables/glass/wave/waveField.d.ts +115 -0
- package/dist/composables/glass/wave/waveField.glsl.d.ts +1 -0
- package/dist/composables/glass/wave/waveField.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +105 -2
- package/dist/composables/glass/webgl/shaders/flow.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
- package/dist/composables/glass/webgpu/index.d.ts +2 -1
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +65 -7
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +50 -2
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
- package/dist/composables/motion/core/index.d.ts +7 -0
- package/dist/composables/motion/core/useHaptic.d.ts +48 -0
- package/dist/composables/motion/core/writeVelocityWeight.d.ts +31 -0
- package/dist/composables/motion/index.d.ts +2 -0
- package/dist/composables/motion/scrollReader.d.ts +25 -0
- package/dist/composables/motion/springPresets.d.ts +19 -1
- package/dist/composables/motion/suite.d.ts +2 -2
- package/dist/composables/motion/useBloomUp.d.ts +97 -0
- package/dist/composables/motion/useCelebrationBurst.d.ts +50 -0
- package/dist/composables/motion/useCharStagger.d.ts +44 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +29 -22
- package/dist/composables/motion/useGooMorph.d.ts +72 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +18 -0
- package/dist/composables/motion/useLiquidMorph.d.ts +108 -0
- package/dist/composables/motion/useLiquidPress.d.ts +12 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +7 -4
- package/dist/composables/motion/useMorphField.d.ts +157 -0
- package/dist/composables/motion/useScrollChrome.d.ts +58 -0
- package/dist/composables/motion/useScrollPin.d.ts +49 -0
- package/dist/composables/motion/useScrollScene.d.ts +67 -0
- package/dist/composables/motion/useScrollTrigger.d.ts +67 -0
- package/dist/composables/motion/useSpringPress.d.ts +5 -5
- package/dist/composables/motion/useStaggerReveal.d.ts +24 -0
- package/dist/composables/sidebar/index.d.ts +4 -1
- package/dist/composables/sidebar/types.d.ts +68 -3
- package/dist/composables/sidebar/useClickDelegate.d.ts +4 -0
- package/dist/composables/sidebar/useLazyLoader.d.ts +5 -0
- package/dist/composables/sidebar/useScrollTo.d.ts +5 -0
- package/dist/composables/virtual/index.d.ts +4 -0
- package/dist/composables/virtual/useVirtualSectionWindow.d.ts +72 -0
- package/dist/composables/virtual/useWindowedStore.d.ts +43 -0
- package/dist/composables/virtual/virtualSectionLayout.d.ts +103 -0
- package/dist/concentric.js +552 -309
- package/dist/configurator.js +2 -2
- package/dist/confirm-dialog.js +62 -47
- package/dist/constellation.js +635 -235
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +2 -2
- package/dist/createCanvasLifecycle-CuCrGRfq.js +173 -0
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck.d.ts +1 -0
- package/dist/deck.js +105 -0
- package/dist/dialog.js +4 -3
- package/dist/dock.js +1320 -631
- package/dist/dockContext-gFVS2gMg.js +18 -0
- package/dist/dom.js +7 -6
- package/dist/dot-flow-field.js +1268 -387
- package/dist/dot-matrix.d.ts +1 -0
- package/dist/dot-matrix.js +774 -0
- package/dist/dotMatrixField-CRO0ZFk4.js +48 -0
- package/dist/drawer.js +106 -96
- package/dist/{dropdown-menu-CofSZuk8.js → dropdown-menu-CCfcCQ68.js} +83 -79
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.js +188 -176
- package/dist/expandable-container.js +43 -21
- package/dist/fading-scroll.js +1 -1
- package/dist/flow.glsl-DqEGRpl4.js +4 -0
- package/dist/forms.js +64 -62
- package/dist/fourier-field.js +1069 -178
- package/dist/fourier-math.js +1 -1
- package/dist/glass-panel.js +2 -2
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +164 -119
- package/dist/goo-blob.js +175 -1230
- package/dist/goo-dot-matrix.d.ts +1 -0
- package/dist/goo-dot-matrix.js +811 -0
- package/dist/handmark.js +137 -94
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-chip.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +70 -60
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +12 -3
- package/dist/motion-core.js +59 -34
- package/dist/motion-curves.js +30 -14
- package/dist/motion.js +231 -96
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +2 -91
- package/dist/paper-backdrop.js +1 -1
- package/dist/paper-grid.d.ts +1 -0
- package/dist/paper-grid.js +761 -0
- package/dist/paperGrid-CXCSMbZ1.js +191 -0
- package/dist/popover.js +1 -1
- package/dist/{presets-BW2b-fr1.js → presets-QvYgnFIZ.js} +14 -13
- package/dist/{procedural-color.glsl-CIFsJhwI.js → procedural-color.wgsl-C1Y5PkM6.js} +2 -2
- package/dist/progress.js +1 -1
- package/dist/pulse.js +2 -2
- package/dist/reactive.js +2 -2
- package/dist/{useCanvas2D-B8w_E3Rr.js → resolveCanvasColor-DsSJk06I.js} +16 -6
- package/dist/scrollReader-rc3Ns_NM.js +42 -0
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +162 -306
- package/dist/select.js +3 -3
- package/dist/selectable-chip.d.ts +1 -0
- package/dist/selectable-chip.js +48 -0
- package/dist/separator.js +1 -1
- package/dist/{sheet-tZMg0E0w.js → sheet-DUCIoOe0.js} +4 -4
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +216 -114
- package/dist/slider-CcICPe3u.js +149 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spectrum-walk-cBNSx_zm.js +33 -0
- package/dist/springPresets-DfoQ6XRY.js +64 -0
- package/dist/stacked-icons.js +54 -39
- package/dist/styles/animations.css +13 -3
- package/dist/styles/cards.css +271 -2
- package/dist/styles/completion-seal.css +131 -0
- package/dist/styles/components.css +1 -4
- package/dist/styles/configurator.css +221 -1
- package/dist/styles/critical-partition.mjs +66 -11
- package/dist/styles/deferred.css +4 -0
- package/dist/styles/dock/adaptive-legibility.css +119 -0
- package/dist/styles/dock/cta-seat.css +87 -0
- package/dist/styles/dock/density.css +167 -6
- package/dist/styles/dock/fission-bridge.css +552 -0
- package/dist/styles/dock/layers.css +90 -78
- package/dist/styles/dock/morph-bridge.css +67 -18
- package/dist/styles/dock/morph.css +57 -118
- package/dist/styles/dock/overflow.css +12 -0
- package/dist/styles/dock/search.css +68 -0
- package/dist/styles/dock/shape.css +250 -0
- package/dist/styles/dock/shell.css +24 -8
- package/dist/styles/dock/stack-rail.css +352 -0
- package/dist/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/dist/styles/dock-controls/icon-button.css +46 -0
- package/dist/styles/dock-controls/triggers.css +23 -1
- package/dist/styles/dock-controls.css +18 -0
- package/dist/styles/dock.css +27 -2
- package/dist/styles/drawer.css +166 -0
- package/dist/styles/glass/accent-tone.css +66 -0
- package/dist/styles/glass/control-surfaces.css +167 -0
- package/dist/styles/glass/glass-atom.css +244 -0
- package/dist/styles/glass/glass-capsule.css +143 -0
- package/dist/styles/glass/glass-chip.css +215 -0
- package/dist/styles/glass/ladder.css +67 -17
- package/dist/styles/glass/liquid-enter.css +252 -0
- package/dist/styles/glass/liquid-morph.css +850 -0
- package/dist/styles/glass/material.css +70 -1
- package/dist/styles/glass/reveal.css +22 -2
- package/dist/styles/glass/rim.css +31 -9
- package/dist/styles/glass/surfaces.css +81 -150
- package/dist/styles/glass.css +21 -0
- package/dist/styles/icon-chip.css +45 -0
- package/dist/styles/index.css +26 -0
- package/dist/styles/jubilance.css +65 -0
- package/dist/styles/motion/morph-field.css +229 -0
- package/dist/styles/paper.css +230 -14
- package/dist/styles/scroll-choreography.css +135 -78
- package/dist/styles/scroll-chrome.css +123 -0
- package/dist/styles/scroll-driven.css +38 -0
- package/dist/styles/segmented-tabs.css +110 -40
- package/dist/styles/select.css +151 -0
- package/dist/styles/theme/bridges.css +22 -0
- package/dist/styles/theme/radius.css +18 -1
- package/dist/styles/tokens/color-radius.css +14 -4
- package/dist/styles/tokens/dark-arm.css +94 -12
- package/dist/styles/tokens/glass-deep.css +33 -4
- package/dist/styles/tokens/glass-fx.css +122 -1
- package/dist/styles/tokens/glass.css +226 -34
- package/dist/styles/tokens/light-dark.css +3 -3
- package/dist/styles/tokens/offsets.css +27 -0
- package/dist/styles/tokens/property-regs.css +277 -0
- package/dist/styles/tokens/scale-paper.css +86 -30
- package/dist/styles/tokens/scheme-motion.css +106 -133
- package/dist/styles/tokens/scheme-spring.css +239 -0
- package/dist/styles/tokens/scroll-tokens.css +15 -15
- package/dist/styles/tokens/shadow.css +73 -13
- package/dist/styles/tokens/sizing-config.css +110 -0
- package/dist/styles/tokens/sizing.css +55 -104
- package/dist/styles/tokens.css +14 -2
- package/dist/styles/typography/semantic.css +18 -5
- package/dist/styles/utilities/a11y-overrides.css +20 -5
- package/dist/styles/utilities/base-misc.css +52 -0
- package/dist/styles/utilities/btn.css +84 -3
- package/dist/styles/utilities/components.css +31 -6
- package/dist/styles/utilities/metal.css +26 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +199 -182
- package/dist/timeline.js +241 -206
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +14 -41
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +2 -2
- package/dist/uniformBridgeWGPU-BCse1SHU.js +1268 -0
- package/dist/{useAnimatedNumber-BfUq2bUM.js → useAnimatedNumber-BntskVdQ.js} +1 -1
- package/dist/{useConfiguratorState-DNlOh6c8.js → useConfiguratorState-22BcULzF.js} +41 -38
- package/dist/useControlSize-DAZ062x7.js +9 -0
- package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
- package/dist/{useDragMorph-DgxnsVJz.js → useDragMorph-DGLSewwB.js} +4 -4
- package/dist/useDragVelocity-CjcfX3dA.js +57 -0
- package/dist/useFuzzySearch-0fTYOhS4.js +177 -0
- package/dist/useGooMorph-Cs13NgYL.js +104 -0
- package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
- package/dist/useHaptic-CPz5BT9I.js +134 -0
- package/dist/{useLiquidFlex-mZPMiNXh.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
- package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
- package/dist/useMorphField-ogBM7ubT.js +141 -0
- package/dist/usePointerVelocityField-BrkqZFhj.js +91 -0
- package/dist/useScrollChrome-JuImi1DM.js +258 -0
- package/dist/{useSpringMount-q1amq1SJ.js → useSpringMount-DFxtzmkR.js} +1 -1
- package/dist/useSpringPress-VM9RgVq3.js +36 -0
- package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
- package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
- package/dist/{vendor-CKmzio-i.js → vendor-B2qOlYY3.js} +24 -11
- package/dist/virtual.d.ts +1 -0
- package/dist/virtual.js +225 -0
- package/dist/watercolor-dot.js +107 -74
- package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
- package/package.json +140 -9
- package/src/styles/animations.css +13 -3
- package/src/styles/cards.css +271 -2
- package/src/styles/completion-seal.css +131 -0
- package/src/styles/configurator.css +221 -1
- package/src/styles/critical-partition.mjs +66 -11
- package/src/styles/dock/adaptive-legibility.css +119 -0
- package/src/styles/dock/cta-seat.css +87 -0
- package/src/styles/dock/density.css +167 -6
- package/src/styles/dock/fission-bridge.css +552 -0
- package/src/styles/dock/layers.css +90 -78
- package/src/styles/dock/morph-bridge.css +67 -18
- package/src/styles/dock/morph.css +57 -118
- package/src/styles/dock/overflow.css +12 -0
- package/src/styles/dock/search.css +68 -0
- package/src/styles/dock/shape.css +250 -0
- package/src/styles/dock/shell.css +24 -8
- package/src/styles/dock/stack-rail.css +352 -0
- package/src/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/src/styles/dock-controls/icon-button.css +46 -0
- package/src/styles/dock-controls/triggers.css +23 -1
- package/src/styles/dock-controls.css +18 -0
- package/src/styles/dock.css +27 -2
- package/src/styles/drawer.css +164 -0
- package/src/styles/glass/accent-tone.css +66 -0
- package/src/styles/glass/control-surfaces.css +167 -0
- package/src/styles/glass/glass-atom.css +244 -0
- package/src/styles/glass/glass-capsule.css +143 -0
- package/src/styles/glass/glass-chip.css +215 -0
- package/src/styles/glass/ladder.css +67 -17
- package/src/styles/glass/liquid-enter.css +252 -0
- package/src/styles/glass/liquid-morph.css +850 -0
- package/src/styles/glass/material.css +70 -1
- package/src/styles/glass/reveal.css +22 -2
- package/src/styles/glass/rim.css +31 -9
- package/src/styles/glass/surfaces.css +81 -150
- package/src/styles/glass.css +21 -0
- package/src/styles/icon-chip.css +45 -0
- package/src/styles/index.css +26 -0
- package/src/styles/jubilance.css +65 -0
- package/src/styles/motion/morph-field.css +229 -0
- package/src/styles/paper.css +230 -14
- package/src/styles/scroll-choreography.css +135 -78
- package/src/styles/scroll-chrome.css +123 -0
- package/src/styles/scroll-driven.css +38 -0
- package/src/styles/segmented-tabs.css +110 -36
- package/src/styles/select.css +151 -0
- package/src/styles/theme/bridges.css +22 -0
- package/src/styles/theme/radius.css +18 -1
- package/src/styles/tokens/color-radius.css +14 -4
- package/src/styles/tokens/dark-arm.css +94 -12
- package/src/styles/tokens/glass-deep.css +33 -4
- package/src/styles/tokens/glass-fx.css +122 -1
- package/src/styles/tokens/glass.css +226 -34
- package/src/styles/tokens/light-dark.css +3 -3
- package/src/styles/tokens/offsets.css +27 -0
- package/src/styles/tokens/property-regs.css +277 -0
- package/src/styles/tokens/scale-paper.css +86 -30
- package/src/styles/tokens/scheme-motion.css +106 -133
- package/src/styles/tokens/scheme-spring.css +239 -0
- package/src/styles/tokens/scroll-tokens.css +15 -15
- package/src/styles/tokens/shadow.css +73 -13
- package/src/styles/tokens/sizing-config.css +110 -0
- package/src/styles/tokens/sizing.css +55 -104
- package/src/styles/tokens.css +14 -2
- package/src/styles/typography/semantic.css +18 -5
- package/src/styles/utilities/a11y-overrides.css +20 -5
- package/src/styles/utilities/base-misc.css +52 -0
- package/src/styles/utilities/btn.css +84 -3
- package/src/styles/utilities/components.css +31 -6
- package/src/styles/utilities/metal.css +26 -0
- package/dist/ContextMenuContent-uWnVxDab.js +0 -85
- package/dist/DialogContent-DcKK8k9i.js +0 -103
- package/dist/DialogFooter-BZNX5aVr.js +0 -165
- package/dist/HoverCardContent-b2uaAMRR.js +0 -83
- package/dist/Input-h9v5LeXf.js +0 -55
- package/dist/NumberFieldContent-Cq7EzX-U.js +0 -138
- package/dist/PaperBackdrop-Vf3tlpvd.js +0 -31
- package/dist/SelectScrollDownButton-CrA8F0iV.js +0 -252
- package/dist/Separator-pKF0oA4M.js +0 -37
- package/dist/Switch-CwYNf8bo.js +0 -47
- package/dist/TooltipProvider-rzvnXz60.js +0 -104
- package/dist/badge-D9XWW4GT.js +0 -53
- package/dist/button-DYCUa-tH.js +0 -126
- package/dist/color-DweYl7pE.js +0 -86
- package/dist/components/custom/concentric/composables/ringField.d.ts +0 -44
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +0 -35
- package/dist/components/custom/constellation/constellationDraw.d.ts +0 -30
- package/dist/components/custom/dock/DockRail.vue.d.ts +0 -89
- package/dist/createCanvasLifecycle-CHD5XrDW.js +0 -82
- package/dist/dockContext-BNfyPLe9.js +0 -17
- package/dist/procedural-color.wgsl-CToRHugY.js +0 -224
- package/dist/resolveCanvasColor-CUyHr5Uu.js +0 -11
- package/dist/slider-DVb4HXU-.js +0 -142
- package/dist/springPresets-CFQGQfdl.js +0 -40
- package/dist/styles/dock/rail-extend.css +0 -397
- package/dist/useLiquidPress-kfb4KX79.js +0 -39
- package/dist/usePointerVelocityField-JbRd5CrM.js +0 -137
- package/dist/useRAFLoop-UYa4zoiN.js +0 -109
- package/dist/useSpringPress-BsqPr7FJ.js +0 -34
- package/src/styles/dock/rail-extend.css +0 -397
- /package/dist/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
- /package/dist/{InstrumentChassis-Bx0F_q5g.js → InstrumentChassis-UUJX0-mW.js} +0 -0
- /package/dist/{Label-C2ejNWeC.js → Label-B_HPqi_q.js} +0 -0
- /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-DfAf7o15.js} +0 -0
- /package/dist/{SelectGroup-DwwjicPY.js → SelectGroup-Dcczq44n.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
- /package/dist/{compile-CQEFRTmx.js → compile-INR_tPk_.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants-BWj7DkMn.js} +0 -0
- /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
- /package/dist/{math-BINYmg5z.js → math-5RcIgCB4.js} +0 -0
- /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
- /package/dist/{prng-Za0Rmgag.js → prng-B5tIXTtj.js} +0 -0
- /package/dist/{useGlobalDark-C28t0VWJ.js → useGlobalDark-B4HO9LXG.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
- /package/dist/{useInterval-CvK1mL92.js → useInterval-BVUI-sez.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BEut54Tk.js} +0 -0
- /package/dist/{useResizeObserver-Bpoi7tRE.js → useResizeObserver-DdEn3v2f.js} +0 -0
- /package/dist/{useResolveTokenColor-vAylyR0x.js → useResolveTokenColor-ChOnCckA.js} +0 -0
- /package/dist/{useScrollProgress-D7bYU2RK.js → useScrollProgress-A0M6qRl7.js} +0 -0
- /package/dist/{useSortable-DHjtZSEd.js → useSortable-DQV_UNDw.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-Bma3UlKA.js} +0 -0
- /package/dist/{useTimer-BHJOKr35.js → useTimer-BBLGPXR8.js} +0 -0
- /package/dist/{useUserInvalidAria-y5namzeE.js → useUserInvalidAria-EmmwWPOl.js} +0 -0
- /package/dist/{useViewportReady-anbac3m6.js → useViewportReady-C9pYnn7K.js} +0 -0
- /package/dist/{vReveal-Czsb7zQC.js → vReveal-CT1KtwZA.js} +0 -0
- /package/dist/{vSpecular-CQFmLNzA.js → vSpecular-EX7loENl.js} +0 -0
package/dist/concentric.js
CHANGED
|
@@ -1,45 +1,53 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-gLzyemvl.js";
|
|
2
|
+
import { t } from "./usePointerVelocityField-BrkqZFhj.js";
|
|
3
|
+
import { n, o as r, r as i, s as a } from "./procedural-color.wgsl-C1Y5PkM6.js";
|
|
4
|
+
import { t as o } from "./flow.glsl-DqEGRpl4.js";
|
|
5
|
+
import { a as s, t as c } from "./useGpuSubstrate-Ceet70xq.js";
|
|
6
|
+
import { c as l } from "./color-B9jZdhJX.js";
|
|
7
|
+
import { t as u } from "./useGlobalDark-B4HO9LXG.js";
|
|
8
|
+
import { c as d, d as f, f as p, l as m, n as h, p as g, s as _, u as v } from "./paperGrid-CXCSMbZ1.js";
|
|
9
|
+
import { computed as y, createElementBlock as b, createElementVNode as x, defineComponent as S, normalizeStyle as C, onScopeDispose as w, openBlock as T, useTemplateRef as E, watch as D } from "vue";
|
|
6
10
|
//#region src/components/custom/concentric/shaders/concentric.wgsl.ts
|
|
7
|
-
var
|
|
11
|
+
var O = `
|
|
8
12
|
const PI: f32 = 3.141592653589793;
|
|
9
13
|
const TAU: f32 = 6.283185307179586;
|
|
10
|
-
const RING_GRAVITY: f32 = 9.81;
|
|
11
|
-
const MAX_RINGS: i32 = 8;
|
|
12
|
-
const MAX_CENTERS: i32 = 4;
|
|
13
14
|
const MAX_RING_STOPS: i32 = 4;
|
|
14
15
|
|
|
15
16
|
// ── Concentric uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
|
|
16
17
|
struct ConcentricUniforms {
|
|
17
|
-
// u0: (uTime, uSpeed,
|
|
18
|
+
// u0: (uTime, uSpeed, uCellSize, _pad)
|
|
18
19
|
u0: vec4<f32>,
|
|
19
|
-
// ints: (
|
|
20
|
+
// ints: (_pad, _pad, uStopCount, _pad)
|
|
20
21
|
ints: vec4<i32>,
|
|
21
22
|
// bg: (background.rgb (linear), hasBackground)
|
|
22
23
|
bg: vec4<f32>,
|
|
23
|
-
// norm: (uFieldNorm, uAspect,
|
|
24
|
+
// norm: (uFieldNorm, uAspect, lightDirX, lightDirY)
|
|
24
25
|
norm: vec4<f32>,
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
|
|
26
|
+
// line: (lineHalfWidth, aaSoftness, contourLevels, indexEvery)
|
|
27
|
+
line: vec4<f32>,
|
|
28
|
+
// wave: (waveDirX, waveDirY, waveK, waveOmega)
|
|
29
|
+
wave: vec4<f32>,
|
|
30
|
+
// wave2: (waveSigma, twistMax, shearMax, amp)
|
|
31
|
+
wave2: vec4<f32>,
|
|
32
|
+
// topo: (heightOctaves, heightSeed, swellAmp, perturbAmp)
|
|
33
|
+
topo: vec4<f32>,
|
|
34
|
+
// cursor: (cursorX, cursorY, cursorWell, interactive)
|
|
35
|
+
cursor: vec4<f32>,
|
|
36
|
+
// tune: (toneGain, shadeAmp, indexMul, inkDarken)
|
|
37
|
+
tune: vec4<f32>,
|
|
29
38
|
// each palette stop: linear-sRGB rgb + _pad
|
|
30
39
|
palette: array<vec4<f32>, 4>,
|
|
31
40
|
};
|
|
32
41
|
|
|
33
42
|
@group(0) @binding(0) var<uniform> u: ConcentricUniforms;
|
|
34
43
|
|
|
44
|
+
${n}
|
|
35
45
|
${i}
|
|
36
|
-
${a}
|
|
37
46
|
|
|
38
|
-
// Full-screen-triangle (the pilot idiom)
|
|
39
|
-
// viewport from a single 3-vertex draw — no vertex buffer.
|
|
47
|
+
// Full-screen-triangle (the pilot idiom).
|
|
40
48
|
struct VSOut {
|
|
41
49
|
@builtin(position) pos: vec4<f32>,
|
|
42
|
-
@location(0) uv: vec2<f32>,
|
|
50
|
+
@location(0) uv: vec2<f32>,
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
@vertex
|
|
@@ -50,46 +58,88 @@ fn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {
|
|
|
50
58
|
let c = corners[vi];
|
|
51
59
|
var out: VSOut;
|
|
52
60
|
out.pos = vec4<f32>(c, 0.0, 1.0);
|
|
53
|
-
// aspect-correct so the rings stay circular under the ellipsoidal norm (NOT squashed
|
|
54
|
-
// by the canvas aspect): widen the domain x by the aspect ratio.
|
|
55
61
|
out.uv = vec2<f32>(c.x, c.y);
|
|
56
62
|
return out;
|
|
57
63
|
}
|
|
58
64
|
|
|
59
|
-
// The
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
// ── The host noise basis (the SAME quintic-faded value-noise the suite speaks) ──
|
|
66
|
+
fn hash21(x: f32, y: f32) -> f32 {
|
|
67
|
+
var px = fract(x * 0.1031);
|
|
68
|
+
var py = fract(y * 0.1031);
|
|
69
|
+
var pz = fract(x * 0.1031);
|
|
70
|
+
let d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
|
|
71
|
+
px = px + d; py = py + d; pz = pz + d;
|
|
72
|
+
return fract((px + py) * pz);
|
|
73
|
+
}
|
|
74
|
+
fn valueNoise(x: f32, y: f32) -> f32 {
|
|
75
|
+
let ix = floor(x); let iy = floor(y);
|
|
76
|
+
let fx = x - ix; let fy = y - iy;
|
|
77
|
+
let ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
|
|
78
|
+
let uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
|
|
79
|
+
let a = hash21(ix, iy);
|
|
80
|
+
let b = hash21(ix + 1.0, iy);
|
|
81
|
+
let c = hash21(ix, iy + 1.0);
|
|
82
|
+
let d2 = hash21(ix + 1.0, iy + 1.0);
|
|
83
|
+
return mix(mix(a, b, ux), mix(c, d2, ux), uy);
|
|
84
|
+
}
|
|
85
|
+
// The single-octave potential the curl operator wraps + the height field samples.
|
|
86
|
+
fn potentialFBM(p: vec2f) -> f32 {
|
|
87
|
+
var v = 0.0; var amp = 0.5; var freq = 1.0;
|
|
88
|
+
var px = p.x; var py = p.y;
|
|
89
|
+
for (var i = 0; i < 3; i = i + 1) {
|
|
90
|
+
v = v + amp * valueNoise(px * freq, py * freq);
|
|
91
|
+
let rx = 0.8 * px - 0.6 * py;
|
|
92
|
+
let ry = 0.6 * px + 0.8 * py;
|
|
93
|
+
px = rx; py = ry; freq = freq * 2.0; amp = amp * 0.5;
|
|
94
|
+
}
|
|
95
|
+
return v;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// The shared curl + wave chunks (splice AFTER valueNoise + potentialFBM are declared).
|
|
99
|
+
${g}
|
|
100
|
+
${p}
|
|
101
|
+
|
|
102
|
+
fn smoothstepEdge(e0: f32, e1: f32, x: f32) -> f32 {
|
|
103
|
+
let t = clamp((x - e0) / max(e1 - e0, 1e-6), 0.0, 1.0);
|
|
104
|
+
return t * t * (3.0 - 2.0 * t);
|
|
65
105
|
}
|
|
66
106
|
|
|
67
|
-
// The
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
for (var j = 0; j < MAX_CENTERS; j = j + 1) {
|
|
77
|
-
if (j >= centerCount) { break; }
|
|
78
|
-
let cj = u.centers[j];
|
|
79
|
-
let radius = ellipsoidalRadius(p, cj.xy, axisA, axisB);
|
|
80
|
-
var centerSum = 0.0;
|
|
81
|
-
for (var i = 0; i < MAX_RINGS; i = i + 1) {
|
|
82
|
-
if (i >= ringCount) { break; }
|
|
83
|
-
let r = u.rings[i];
|
|
84
|
-
let k = TAU / max(r.y, 1e-4);
|
|
85
|
-
// ω = √(g·k); speed scales the travel (the shared dispersion law).
|
|
86
|
-
let omega = sqrt(RING_GRAVITY * k) * speed;
|
|
87
|
-
let theta = k * radius - omega * t + r.z;
|
|
88
|
-
centerSum = centerSum + r.x * sin(theta);
|
|
89
|
-
}
|
|
90
|
-
acc = acc + centerSum * cj.z;
|
|
107
|
+
// The level-set height at domain p (transcribes levelField.ts sampleHeight). The sampling
|
|
108
|
+
// coordinate is cell-twisted (the SAME wave that twists paper-grid cells — kinship); the
|
|
109
|
+
// height is a low-octave topography + the swell + the cursor peak.
|
|
110
|
+
fn sampleHeight(p: vec2f, t: f32) -> f32 {
|
|
111
|
+
// The CONTINUOUS traveling-wave flow warp (no per-cell seam — the contours flow + twist as
|
|
112
|
+
// the wave passes OVER and THROUGH them, the SAME wave that twists the paper-grid cells).
|
|
113
|
+
var g = waveFlow(p, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.y, u.wave2.w);
|
|
114
|
+
if (u.cursor.w > 0.5) {
|
|
115
|
+
g = cursorSwirl(g, u.cursor.xy, u.cursor.z * 0.6, u.u0.z * 2.5);
|
|
91
116
|
}
|
|
92
|
-
|
|
117
|
+
// Sample the topography at a LOW base frequency so the basins are BROAD nested loops (a
|
|
118
|
+
// readable contour map — not a fine speckle). heightOctaves carries the fractal detail.
|
|
119
|
+
var H = heightField(g * 0.9, u.topo.x, u.topo.y);
|
|
120
|
+
H = H + u.topo.z * waveSwell(t, u.topo.y);
|
|
121
|
+
if (u.cursor.w > 0.5) {
|
|
122
|
+
let d = p - u.cursor.xy;
|
|
123
|
+
let d2 = dot(d, d);
|
|
124
|
+
// The cursor HEAVE — a SOFT bulge (a Gaussian peak feathered by a smoothstep falloff so
|
|
125
|
+
// the heave is C1-smooth, NOT the hard-edged quad the old dark render showed). The well
|
|
126
|
+
// depth/radius already carry the velocity-HEAVE scale (packed JS-side into u.cursor.z).
|
|
127
|
+
let g0 = exp(-d2 / 0.22);
|
|
128
|
+
let fall = smoothstepEdge(0.0, 0.55, exp(-d2 / 0.6));
|
|
129
|
+
H = H + u.cursor.z * g0 * fall;
|
|
130
|
+
}
|
|
131
|
+
return H;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// The IQ gradient-free level-set contour ink — KEPT BYTE-FROZEN (the perfect GPU AA). It is
|
|
135
|
+
// FED the per-level half-width 'hw' (a parameter, NOT a re-derivation): de_contour =
|
|
136
|
+
// |fract(fN + 0.5) − 0.5| / fwidth(fN). The contour density tracks 1/|∇H| automatically.
|
|
137
|
+
// 'aaW' floors against a DPR-aware minimum so the index line stays CONTINUOUS where the heave
|
|
138
|
+
// packs contours (steep |∇H| saturates fwidth — challenge R4).
|
|
139
|
+
fn contourInk(fN: f32, hw: f32) -> f32 {
|
|
140
|
+
let band = abs(fract(fN + 0.5) - 0.5);
|
|
141
|
+
let aaW = max(fwidth(fN), 6e-4);
|
|
142
|
+
return 1.0 - smoothstepEdge(hw, hw + u.line.y, band / aaW);
|
|
93
143
|
}
|
|
94
144
|
|
|
95
145
|
// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
|
|
@@ -106,172 +156,199 @@ fn samplePaletteLin(t: f32) -> vec3<f32> {
|
|
|
106
156
|
return oklabToLinearSrgb(mix(labA, labB, f));
|
|
107
157
|
}
|
|
108
158
|
|
|
159
|
+
// The SHARED hillshade finite-diff epsilon — pinned ONCE (mirrors levelField.HILLSHADE_EPSILON
|
|
160
|
+
// + the GLSL twin; a per-backend drift would red the L6 numeric parity).
|
|
161
|
+
const HILLSHADE_E: f32 = 0.012;
|
|
162
|
+
|
|
109
163
|
@fragment
|
|
110
164
|
fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
|
|
111
|
-
// aspect-correct the domain x so the rings read circular under the ellipsoidal norm.
|
|
112
165
|
let aspect = max(u.norm.y, 1e-4);
|
|
113
166
|
let p = vec2<f32>(in.uv.x * aspect, in.uv.y);
|
|
114
|
-
let t = u.u0.x;
|
|
167
|
+
let t = u.u0.x * u.u0.y;
|
|
168
|
+
let levels = max(u.line.z, 1.0);
|
|
115
169
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
let v = clamp(0.5 + raw * u.norm.x, 0.0, 1.0);
|
|
170
|
+
// The level-set topography (the KEPT field — the PRIMARY path).
|
|
171
|
+
let H = sampleHeight(p, t);
|
|
119
172
|
|
|
120
|
-
|
|
121
|
-
|
|
173
|
+
// ── 1. HYPSOMETRIC TONE — tanh expands the compressed band so basins+ridges hit the ramp
|
|
174
|
+
// ENDS (the live lumVar-flat cause). samplePaletteLin is the KEPT OKLab operator.
|
|
175
|
+
let tone = 0.5 + 0.5 * tanh(H * u.tune.x);
|
|
176
|
+
var fill = samplePaletteLin(tone);
|
|
122
177
|
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return s;
|
|
178
|
+
// ── 2. ANALYTIC HILLSHADE — one ∇H finite-diff at the SHARED e, dotted with the fixed cel
|
|
179
|
+
// light → 2.5-D relief. A read-only re-sample of sampleHeight (no second field).
|
|
180
|
+
let e = HILLSHADE_E;
|
|
181
|
+
let hx = sampleHeight(p + vec2<f32>(e, 0.0), t) - sampleHeight(p - vec2<f32>(e, 0.0), t);
|
|
182
|
+
let hy = sampleHeight(p + vec2<f32>(0.0, e), t) - sampleHeight(p - vec2<f32>(0.0, e), t);
|
|
183
|
+
let grad = vec2<f32>(hx, hy) / (2.0 * e);
|
|
184
|
+
let L = normalize(u.norm.zw + vec2<f32>(1e-5, 1e-5));
|
|
185
|
+
let shade = 0.5 + 0.5 * clamp(dot(normalize(grad + vec2<f32>(1e-5)), L), -1.0, 1.0);
|
|
186
|
+
fill = fill * mix(1.0 - u.tune.y, 1.0 + u.tune.y, shade);
|
|
187
|
+
|
|
188
|
+
// ── 3. TWO-TIER INDEX/MINOR CONTOUR — isIndex a pure f(level) (floor + mod + select, NOT a
|
|
189
|
+
// state buffer); the per-level half-width hw is FED to the byte-frozen contourInk.
|
|
190
|
+
let fN = H * levels + u.topo.w * sin(floor(H * levels) * 2.4 + t * 0.7);
|
|
191
|
+
let indexEvery = max(u.line.w, 1.0);
|
|
192
|
+
let lvl = floor(fN);
|
|
193
|
+
let isIndex = select(0.0, 1.0, fract(lvl / indexEvery) < (0.5 / indexEvery));
|
|
194
|
+
let hw = mix(u.line.x, u.line.x * u.tune.z, isIndex);
|
|
195
|
+
let ink = clamp(contourInk(fN, hw), 0.0, 1.0);
|
|
196
|
+
|
|
197
|
+
// ── 4. INK = a darker ember of the LOCAL fill (the edge-of-its-own-band signature).
|
|
198
|
+
let inkCol = mix(fill, fill * u.tune.w, 0.85);
|
|
199
|
+
|
|
200
|
+
// ── 5. ONE color path + OPAQUE OUT — the viz IS the colorful field, never lines-over-nothing.
|
|
201
|
+
// Per-mode is resolved in the CONSUMED stops + the bg token (no in-shader uMode branch).
|
|
202
|
+
let col = mix(fill, inkCol, ink);
|
|
203
|
+
return vec4<f32>(clamp(linearToSrgb(col), vec3<f32>(0.0), vec3<f32>(1.0)), 1.0);
|
|
150
204
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
205
|
+
`, k = 4, A = [
|
|
206
|
+
{
|
|
207
|
+
L: .5,
|
|
208
|
+
C: .115,
|
|
209
|
+
h: 350
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
L: .66,
|
|
213
|
+
C: .14,
|
|
214
|
+
h: 38
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
L: .8,
|
|
218
|
+
C: .115,
|
|
219
|
+
h: 70
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
L: .92,
|
|
223
|
+
C: .06,
|
|
224
|
+
h: 86
|
|
160
225
|
}
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/components/custom/concentric/constants.ts
|
|
165
|
-
var C = 8, w = 4, T = 4, E = [
|
|
226
|
+
], j = [
|
|
166
227
|
{
|
|
167
|
-
L: .
|
|
168
|
-
C: .
|
|
169
|
-
h:
|
|
228
|
+
L: .26,
|
|
229
|
+
C: .09,
|
|
230
|
+
h: 30
|
|
170
231
|
},
|
|
171
232
|
{
|
|
172
|
-
L: .
|
|
173
|
-
C: .
|
|
174
|
-
h:
|
|
233
|
+
L: .45,
|
|
234
|
+
C: .15,
|
|
235
|
+
h: 42
|
|
175
236
|
},
|
|
176
237
|
{
|
|
177
238
|
L: .66,
|
|
178
|
-
C: .
|
|
179
|
-
h:
|
|
239
|
+
C: .155,
|
|
240
|
+
h: 66
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
L: .84,
|
|
244
|
+
C: .13,
|
|
245
|
+
h: 84
|
|
180
246
|
}
|
|
181
|
-
],
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}, {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
247
|
+
], M = {
|
|
248
|
+
L: .96,
|
|
249
|
+
C: .018,
|
|
250
|
+
h: 78
|
|
251
|
+
}, N = {
|
|
252
|
+
L: .16,
|
|
253
|
+
C: .035,
|
|
254
|
+
h: 32
|
|
255
|
+
}, P = {
|
|
256
|
+
speed: .6,
|
|
257
|
+
lineWidth: 1.8,
|
|
258
|
+
lineSoftness: 1,
|
|
259
|
+
contourLevels: 13,
|
|
260
|
+
cellSize: 1.2,
|
|
261
|
+
heightOctaves: 3,
|
|
262
|
+
heightSeed: 7,
|
|
263
|
+
swellAmp: .22,
|
|
264
|
+
perturbAmp: .06,
|
|
265
|
+
twistMax: .6,
|
|
266
|
+
shearMax: .24,
|
|
267
|
+
waveDir: [.92, .39],
|
|
268
|
+
waveK: .42,
|
|
269
|
+
waveOmega: .7,
|
|
270
|
+
waveSigma: .85,
|
|
271
|
+
cursorWell: .5,
|
|
272
|
+
toneGain: 1.6,
|
|
273
|
+
shadeAmp: .18,
|
|
274
|
+
lightDir: [-.6, .8],
|
|
275
|
+
indexEvery: 5,
|
|
276
|
+
indexMul: 1.9,
|
|
277
|
+
inkDarken: .45,
|
|
278
|
+
velocityHeave: .4,
|
|
279
|
+
palette: A,
|
|
280
|
+
background: M,
|
|
281
|
+
interactive: !0,
|
|
197
282
|
respectReducedMotion: !0
|
|
198
|
-
},
|
|
283
|
+
}, F = 224, I = {
|
|
199
284
|
u0: 0,
|
|
200
285
|
ints: 4,
|
|
201
286
|
bg: 8,
|
|
202
287
|
norm: 12,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
288
|
+
line: 16,
|
|
289
|
+
wave: 20,
|
|
290
|
+
wave2: 24,
|
|
291
|
+
topo: 28,
|
|
292
|
+
cursor: 32,
|
|
293
|
+
tune: 36,
|
|
294
|
+
palette: 40
|
|
295
|
+
}, L = .55;
|
|
296
|
+
function R() {
|
|
297
|
+
let e = new ArrayBuffer(F);
|
|
209
298
|
return {
|
|
210
299
|
buffer: e,
|
|
211
300
|
f32: new Float32Array(e),
|
|
212
301
|
i32: new Int32Array(e)
|
|
213
302
|
};
|
|
214
303
|
}
|
|
215
|
-
function
|
|
216
|
-
let { f32:
|
|
217
|
-
|
|
218
|
-
let
|
|
219
|
-
if (
|
|
304
|
+
function z(e, t, n, r, i, a, o, s) {
|
|
305
|
+
let { f32: c, i32: u } = e;
|
|
306
|
+
c[I.u0 + 0] = n, c[I.u0 + 1] = t.speed, c[I.u0 + 2] = t.cellSize, c[I.u0 + 3] = 0;
|
|
307
|
+
let d = Math.min(i.length, 4);
|
|
308
|
+
if (u[I.ints + 0] = 0, u[I.ints + 1] = 0, u[I.ints + 2] = d, u[I.ints + 3] = 0, t.background === "transparent") c[I.bg + 0] = 0, c[I.bg + 1] = 0, c[I.bg + 2] = 0, c[I.bg + 3] = 0;
|
|
220
309
|
else {
|
|
221
|
-
let e =
|
|
222
|
-
|
|
310
|
+
let e = l(t.background);
|
|
311
|
+
c[I.bg + 0] = e[0], c[I.bg + 1] = e[1], c[I.bg + 2] = e[2], c[I.bg + 3] = 1;
|
|
223
312
|
}
|
|
224
|
-
|
|
313
|
+
c[I.norm + 0] = L, c[I.norm + 1] = r, c[I.norm + 2] = t.lightDir[0], c[I.norm + 3] = t.lightDir[1], c[I.line + 0] = t.lineWidth, c[I.line + 1] = t.lineSoftness, c[I.line + 2] = t.contourLevels, c[I.line + 3] = t.indexEvery, c[I.wave + 0] = t.waveDir[0], c[I.wave + 1] = t.waveDir[1], c[I.wave + 2] = t.waveK, c[I.wave + 3] = t.waveOmega, c[I.wave2 + 0] = t.waveSigma, c[I.wave2 + 1] = t.twistMax, c[I.wave2 + 2] = t.shearMax, c[I.wave2 + 3] = o, c[I.topo + 0] = t.heightOctaves, c[I.topo + 1] = t.heightSeed, c[I.topo + 2] = t.swellAmp, c[I.topo + 3] = t.perturbAmp, c[I.cursor + 0] = a.x, c[I.cursor + 1] = a.y, c[I.cursor + 2] = t.cursorWell * s, c[I.cursor + 3] = +!!t.interactive, c[I.tune + 0] = t.toneGain, c[I.tune + 1] = t.shadeAmp, c[I.tune + 2] = t.indexMul, c[I.tune + 3] = t.inkDarken;
|
|
225
314
|
for (let e = 0; e < 4; e++) {
|
|
226
|
-
let t =
|
|
227
|
-
|
|
315
|
+
let t = I.palette + e * 4, n = l(i[Math.min(e, d - 1)] ?? i[0]);
|
|
316
|
+
c[t + 0] = n[0], c[t + 1] = n[1], c[t + 2] = n[2], c[t + 3] = 0;
|
|
228
317
|
}
|
|
229
318
|
return e;
|
|
230
319
|
}
|
|
231
|
-
function F(e, t, n) {
|
|
232
|
-
for (let r = 0; r < 8; r++) {
|
|
233
|
-
let i = t + r * 4, a = n[r];
|
|
234
|
-
a ? (e[i + 0] = a.amplitude, e[i + 1] = a.wavelength, e[i + 2] = a.phase, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 1, e[i + 2] = 0, e[i + 3] = 0);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
function I(e, t, n) {
|
|
238
|
-
for (let r = 0; r < 4; r++) {
|
|
239
|
-
let i = t + r * 4, a = n[r];
|
|
240
|
-
a ? (e[i + 0] = a.x, e[i + 1] = a.y, e[i + 2] = a.weight, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 0, e[i + 2] = 0, e[i + 3] = 0);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
320
|
//#endregion
|
|
244
321
|
//#region src/components/custom/concentric/composables/concentricWGPUSetup.ts
|
|
245
|
-
var
|
|
246
|
-
function
|
|
247
|
-
let { canvas: t, config: n, getPalette: r,
|
|
248
|
-
return function(e,
|
|
249
|
-
let
|
|
322
|
+
var B = 64, V = 8, H = 2;
|
|
323
|
+
function U(e) {
|
|
324
|
+
let { canvas: t, config: n, getPalette: r, getCursor: i, getAmp: a, getWellScale: o, shouldContinue: c, onFrame: l } = e;
|
|
325
|
+
return function(e, u, d) {
|
|
326
|
+
let f = e.createShaderModule({
|
|
250
327
|
label: "[Concentric] concentric.wgsl",
|
|
251
|
-
code:
|
|
252
|
-
}),
|
|
328
|
+
code: O
|
|
329
|
+
}), p = R(), m = e.createBuffer({
|
|
253
330
|
label: "[Concentric] uniforms",
|
|
254
|
-
size:
|
|
255
|
-
usage:
|
|
256
|
-
}),
|
|
331
|
+
size: p.buffer.byteLength,
|
|
332
|
+
usage: B | V
|
|
333
|
+
}), h = e.createBindGroupLayout({
|
|
257
334
|
label: "[Concentric] bgl",
|
|
258
335
|
entries: [{
|
|
259
336
|
binding: 0,
|
|
260
|
-
visibility:
|
|
337
|
+
visibility: H,
|
|
261
338
|
buffer: { type: "uniform" }
|
|
262
339
|
}]
|
|
263
|
-
}),
|
|
340
|
+
}), g = e.createRenderPipeline({
|
|
264
341
|
label: "[Concentric] pipeline",
|
|
265
|
-
layout: e.createPipelineLayout({ bindGroupLayouts: [
|
|
342
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [h] }),
|
|
266
343
|
vertex: {
|
|
267
|
-
module:
|
|
344
|
+
module: f,
|
|
268
345
|
entryPoint: "vs_main"
|
|
269
346
|
},
|
|
270
347
|
fragment: {
|
|
271
|
-
module:
|
|
348
|
+
module: f,
|
|
272
349
|
entryPoint: "fs_main",
|
|
273
350
|
targets: [{
|
|
274
|
-
format:
|
|
351
|
+
format: d,
|
|
275
352
|
blend: {
|
|
276
353
|
color: {
|
|
277
354
|
srcFactor: "one",
|
|
@@ -287,22 +364,22 @@ function B(e) {
|
|
|
287
364
|
}]
|
|
288
365
|
},
|
|
289
366
|
primitive: { topology: "triangle-list" }
|
|
290
|
-
}),
|
|
367
|
+
}), _ = e.createBindGroup({
|
|
291
368
|
label: "[Concentric] bg",
|
|
292
|
-
layout:
|
|
369
|
+
layout: h,
|
|
293
370
|
entries: [{
|
|
294
371
|
binding: 0,
|
|
295
|
-
resource: { buffer:
|
|
372
|
+
resource: { buffer: m }
|
|
296
373
|
}]
|
|
297
374
|
});
|
|
298
|
-
function
|
|
299
|
-
let e =
|
|
375
|
+
function v() {
|
|
376
|
+
let e = s(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
|
|
300
377
|
(t.width !== i || t.height !== a) && (t.width = i, t.height = a);
|
|
301
378
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
304
|
-
let
|
|
305
|
-
view:
|
|
379
|
+
function y(s) {
|
|
380
|
+
l?.(s), z(p, n, s, (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), r(), i(), a(), o()), e.queue.writeBuffer(m, 0, p.buffer);
|
|
381
|
+
let c = e.createCommandEncoder({ label: "[Concentric] frame" }), d = u.getCurrentTexture().createView(), f = c.beginRenderPass({ colorAttachments: [{
|
|
382
|
+
view: d,
|
|
306
383
|
clearValue: {
|
|
307
384
|
r: 0,
|
|
308
385
|
g: 0,
|
|
@@ -312,28 +389,25 @@ function B(e) {
|
|
|
312
389
|
loadOp: "clear",
|
|
313
390
|
storeOp: "store"
|
|
314
391
|
}] });
|
|
315
|
-
|
|
392
|
+
f.setPipeline(g), f.setBindGroup(0, _), f.draw(3, 1, 0, 0), f.end(), e.queue.submit([c.finish()]);
|
|
316
393
|
}
|
|
317
394
|
return {
|
|
318
|
-
frame:
|
|
319
|
-
shouldContinue:
|
|
320
|
-
resize:
|
|
395
|
+
frame: y,
|
|
396
|
+
shouldContinue: c,
|
|
397
|
+
resize: v,
|
|
321
398
|
teardown: () => {
|
|
322
|
-
|
|
399
|
+
m.destroy();
|
|
323
400
|
}
|
|
324
401
|
};
|
|
325
402
|
};
|
|
326
403
|
}
|
|
327
404
|
//#endregion
|
|
328
405
|
//#region src/components/custom/concentric/shaders/concentric.glsl.ts
|
|
329
|
-
var
|
|
406
|
+
var W = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", G = `#version 300 es
|
|
330
407
|
precision highp float;
|
|
331
408
|
|
|
332
409
|
#define PI 3.141592653589793
|
|
333
410
|
#define TAU 6.283185307179586
|
|
334
|
-
#define RING_GRAVITY 9.81
|
|
335
|
-
#define MAX_RINGS 8
|
|
336
|
-
#define MAX_CENTERS 4
|
|
337
411
|
#define MAX_RING_STOPS 4
|
|
338
412
|
|
|
339
413
|
in vec2 vUv;
|
|
@@ -341,49 +415,101 @@ out vec4 fragColor;
|
|
|
341
415
|
|
|
342
416
|
uniform float uTime;
|
|
343
417
|
uniform float uSpeed;
|
|
344
|
-
uniform
|
|
345
|
-
uniform float uFieldNorm; //
|
|
418
|
+
uniform float uCellSize; // the topography cell pitch (the contour-warp granularity)
|
|
419
|
+
uniform float uFieldNorm; // height → [0,1] tone scale
|
|
346
420
|
uniform float uAspect;
|
|
347
|
-
uniform int uCenterCount;
|
|
348
|
-
uniform int uRingCount;
|
|
349
421
|
uniform int uStopCount;
|
|
350
422
|
uniform float uHasBackground;
|
|
351
|
-
uniform
|
|
352
|
-
uniform
|
|
423
|
+
uniform vec4 uLine; // (lineHalfWidth, aaSoftness, contourLevels, indexEvery)
|
|
424
|
+
uniform vec2 uLightDir; // the fixed cel-light direction (folded norm.zw)
|
|
425
|
+
uniform vec3 uBg; // themed background (linear-sRGB)
|
|
426
|
+
uniform vec4 uWave; // (waveDirX, waveDirY, waveK, waveOmega)
|
|
427
|
+
uniform vec4 uWave2; // (waveSigma, twistMax, shearMax, amp)
|
|
428
|
+
uniform vec4 uTopo; // (heightOctaves, heightSeed, swellAmp, perturbAmp)
|
|
429
|
+
uniform vec4 uCursor; // (cursorX, cursorY, cursorWell, interactive)
|
|
430
|
+
uniform vec4 uTune; // (toneGain, shadeAmp, indexMul, inkDarken)
|
|
353
431
|
uniform vec3 uPalette[MAX_RING_STOPS]; // linear-sRGB stops
|
|
354
432
|
|
|
355
|
-
${
|
|
356
|
-
${
|
|
433
|
+
${r}
|
|
434
|
+
${a}
|
|
435
|
+
|
|
436
|
+
// The shared curl operator (flow.glsl.ts — forward-declares potentialFBM).
|
|
437
|
+
${o}
|
|
357
438
|
|
|
358
|
-
//
|
|
359
|
-
float
|
|
360
|
-
float
|
|
361
|
-
float
|
|
362
|
-
|
|
439
|
+
// ── The host noise basis (the SAME quintic-faded value-noise the suite speaks) ──
|
|
440
|
+
float hash21(float x, float y) {
|
|
441
|
+
float px = fract(x * 0.1031);
|
|
442
|
+
float py = fract(y * 0.1031);
|
|
443
|
+
float pz = fract(x * 0.1031);
|
|
444
|
+
float d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
|
|
445
|
+
px += d; py += d; pz += d;
|
|
446
|
+
return fract((px + py) * pz);
|
|
447
|
+
}
|
|
448
|
+
float valueNoise(float x, float y) {
|
|
449
|
+
float ix = floor(x); float iy = floor(y);
|
|
450
|
+
float fx = x - ix; float fy = y - iy;
|
|
451
|
+
float ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
|
|
452
|
+
float uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
|
|
453
|
+
float a = hash21(ix, iy);
|
|
454
|
+
float b = hash21(ix + 1.0, iy);
|
|
455
|
+
float c = hash21(ix, iy + 1.0);
|
|
456
|
+
float d2 = hash21(ix + 1.0, iy + 1.0);
|
|
457
|
+
return mix(mix(a, b, ux), mix(c, d2, ux), uy);
|
|
458
|
+
}
|
|
459
|
+
// The curl chunk's forward-declared potentialFBM body.
|
|
460
|
+
float potentialFBM(vec2 p) {
|
|
461
|
+
float v = 0.0; float amp = 0.5; float freq = 1.0;
|
|
462
|
+
float px = p.x; float py = p.y;
|
|
463
|
+
for (int i = 0; i < 3; i++) {
|
|
464
|
+
v += amp * valueNoise(px * freq, py * freq);
|
|
465
|
+
float rx = 0.8 * px - 0.6 * py;
|
|
466
|
+
float ry = 0.6 * px + 0.8 * py;
|
|
467
|
+
px = rx; py = ry; freq *= 2.0; amp *= 0.5;
|
|
468
|
+
}
|
|
469
|
+
return v;
|
|
363
470
|
}
|
|
364
471
|
|
|
365
|
-
//
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
472
|
+
// The shared traveling-wave CELL-WARP chunk (spliced AFTER valueNoise + potentialFBM + curl).
|
|
473
|
+
${f}
|
|
474
|
+
|
|
475
|
+
float smoothstepEdge(float e0, float e1, float x) {
|
|
476
|
+
float t = clamp((x - e0) / max(e1 - e0, 1e-6), 0.0, 1.0);
|
|
477
|
+
return t * t * (3.0 - 2.0 * t);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// The level-set height at domain p (transcribes levelField.ts sampleHeight).
|
|
481
|
+
float sampleHeight(vec2 p, float t) {
|
|
482
|
+
// The CONTINUOUS traveling-wave flow warp (no per-cell seam — the contours flow + twist as
|
|
483
|
+
// the wave passes OVER and THROUGH them, the SAME wave that twists the paper-grid cells).
|
|
484
|
+
vec2 g = waveFlow(p, t, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.y, uWave2.w);
|
|
485
|
+
if (uCursor.w > 0.5) {
|
|
486
|
+
g = cursorSwirl(g, uCursor.xy, uCursor.z * 0.6, uCellSize * 2.5);
|
|
487
|
+
}
|
|
488
|
+
// LOW base frequency → BROAD nested loops (a readable contour map). Octaves carry detail.
|
|
489
|
+
float H = heightField(g * 0.9, uTopo.x, uTopo.y);
|
|
490
|
+
H += uTopo.z * waveSwell(t, uTopo.y);
|
|
491
|
+
if (uCursor.w > 0.5) {
|
|
492
|
+
vec2 d = p - uCursor.xy;
|
|
493
|
+
float d2 = dot(d, d);
|
|
494
|
+
// The cursor HEAVE — a SOFT bulge (a Gaussian peak feathered by a smoothstep falloff so
|
|
495
|
+
// the heave is C1-smooth, NOT a hard-edged quad). The well depth/radius carry the
|
|
496
|
+
// velocity-HEAVE scale (packed JS-side into uCursor.z).
|
|
497
|
+
float g0 = exp(-d2 / 0.22);
|
|
498
|
+
float fall = smoothstepEdge(0.0, 0.55, exp(-d2 / 0.6));
|
|
499
|
+
H += uCursor.z * g0 * fall;
|
|
382
500
|
}
|
|
383
|
-
return
|
|
501
|
+
return H;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// The IQ gradient-free level-set contour ink — KEPT BYTE-FROZEN (the perfect GPU AA). It is
|
|
505
|
+
// FED the per-level half-width 'hw' (a parameter, NOT a re-derivation). 'aaW' floors against a
|
|
506
|
+
// DPR-aware minimum so the index line stays CONTINUOUS where the heave packs contours.
|
|
507
|
+
float contourInk(float fN, float hw) {
|
|
508
|
+
float band = abs(fract(fN + 0.5) - 0.5);
|
|
509
|
+
float aaW = max(fwidth(fN), 6e-4);
|
|
510
|
+
return 1.0 - smoothstepEdge(hw, hw + uLine.y, band / aaW);
|
|
384
511
|
}
|
|
385
512
|
|
|
386
|
-
// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
|
|
387
513
|
vec3 samplePaletteLin(float t) {
|
|
388
514
|
if (uStopCount <= 1) return uPalette[0];
|
|
389
515
|
float n = float(uStopCount);
|
|
@@ -391,7 +517,6 @@ vec3 samplePaletteLin(float t) {
|
|
|
391
517
|
int i0 = int(floor(ft));
|
|
392
518
|
int i1 = min(i0 + 1, uStopCount - 1);
|
|
393
519
|
float f = ft - float(i0);
|
|
394
|
-
// cube-root LMS (the GLSL chunk inlines cbrt as sign(x)·pow(|x|,1/3) — no cbrt3 fn).
|
|
395
520
|
vec3 lmsA = LINEAR_SRGB_TO_LMS * uPalette[i0];
|
|
396
521
|
vec3 lmsB = LINEAR_SRGB_TO_LMS * uPalette[i1];
|
|
397
522
|
vec3 labA = LMS_TO_OKLAB * (sign(lmsA) * pow(abs(lmsA), vec3(1.0 / 3.0)));
|
|
@@ -399,23 +524,50 @@ vec3 samplePaletteLin(float t) {
|
|
|
399
524
|
return oklabToLinearSrgb(mix(labA, labB, f));
|
|
400
525
|
}
|
|
401
526
|
|
|
527
|
+
// The SHARED hillshade finite-diff epsilon — pinned ONCE (mirrors levelField.HILLSHADE_EPSILON
|
|
528
|
+
// + the WGSL twin; a per-backend drift would red the L6 numeric parity).
|
|
529
|
+
const float HILLSHADE_E = 0.012;
|
|
530
|
+
|
|
402
531
|
void main() {
|
|
403
532
|
float aspect = max(uAspect, 1e-4);
|
|
404
533
|
vec2 p = vec2(vUv.x * aspect, vUv.y);
|
|
405
|
-
float
|
|
406
|
-
float
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
534
|
+
float t = uTime * uSpeed;
|
|
535
|
+
float levels = max(uLine.z, 1.0);
|
|
536
|
+
|
|
537
|
+
// The level-set topography (the KEPT field — the PRIMARY path).
|
|
538
|
+
float H = sampleHeight(p, t);
|
|
539
|
+
|
|
540
|
+
// ── 1. HYPSOMETRIC TONE — tanh expands the compressed band (basins+ridges hit the ramp ENDS).
|
|
541
|
+
float tone = 0.5 + 0.5 * tanh(H * uTune.x);
|
|
542
|
+
vec3 fill = samplePaletteLin(tone);
|
|
543
|
+
|
|
544
|
+
// ── 2. ANALYTIC HILLSHADE — one ∇H finite-diff at the SHARED e, dotted with the cel light.
|
|
545
|
+
float e = HILLSHADE_E;
|
|
546
|
+
float hx = sampleHeight(p + vec2(e, 0.0), t) - sampleHeight(p - vec2(e, 0.0), t);
|
|
547
|
+
float hy = sampleHeight(p + vec2(0.0, e), t) - sampleHeight(p - vec2(0.0, e), t);
|
|
548
|
+
vec2 grad = vec2(hx, hy) / (2.0 * e);
|
|
549
|
+
vec2 L = normalize(uLightDir + vec2(1e-5));
|
|
550
|
+
float shade = 0.5 + 0.5 * clamp(dot(normalize(grad + vec2(1e-5)), L), -1.0, 1.0);
|
|
551
|
+
fill *= mix(1.0 - uTune.y, 1.0 + uTune.y, shade);
|
|
552
|
+
|
|
553
|
+
// ── 3. TWO-TIER INDEX/MINOR CONTOUR — isIndex a pure f(level); hw FED to the frozen contourInk.
|
|
554
|
+
float fN = H * levels + uTopo.w * sin(floor(H * levels) * 2.4 + t * 0.7);
|
|
555
|
+
float indexEvery = max(uLine.w, 1.0);
|
|
556
|
+
float lvl = floor(fN);
|
|
557
|
+
float isIndex = fract(lvl / indexEvery) < (0.5 / indexEvery) ? 1.0 : 0.0;
|
|
558
|
+
float hw = mix(uLine.x, uLine.x * uTune.z, isIndex);
|
|
559
|
+
float ink = clamp(contourInk(fN, hw), 0.0, 1.0);
|
|
560
|
+
|
|
561
|
+
// ── 4. INK = a darker ember of the LOCAL fill (the edge-of-its-own-band signature).
|
|
562
|
+
vec3 inkCol = mix(fill, fill * uTune.w, 0.85);
|
|
563
|
+
|
|
564
|
+
// ── 5. ONE color path + OPAQUE OUT — the viz IS the colorful field.
|
|
565
|
+
vec3 col = mix(fill, inkCol, ink);
|
|
566
|
+
fragColor = vec4(clamp(linearToSrgb(col), vec3(0.0), vec3(1.0)), 1.0);
|
|
415
567
|
}`;
|
|
416
568
|
//#endregion
|
|
417
569
|
//#region src/components/custom/concentric/composables/concentricGLSetup.ts
|
|
418
|
-
function
|
|
570
|
+
function K(e, t, n) {
|
|
419
571
|
let r = e.createShader(t);
|
|
420
572
|
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
421
573
|
let t = e.getShaderInfoLog(r);
|
|
@@ -423,16 +575,16 @@ function U(e, t, n) {
|
|
|
423
575
|
}
|
|
424
576
|
return r;
|
|
425
577
|
}
|
|
426
|
-
function
|
|
427
|
-
let { canvas: t, config: n, getPalette: r,
|
|
578
|
+
function q(e) {
|
|
579
|
+
let { canvas: t, config: n, getPalette: r, getCursor: i, getAmp: a, getWellScale: o, shouldContinue: c, onFrame: u } = e;
|
|
428
580
|
return function(e) {
|
|
429
|
-
let
|
|
430
|
-
if (e.attachShader(
|
|
431
|
-
e.deleteShader(
|
|
432
|
-
let
|
|
433
|
-
e.bindVertexArray(
|
|
434
|
-
let
|
|
435
|
-
e.bindBuffer(e.ARRAY_BUFFER,
|
|
581
|
+
let d = K(e, e.VERTEX_SHADER, W), f = K(e, e.FRAGMENT_SHADER, G), p = e.createProgram();
|
|
582
|
+
if (e.attachShader(p, d), e.attachShader(p, f), e.linkProgram(p), !e.getProgramParameter(p, e.LINK_STATUS)) throw Error(`[Concentric] link failed: ${e.getProgramInfoLog(p)}`);
|
|
583
|
+
e.deleteShader(d), e.deleteShader(f);
|
|
584
|
+
let m = e.createVertexArray();
|
|
585
|
+
e.bindVertexArray(m);
|
|
586
|
+
let h = e.createBuffer();
|
|
587
|
+
e.bindBuffer(e.ARRAY_BUFFER, h), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
436
588
|
-1,
|
|
437
589
|
-1,
|
|
438
590
|
3,
|
|
@@ -440,91 +592,131 @@ function W(e) {
|
|
|
440
592
|
-1,
|
|
441
593
|
3
|
|
442
594
|
]), e.STATIC_DRAW);
|
|
443
|
-
let
|
|
444
|
-
e.enableVertexAttribArray(
|
|
445
|
-
let
|
|
446
|
-
function
|
|
447
|
-
let n =
|
|
448
|
-
(t.width !== a || t.height !==
|
|
595
|
+
let g = e.getAttribLocation(p, "aPosition");
|
|
596
|
+
e.enableVertexAttribArray(g), e.vertexAttribPointer(g, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
|
|
597
|
+
let _ = (t) => e.getUniformLocation(p, t), v = _("uTime"), y = _("uSpeed"), b = _("uCellSize"), x = _("uFieldNorm"), S = _("uAspect"), C = _("uStopCount"), w = _("uHasBackground"), T = _("uLine"), E = _("uLightDir"), D = _("uBg"), O = _("uWave"), k = _("uWave2"), A = _("uTopo"), j = _("uCursor"), M = _("uTune"), N = _("uPalette[0]");
|
|
598
|
+
function P() {
|
|
599
|
+
let n = s(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), o = Math.max(1, Math.round(i * n));
|
|
600
|
+
(t.width !== a || t.height !== o) && (t.width = a, t.height = o), e.viewport(0, 0, t.width, t.height);
|
|
449
601
|
}
|
|
450
|
-
function
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
602
|
+
function F(s) {
|
|
603
|
+
u?.(s);
|
|
604
|
+
let c = t.clientWidth || 320, d = t.clientHeight || 320, f = c / Math.max(d, 1);
|
|
605
|
+
e.useProgram(p), e.bindVertexArray(m), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.uniform1f(v, s), e.uniform1f(y, n.speed), e.uniform1f(b, n.cellSize), e.uniform1f(x, L), e.uniform1f(S, f);
|
|
606
|
+
let h = r(), g = Math.min(h.length, 4);
|
|
607
|
+
e.uniform1i(C, g), e.uniform4f(T, n.lineWidth, n.lineSoftness, n.contourLevels, n.indexEvery), e.uniform2f(E, n.lightDir[0], n.lightDir[1]), e.uniform4f(O, n.waveDir[0], n.waveDir[1], n.waveK, n.waveOmega), e.uniform4f(k, n.waveSigma, n.twistMax, n.shearMax, a()), e.uniform4f(A, n.heightOctaves, n.heightSeed, n.swellAmp, n.perturbAmp);
|
|
608
|
+
let _ = i();
|
|
609
|
+
if (e.uniform4f(j, _.x, _.y, n.cursorWell * o(), +!!n.interactive), e.uniform4f(M, n.toneGain, n.shadeAmp, n.indexMul, n.inkDarken), n.background === "transparent") e.uniform1f(w, 0), e.uniform3f(D, 0, 0, 0);
|
|
610
|
+
else {
|
|
611
|
+
e.uniform1f(w, 1);
|
|
612
|
+
let t = l(n.background);
|
|
613
|
+
e.uniform3f(D, t[0], t[1], t[2]);
|
|
459
614
|
}
|
|
460
|
-
|
|
461
|
-
let O = new Float32Array(12);
|
|
615
|
+
let P = new Float32Array(12);
|
|
462
616
|
for (let e = 0; e < 4; e++) {
|
|
463
|
-
let t =
|
|
464
|
-
|
|
617
|
+
let t = l(h[Math.min(e, g - 1)] ?? h[0]);
|
|
618
|
+
P[e * 3 + 0] = t[0], P[e * 3 + 1] = t[1], P[e * 3 + 2] = t[2];
|
|
465
619
|
}
|
|
466
|
-
e.uniform3fv(
|
|
467
|
-
let k = new Float32Array(12);
|
|
468
|
-
for (let e = 0; e < 4; e++) {
|
|
469
|
-
let t = s(p[Math.min(e, E - 1)] ?? p[0]);
|
|
470
|
-
k[e * 3 + 0] = t[0], k[e * 3 + 1] = t[1], k[e * 3 + 2] = t[2];
|
|
471
|
-
}
|
|
472
|
-
e.uniform3fv(T, k), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
|
|
620
|
+
e.uniform3fv(N, P), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
|
|
473
621
|
}
|
|
474
622
|
return {
|
|
475
|
-
frame:
|
|
476
|
-
shouldContinue:
|
|
477
|
-
resize:
|
|
623
|
+
frame: F,
|
|
624
|
+
shouldContinue: c,
|
|
625
|
+
resize: P,
|
|
478
626
|
teardown: () => {
|
|
479
|
-
e.deleteProgram(
|
|
627
|
+
e.deleteProgram(p), e.deleteVertexArray(m), e.deleteBuffer(h);
|
|
480
628
|
}
|
|
481
629
|
};
|
|
482
630
|
};
|
|
483
631
|
}
|
|
484
632
|
//#endregion
|
|
485
633
|
//#region src/components/custom/concentric/composables/useConcentric.ts
|
|
486
|
-
function
|
|
487
|
-
let { config:
|
|
634
|
+
function J(e, n) {
|
|
635
|
+
let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), s = {
|
|
636
|
+
x: 1e6,
|
|
637
|
+
y: 1e6
|
|
638
|
+
}, l = () => s, u = 0, d = () => u, f = 1, p = () => f, m = 0, h = () => {
|
|
639
|
+
o.onPointerEnter(), r.interactive && x?.wake();
|
|
640
|
+
}, g = (e) => {
|
|
641
|
+
o.onPointerMove(e), r.interactive && x?.wake();
|
|
642
|
+
}, _ = (e) => e.parentElement ?? e;
|
|
643
|
+
function v(e) {
|
|
644
|
+
let t = _(e);
|
|
645
|
+
t.addEventListener("pointermove", g), t.addEventListener("pointerenter", h), t.addEventListener("pointerleave", o.onPointerLeave);
|
|
646
|
+
}
|
|
647
|
+
function y(e) {
|
|
648
|
+
let t = _(e);
|
|
649
|
+
t.removeEventListener("pointermove", g), t.removeEventListener("pointerenter", h), t.removeEventListener("pointerleave", o.onPointerLeave);
|
|
650
|
+
}
|
|
651
|
+
function b(t) {
|
|
652
|
+
let n = m > 0 ? (t - m) * 1e3 : 16.7;
|
|
653
|
+
if (m = t, o.tick(n), x?.reducedMotion ? (u = 0, f = 1) : (u += (1.06 - u) * .04, u > 1 && (u = 1 + (u - 1) * .85)), !r.interactive || !o.active.value) {
|
|
654
|
+
s = {
|
|
655
|
+
x: 1e6,
|
|
656
|
+
y: 1e6
|
|
657
|
+
}, f = 1;
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
let i = o.smoothedPosition.value, a = o.velocity.value, c = o.acceleration.value, l = .1, d = .04, p = e.value, h = (p?.clientWidth || 320) / Math.max(p?.clientHeight || 320, 1);
|
|
661
|
+
s = {
|
|
662
|
+
x: (i.x * 2 - 1 + a.x * l + c.x * d) * h,
|
|
663
|
+
y: -(i.y * 2 - 1) - a.y * l - c.y * d
|
|
664
|
+
};
|
|
665
|
+
let g = Math.hypot(a.x, a.y), _ = Math.min(g / 1.2, 1), v = _ * _ * (3 - 2 * _), y = o.burst.value;
|
|
666
|
+
f = 1 + r.velocityHeave * v + r.velocityHeave * .6 * y;
|
|
667
|
+
}
|
|
668
|
+
let x = null, S = () => {
|
|
488
669
|
let t = e.value;
|
|
489
|
-
return t ? (
|
|
670
|
+
return t ? (x || (v(t), x = c(t, {
|
|
490
671
|
mode: a,
|
|
491
|
-
respectReducedMotion:
|
|
492
|
-
setupWGPU:
|
|
672
|
+
respectReducedMotion: r.respectReducedMotion,
|
|
673
|
+
setupWGPU: U({
|
|
493
674
|
canvas: t,
|
|
494
|
-
config:
|
|
675
|
+
config: r,
|
|
495
676
|
getPalette: i,
|
|
496
|
-
|
|
677
|
+
getCursor: l,
|
|
678
|
+
getAmp: d,
|
|
679
|
+
getWellScale: p,
|
|
680
|
+
shouldContinue: () => !0,
|
|
681
|
+
onFrame: b
|
|
497
682
|
}),
|
|
498
|
-
setupGL:
|
|
683
|
+
setupGL: q({
|
|
499
684
|
canvas: t,
|
|
500
|
-
config:
|
|
685
|
+
config: r,
|
|
501
686
|
getPalette: i,
|
|
502
|
-
|
|
687
|
+
getCursor: l,
|
|
688
|
+
getAmp: d,
|
|
689
|
+
getWellScale: p,
|
|
690
|
+
shouldContinue: () => !0,
|
|
691
|
+
onFrame: b
|
|
503
692
|
})
|
|
504
|
-
}),
|
|
693
|
+
}), x.armAsync()), x) : null;
|
|
505
694
|
};
|
|
506
|
-
queueMicrotask(() =>
|
|
507
|
-
let
|
|
695
|
+
queueMicrotask(() => S());
|
|
696
|
+
let C = {
|
|
508
697
|
get backend() {
|
|
509
|
-
return
|
|
698
|
+
return S()?.backend ?? "webgpu";
|
|
510
699
|
},
|
|
511
|
-
pause: () =>
|
|
512
|
-
resume: () =>
|
|
513
|
-
wake: () =>
|
|
514
|
-
renderAt: (e) =>
|
|
700
|
+
pause: () => S()?.suspend("manual"),
|
|
701
|
+
resume: () => S()?.resume("manual"),
|
|
702
|
+
wake: () => S()?.wake(),
|
|
703
|
+
renderAt: (e) => S()?.renderAt(e),
|
|
515
704
|
get reducedMotion() {
|
|
516
|
-
return
|
|
705
|
+
return x?.reducedMotion ?? !1;
|
|
517
706
|
},
|
|
518
|
-
dispose: () =>
|
|
707
|
+
dispose: () => {
|
|
708
|
+
let t = e.value;
|
|
709
|
+
t && y(t), o.dispose(), x?.dispose();
|
|
710
|
+
}
|
|
519
711
|
};
|
|
520
|
-
return
|
|
712
|
+
return w(() => C.dispose()), C;
|
|
521
713
|
}
|
|
522
714
|
//#endregion
|
|
523
715
|
//#region src/components/custom/concentric/Concentric.vue
|
|
524
|
-
var
|
|
716
|
+
var Y = /* @__PURE__ */ e(/* @__PURE__ */ S({
|
|
525
717
|
__name: "Concentric",
|
|
526
718
|
props: {
|
|
527
|
-
config: { default: () =>
|
|
719
|
+
config: { default: () => P },
|
|
528
720
|
paused: {
|
|
529
721
|
type: Boolean,
|
|
530
722
|
default: !1
|
|
@@ -532,24 +724,24 @@ var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
|
|
|
532
724
|
},
|
|
533
725
|
emits: ["update:paused"],
|
|
534
726
|
setup(e, { expose: t }) {
|
|
535
|
-
let n =
|
|
727
|
+
let n = E("canvasRef"), { isDark: r } = u(), i = y(() => e.config.palette === A), a = () => i.value && r.value ? j : e.config.palette, o = y(() => i.value ? r.value ? N : M : e.config.background), s = J(n, {
|
|
536
728
|
config: e.config,
|
|
537
|
-
getPalette:
|
|
729
|
+
getPalette: a
|
|
538
730
|
});
|
|
539
|
-
|
|
540
|
-
let
|
|
541
|
-
let
|
|
542
|
-
if (
|
|
731
|
+
D(() => e.paused, (e) => e ? s.pause() : s.resume(), { immediate: !0 });
|
|
732
|
+
let c = y(() => {
|
|
733
|
+
let e = o.value;
|
|
734
|
+
if (e !== "transparent") return `oklch(${e.L} ${e.C} ${e.h})`;
|
|
543
735
|
});
|
|
544
736
|
return t({
|
|
545
|
-
pause:
|
|
546
|
-
resume:
|
|
547
|
-
wake:
|
|
548
|
-
renderAt:
|
|
549
|
-
}), (e, t) => (
|
|
737
|
+
pause: s.pause,
|
|
738
|
+
resume: s.resume,
|
|
739
|
+
wake: s.wake,
|
|
740
|
+
renderAt: s.renderAt
|
|
741
|
+
}), (e, t) => (T(), b("div", {
|
|
550
742
|
class: "concentric-wrapper",
|
|
551
|
-
style:
|
|
552
|
-
}, [
|
|
743
|
+
style: C(c.value ? { background: c.value } : void 0)
|
|
744
|
+
}, [x("canvas", {
|
|
553
745
|
ref_key: "canvasRef",
|
|
554
746
|
ref: n,
|
|
555
747
|
class: "concentric-canvas",
|
|
@@ -557,6 +749,57 @@ var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
|
|
|
557
749
|
"data-testid": "concentric-canvas"
|
|
558
750
|
}, null, 512)], 4));
|
|
559
751
|
}
|
|
560
|
-
}), [["__scopeId", "data-v-
|
|
752
|
+
}), [["__scopeId", "data-v-18ed696c"]]);
|
|
753
|
+
//#endregion
|
|
754
|
+
//#region src/components/custom/concentric/composables/levelField.ts
|
|
755
|
+
function X(e, t) {
|
|
756
|
+
let n = e * .1031 % 1, r = t * .1031 % 1, i = e * .1031 % 1;
|
|
757
|
+
n < 0 && (n += 1), r < 0 && (r += 1), i < 0 && (i += 1);
|
|
758
|
+
let a = n * (r + 33.33) + r * (i + 33.33) + i * (n + 33.33);
|
|
759
|
+
n += a, r += a, i += a;
|
|
760
|
+
let o = (n + r) * i % 1;
|
|
761
|
+
return o < 0 && (o += 1), o;
|
|
762
|
+
}
|
|
763
|
+
function Z(e, t) {
|
|
764
|
+
let n = Math.floor(e), r = Math.floor(t), i = e - n, a = t - r, o = i * i * i * (i * (i * 6 - 15) + 10), s = a * a * a * (a * (a * 6 - 15) + 10), c = X(n, r), l = X(n + 1, r), u = X(n, r + 1), d = X(n + 1, r + 1), f = (e, t, n) => e + (t - e) * n;
|
|
765
|
+
return f(f(c, l, o), f(u, d, o), s);
|
|
766
|
+
}
|
|
767
|
+
function Q(e, t, n) {
|
|
768
|
+
let r = m(h, e, t, n.waveDir, n.waveK, n.waveOmega, n.waveSigma, n.twistMax, n.amp);
|
|
769
|
+
n.interactive > .5 && (r = _(r, n.cursor, n.cursorWell * .6, n.cellSize * 2.5));
|
|
770
|
+
let i = d(Z, {
|
|
771
|
+
x: r.x * .9,
|
|
772
|
+
y: r.y * .9
|
|
773
|
+
}, n.heightOctaves, n.heightSeed);
|
|
774
|
+
if (i += n.swellAmp * v(t, n.heightSeed), n.interactive > .5) {
|
|
775
|
+
let t = e.x - n.cursor.x, r = e.y - n.cursor.y, a = t * t + r * r;
|
|
776
|
+
i += n.cursorWell * Math.exp(-a / .22);
|
|
777
|
+
}
|
|
778
|
+
return i;
|
|
779
|
+
}
|
|
780
|
+
var $ = .012;
|
|
781
|
+
function ee(e, t) {
|
|
782
|
+
return .5 + .5 * Math.tanh(e * t);
|
|
783
|
+
}
|
|
784
|
+
function te(e, t, n, r) {
|
|
785
|
+
let i = $, a = Q({
|
|
786
|
+
x: e.x + i,
|
|
787
|
+
y: e.y
|
|
788
|
+
}, t, n) - Q({
|
|
789
|
+
x: e.x - i,
|
|
790
|
+
y: e.y
|
|
791
|
+
}, t, n), o = Q({
|
|
792
|
+
x: e.x,
|
|
793
|
+
y: e.y + i
|
|
794
|
+
}, t, n) - Q({
|
|
795
|
+
x: e.x,
|
|
796
|
+
y: e.y - i
|
|
797
|
+
}, t, n), s = a / (2 * i), c = o / (2 * i), l = Math.hypot(s, c) + 1e-5, u = Math.hypot(r.x, r.y) + 1e-5, d = s / l * (r.x / u) + c / l * (r.y / u);
|
|
798
|
+
return .5 + .5 * Math.max(-1, Math.min(1, d));
|
|
799
|
+
}
|
|
800
|
+
function ne(e, t) {
|
|
801
|
+
let n = Math.floor(e);
|
|
802
|
+
return +(n / t - Math.floor(n / t) < .5 / t);
|
|
803
|
+
}
|
|
561
804
|
//#endregion
|
|
562
|
-
export {
|
|
805
|
+
export { Y as Concentric, P as DEFAULT_CONCENTRIC_CONFIG, $ as HILLSHADE_EPSILON, k as MAX_RING_STOPS, N as WARM_GROUND_DARK, M as WARM_GROUND_LIGHT, A as WARM_IDENTITY_PALETTE, j as WARM_IDENTITY_PALETTE_DARK, te as hillshade, ne as isIndexLevel, Q as sampleHeight, ee as toneFromHeight, J as useConcentric };
|