@mkbabb/glass-ui 4.1.0 → 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-8whJrLWt.js → CardAction-DlVP2evz.js} +58 -54
- package/dist/{CommandShortcut-D3yxgHNn.js → CommandShortcut-By-VQcLO.js} +3 -3
- package/dist/{ConfiguratorRow-CaP7U3ZA.js → ConfiguratorRow-YMXdINHx.js} +3 -3
- package/dist/{ContextMenuContent-B3ZsheLV.js → ContextMenuContent-CMWn6huB.js} +1 -1
- package/dist/{ContextMenuSubContent-DDRID3qC.js → ContextMenuSubContent-DvwWCUc0.js} +1 -1
- package/dist/{DataTable-Bc9kUtu_.js → DataTable-C4tG3eIJ.js} +4 -4
- package/dist/DialogContent-D8U9ZfWS.js +121 -0
- package/dist/{DialogScrollContent-TTuovQst.js → DialogScrollContent-BMekN7gq.js} +1 -1
- package/dist/{FadingScroll-DLRbH5Xr.js → FadingScroll-P8B30rAD.js} +1 -1
- package/dist/{HoverCardContent-Bel1gdLZ.js → HoverCardContent-DAmGYglo.js} +1 -1
- package/dist/{HoverPopover-BcIxvyqZ.js → HoverPopover-DYpBOzzF.js} +1 -1
- package/dist/{IconChip-DhbdGdFQ.js → IconChip-CQa7XZYc.js} +7 -5
- package/dist/{IconTooltip-B0zimd2H.js → IconTooltip-_df8M3xm.js} +1 -1
- package/dist/{Input-Cg9DF62r.js → Input-CyU4_hIC.js} +2 -2
- package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
- package/dist/{Notification-CphK7AAm.js → Notification-BlSPJhtZ.js} +1 -1
- package/dist/{NumberFieldContent-D8cXeyO4.js → NumberFieldContent-Z3VxGu_6.js} +3 -3
- 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-CnqB7gLm.js → Progress-C9SsdwIZ.js} +1 -1
- package/dist/{ScrollingText-CTZbA_cG.js → ScrollingText-DY3W1Jfh.js} +2 -2
- package/dist/{SelectScrollDownButton-DAKCBEdW.js → SelectScrollDownButton-3mFHX_R-.js} +15 -12
- package/dist/{Switch-B8RscmRu.js → Switch-uf-UKPA2.js} +1 -1
- package/dist/{Toaster-D9qIHjBI.js → Toaster-ozrsR4mP.js} +1 -1
- package/dist/{ToggleGroupItem-BLtr3TJq.js → ToggleGroupItem-BpzaVzNm.js} +4 -4
- package/dist/{TooltipProvider-BJ_Y5EGX.js → TooltipProvider-QQVM_80r.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +1 -0
- package/dist/api/types-extra.d.ts +3 -1
- package/dist/api.js +2 -2
- package/dist/aurora.js +163 -131
- package/dist/badge-Bt14yURi.js +72 -0
- package/dist/badge.js +1 -1
- package/dist/border-progress.js +1 -1
- package/dist/button-D1W9PrzI.js +130 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +227 -98
- package/dist/chipVariants-BJQ0I2kB.js +18 -0
- package/dist/collapsible.js +1 -1
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +1 -1
- package/dist/components/custom/aurora/constants/presets.d.ts +29 -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/concentric/Concentric.vue.d.ts +15 -12
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +8 -3
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +8 -4
- package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -4
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
- package/dist/components/custom/concentric/constants.d.ts +62 -41
- 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/dock/DockDropdownTrigger.vue.d.ts +4 -3
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +10 -0
- package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
- package/dist/components/custom/dock/DockStack.vue.d.ts +35 -22
- package/dist/components/custom/dock/GlassDock.vue.d.ts +19 -3
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +76 -145
- package/dist/components/custom/dock/composables/index.d.ts +1 -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/useDockShellProps.d.ts +38 -0
- package/dist/components/custom/dock/constants.d.ts +14 -3
- package/dist/components/custom/dock/index.d.ts +3 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +21 -0
- 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 +28 -2
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -17
- package/dist/components/custom/dot-flow-field/constants.d.ts +51 -0
- package/dist/components/custom/dot-flow-field/index.d.ts +1 -1
- 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 +29 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -1
- package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +10 -1
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +7 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +14 -0
- package/dist/components/custom/dot-matrix/index.d.ts +1 -1
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +2 -2
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -1
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +4 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +9 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +11 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +16 -1
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +22 -1
- package/dist/components/custom/fourier-field/constants.d.ts +53 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +1 -1
- package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -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/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 +50 -1
- package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +32 -3
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +14 -4
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +55 -16
- package/dist/components/custom/goo-dot-matrix/index.d.ts +1 -1
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +2 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +1 -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/paper-backdrop/PaperBackdrop.vue.d.ts +18 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +44 -29
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +2 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +3 -1
- package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +2 -2
- package/dist/components/custom/paper-grid/constants.d.ts +44 -6
- package/dist/components/custom/paper-grid/index.d.ts +2 -2
- package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +1 -1
- package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -1
- package/dist/components/custom/selectable-chip/chipVariants.d.ts +39 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +12 -20
- package/dist/components/custom/tabs/constants.d.ts +16 -8
- 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 +12 -10
- 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/card/Card.vue.d.ts +1 -1
- package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
- 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/select/SelectContent.vue.d.ts +9 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +9 -0
- package/dist/composables/dom/index.d.ts +1 -0
- package/dist/composables/dom/useDragVelocity.d.ts +46 -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 +95 -2
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
- package/dist/composables/glass/webgpu/index.d.ts +1 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +37 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +49 -2
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +1 -1
- package/dist/composables/motion/core/index.d.ts +4 -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/springPresets.d.ts +16 -17
- 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/useDockCtaReceive.d.ts +10 -28
- 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/useScrollPin.d.ts +49 -0
- package/dist/composables/motion/useScrollScene.d.ts +67 -0
- package/dist/concentric.js +532 -563
- package/dist/configurator.js +2 -2
- package/dist/confirm-dialog.js +3 -3
- package/dist/constellation.js +4 -4
- 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.js +1 -1
- package/dist/dialog.js +3 -3
- package/dist/dock.js +1163 -618
- package/dist/dockContext-gFVS2gMg.js +18 -0
- package/dist/dom.js +7 -6
- package/dist/dot-flow-field.js +1114 -523
- package/dist/dot-matrix.js +348 -204
- package/dist/drawer.js +106 -96
- package/dist/{dropdown-menu-aJmV5SqE.js → dropdown-menu-CCfcCQ68.js} +3 -3
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.js +3 -3
- package/dist/expandable-container.js +2 -2
- package/dist/fading-scroll.js +1 -1
- package/dist/forms.js +6 -6
- package/dist/fourier-field.js +441 -197
- 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 +139 -135
- package/dist/goo-blob.js +11 -9
- package/dist/goo-dot-matrix.js +418 -198
- 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 +3 -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 +7 -7
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +42 -39
- package/dist/motion-curves.js +20 -14
- package/dist/motion.js +226 -26
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/paper-grid.js +315 -342
- package/dist/paperGrid-CXCSMbZ1.js +191 -0
- package/dist/popover.js +1 -1
- package/dist/{presets-CvOUqtdY.js → presets-QvYgnFIZ.js} +13 -12
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/{resolveCanvasColor-yPyIpJt9.js → resolveCanvasColor-DsSJk06I.js} +5 -5
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +7 -7
- package/dist/select.js +3 -3
- package/dist/selectable-chip.js +18 -35
- package/dist/separator.js +1 -1
- package/dist/{sheet-B2flBfLH.js → sheet-DUCIoOe0.js} +3 -3
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider-CcICPe3u.js +149 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/{spectrum-walk-BVzA7Biz.js → spectrum-walk-cBNSx_zm.js} +1 -1
- package/dist/springPresets-DfoQ6XRY.js +64 -0
- package/dist/stacked-icons.js +54 -39
- package/dist/styles/cards.css +202 -2
- package/dist/styles/components.css +1 -3
- package/dist/styles/configurator.css +172 -7
- package/dist/styles/critical-partition.mjs +35 -2
- package/dist/styles/deferred.css +2 -0
- package/dist/styles/dock/adaptive-legibility.css +119 -0
- package/dist/styles/dock/density.css +18 -10
- package/dist/styles/dock/fission-bridge.css +552 -0
- package/dist/styles/dock/layers.css +88 -124
- package/dist/styles/dock/morph-bridge.css +15 -2
- package/dist/styles/dock/morph.css +45 -114
- package/dist/styles/dock/shape.css +137 -11
- package/dist/styles/dock/shell.css +1 -3
- package/dist/styles/dock/stack-rail.css +95 -7
- package/dist/styles/dock-controls/icon-button.css +34 -2
- package/dist/styles/dock-controls/triggers.css +23 -1
- package/dist/styles/dock-controls.css +18 -0
- package/dist/styles/dock.css +16 -1
- package/dist/styles/drawer.css +166 -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/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 +13 -1
- package/dist/styles/glass/surfaces.css +18 -8
- package/dist/styles/glass.css +11 -0
- package/dist/styles/icon-chip.css +45 -0
- package/dist/styles/index.css +11 -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/segmented-tabs.css +85 -51
- package/dist/styles/select.css +151 -0
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/dark-arm.css +57 -8
- package/dist/styles/tokens/glass-deep.css +8 -4
- package/dist/styles/tokens/glass-fx.css +80 -2
- package/dist/styles/tokens/glass.css +140 -8
- package/dist/styles/tokens/light-dark.css +2 -2
- package/dist/styles/tokens/property-regs.css +144 -0
- package/dist/styles/tokens/scale-paper.css +20 -8
- package/dist/styles/tokens/scheme-motion.css +92 -157
- 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.css +9 -2
- package/dist/styles/utilities/btn.css +70 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +198 -181
- 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 +1 -1
- package/dist/{uniformBridgeWGPU-CtAKl45L.js → uniformBridgeWGPU-BCse1SHU.js} +191 -127
- package/dist/{useAnimatedNumber-CLrxicG9.js → useAnimatedNumber-BntskVdQ.js} +1 -1
- package/dist/{useConfiguratorState-4xblKfwd.js → useConfiguratorState-22BcULzF.js} +37 -35
- package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
- package/dist/{useDragMorph-BUgAC-zK.js → useDragMorph-DGLSewwB.js} +2 -2
- package/dist/useDragVelocity-CjcfX3dA.js +57 -0
- package/dist/useGooMorph-Cs13NgYL.js +104 -0
- package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
- package/dist/{useViewTransition-CUI1nAgn.js → useHaptic-CPz5BT9I.js} +40 -1
- package/dist/{useLiquidFlex-UmA6LMZu.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
- package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
- package/dist/useMorphField-ogBM7ubT.js +141 -0
- package/dist/{useScrollChrome-D66AVP7C.js → useScrollChrome-JuImi1DM.js} +2 -2
- package/dist/{useSpringMount-BWDnKIwh.js → useSpringMount-DFxtzmkR.js} +1 -1
- package/dist/{useSpringPress-B1-Czp-V.js → useSpringPress-VM9RgVq3.js} +1 -1
- package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
- package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
- package/dist/virtual.js +1 -1
- package/dist/watercolor-dot.js +16 -26
- package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
- package/package.json +14 -3
- package/src/styles/cards.css +202 -2
- package/src/styles/configurator.css +172 -7
- package/src/styles/critical-partition.mjs +35 -2
- package/src/styles/dock/adaptive-legibility.css +119 -0
- package/src/styles/dock/density.css +18 -10
- package/src/styles/dock/fission-bridge.css +552 -0
- package/src/styles/dock/layers.css +88 -124
- package/src/styles/dock/morph-bridge.css +15 -2
- package/src/styles/dock/morph.css +45 -114
- package/src/styles/dock/shape.css +137 -11
- package/src/styles/dock/shell.css +1 -3
- package/src/styles/dock/stack-rail.css +95 -7
- package/src/styles/dock-controls/icon-button.css +34 -2
- package/src/styles/dock-controls/triggers.css +23 -1
- package/src/styles/dock-controls.css +18 -0
- package/src/styles/dock.css +16 -1
- package/src/styles/drawer.css +164 -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/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 +13 -1
- package/src/styles/glass/surfaces.css +18 -8
- package/src/styles/glass.css +11 -0
- package/src/styles/icon-chip.css +45 -0
- package/src/styles/index.css +11 -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/segmented-tabs.css +85 -47
- package/src/styles/select.css +151 -0
- package/src/styles/tokens/color-radius.css +1 -1
- package/src/styles/tokens/dark-arm.css +57 -8
- package/src/styles/tokens/glass-deep.css +8 -4
- package/src/styles/tokens/glass-fx.css +80 -2
- package/src/styles/tokens/glass.css +140 -8
- package/src/styles/tokens/light-dark.css +2 -2
- package/src/styles/tokens/property-regs.css +144 -0
- package/src/styles/tokens/scale-paper.css +20 -8
- package/src/styles/tokens/scheme-motion.css +92 -157
- 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.css +9 -2
- package/src/styles/utilities/btn.css +70 -0
- package/dist/DialogContent-6JtTB5x2.js +0 -106
- package/dist/PagerDots-Cjx96la-.js +0 -98
- package/dist/PaperBackdrop-CqwjnfLv.js +0 -31
- package/dist/badge-D9XWW4GT.js +0 -53
- package/dist/button-5dY1Dvhd.js +0 -125
- package/dist/components/custom/concentric/composables/ringField.d.ts +0 -85
- package/dist/createCanvasLifecycle-Gh45Ce-p.js +0 -93
- package/dist/dockContext-BNfyPLe9.js +0 -17
- package/dist/slider-2A0rPn79.js +0 -142
- package/dist/springPresets-Ce7OYCm9.js +0 -46
- package/dist/useDockCtaReceive-DfFkmgL1.js +0 -82
- package/dist/useGpuSubstrate-4pTcp6mX.js +0 -294
- package/dist/useLiquidPress-BooG97RY.js +0 -39
- /package/dist/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
- /package/dist/{DialogFooter-9phqcRIS.js → DialogFooter-DoLy0ewI.js} +0 -0
- /package/dist/{InstrumentChassis-CxsHSyMj.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-BFiod7X2.js → SelectGroup-Dcczq44n.js} +0 -0
- /package/dist/{SelectSeparator-C2UGOkXF.js → SelectSeparator-CNRGG7Ew.js} +0 -0
- /package/dist/{Separator-DQcwC2TR.js → Separator-Cf9-JFgi.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
- /package/dist/{color-Cs0-oxYL.js → color-B9jZdhJX.js} +0 -0
- /package/dist/{compile-nZ1xVYTp.js → compile-INR_tPk_.js} +0 -0
- /package/dist/{constants--C2DkLW8.js → constants-BWj7DkMn.js} +0 -0
- /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
- /package/dist/{dotMatrixField-D_x9_1qq.js → dotMatrixField-CRO0ZFk4.js} +0 -0
- /package/dist/{flow.glsl-B2P7e0MT.js → flow.glsl-DqEGRpl4.js} +0 -0
- /package/dist/{math-Eb0w3LqU.js → math-5RcIgCB4.js} +0 -0
- /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
- /package/dist/{prng-B-d9eYX8.js → prng-B5tIXTtj.js} +0 -0
- /package/dist/{procedural-color.wgsl-m7Zgv35j.js → procedural-color.wgsl-C1Y5PkM6.js} +0 -0
- /package/dist/{scrollReader-DI1NWxUw.js → scrollReader-rc3Ns_NM.js} +0 -0
- /package/dist/{useControlSize-SH1UmJCi.js → useControlSize-DAZ062x7.js} +0 -0
- /package/dist/{useFuzzySearch-DIhcYtcw.js → useFuzzySearch-0fTYOhS4.js} +0 -0
- /package/dist/{useGlobalDark-CmjB9E32.js → useGlobalDark-B4HO9LXG.js} +0 -0
- /package/dist/{useIntersectionPause-Dbozzjgm.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
- /package/dist/{useInterval-CNdua40W.js → useInterval-BVUI-sez.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BPRp33Im.js → useKeyboardShortcuts-BEut54Tk.js} +0 -0
- /package/dist/{usePointerVelocityField-QLsy3_kv.js → usePointerVelocityField-BrkqZFhj.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-c3yxmH6a.js → useScrollProgress-A0M6qRl7.js} +0 -0
- /package/dist/{useSortable-BVqlJRBR.js → useSortable-DQV_UNDw.js} +0 -0
- /package/dist/{useTextHighlight-NmBM5V_4.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-D9k0jADx.js → vReveal-CT1KtwZA.js} +0 -0
package/dist/goo-dot-matrix.js
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import { t } from "./usePointerVelocityField-
|
|
3
|
-
import { a as n, t as r } from "./useGpuSubstrate-
|
|
4
|
-
import { n as i, t as a } from "./compile-
|
|
5
|
-
import { s as o, t as s } from "./color-
|
|
6
|
-
import { t as c } from "./useIntersectionPause-
|
|
7
|
-
import { u as l } from "./dotMatrixField-
|
|
8
|
-
import { a as u, c as d, d as f, i as p, l as m, n as h, o as g, r as _, s as v, t as y, u as b } from "./uniformBridgeWGPU-
|
|
9
|
-
import { computed as x, createElementBlock as S, createElementVNode as C, defineComponent as w, normalizeStyle as T, onScopeDispose as
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-gLzyemvl.js";
|
|
2
|
+
import { t } from "./usePointerVelocityField-BrkqZFhj.js";
|
|
3
|
+
import { a as n, t as r } from "./useGpuSubstrate-Ceet70xq.js";
|
|
4
|
+
import { n as i, t as a } from "./compile-INR_tPk_.js";
|
|
5
|
+
import { s as o, t as s } from "./color-B9jZdhJX.js";
|
|
6
|
+
import { t as c } from "./useIntersectionPause-DO8Vl4gs.js";
|
|
7
|
+
import { u as l } from "./dotMatrixField-CRO0ZFk4.js";
|
|
8
|
+
import { a as u, c as d, d as f, i as p, l as m, n as h, o as g, r as _, s as v, t as y, u as b } from "./uniformBridgeWGPU-BCse1SHU.js";
|
|
9
|
+
import { computed as x, createElementBlock as S, createElementVNode as C, defineComponent as w, normalizeStyle as T, onScopeDispose as ee, openBlock as E, ref as D, useTemplateRef as O, watch as k } from "vue";
|
|
10
10
|
//#region src/components/custom/goo-dot-matrix/constants.ts
|
|
11
|
-
var A = 4, j =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
var A = 4, j = [
|
|
12
|
+
{
|
|
13
|
+
L: .96,
|
|
14
|
+
C: .13,
|
|
15
|
+
h: 85
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
L: .82,
|
|
19
|
+
C: .18,
|
|
20
|
+
h: 45
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
L: .72,
|
|
24
|
+
C: .15,
|
|
25
|
+
h: 62
|
|
26
|
+
}
|
|
27
|
+
], M = {
|
|
20
28
|
variant: "dot-field",
|
|
21
29
|
field: {
|
|
22
30
|
...f,
|
|
@@ -27,60 +35,71 @@ var A = 4, j = 96, M = [{
|
|
|
27
35
|
dotMax: .42,
|
|
28
36
|
fieldFloor: .06,
|
|
29
37
|
dotBrightFloor: .35,
|
|
30
|
-
|
|
38
|
+
presenceFloor: .2,
|
|
39
|
+
weldSwell: .5,
|
|
40
|
+
weldSpecular: .25,
|
|
31
41
|
flowAmt: .35,
|
|
32
|
-
palette:
|
|
42
|
+
palette: j,
|
|
33
43
|
background: "transparent",
|
|
44
|
+
fieldGround: "transparent",
|
|
34
45
|
interactive: !1,
|
|
35
46
|
pointerMode: "repel",
|
|
36
47
|
pointerRadius: .35,
|
|
37
48
|
respectReducedMotion: !0
|
|
38
|
-
}, P = {
|
|
49
|
+
}, N = .1, P = .45, F = {
|
|
39
50
|
s8: 0,
|
|
40
51
|
s9: 4,
|
|
41
52
|
s10: 8,
|
|
42
|
-
s11: 12
|
|
53
|
+
s11: 12,
|
|
54
|
+
s12: 16,
|
|
55
|
+
s13: 20
|
|
43
56
|
};
|
|
44
|
-
function
|
|
57
|
+
function I(e) {
|
|
45
58
|
return +(e === "dot-dither");
|
|
46
59
|
}
|
|
47
|
-
function
|
|
60
|
+
function L(e) {
|
|
48
61
|
return e === "attract" ? -1 : 1;
|
|
49
62
|
}
|
|
50
|
-
function
|
|
63
|
+
function R() {
|
|
51
64
|
return {
|
|
52
65
|
x: 0,
|
|
53
66
|
y: 0,
|
|
54
67
|
active: 0,
|
|
55
|
-
bloom: 0
|
|
68
|
+
bloom: 0,
|
|
69
|
+
timeSec: 0,
|
|
70
|
+
latticeSquash: 1
|
|
56
71
|
};
|
|
57
72
|
}
|
|
58
|
-
function
|
|
59
|
-
let e = /* @__PURE__ */ new ArrayBuffer(
|
|
73
|
+
function z() {
|
|
74
|
+
let e = /* @__PURE__ */ new ArrayBuffer(96);
|
|
60
75
|
return {
|
|
61
76
|
buffer: e,
|
|
62
77
|
f32: new Float32Array(e)
|
|
63
78
|
};
|
|
64
79
|
}
|
|
65
|
-
function
|
|
80
|
+
function B(e, t, n, r, i) {
|
|
66
81
|
let { f32: a } = e;
|
|
67
|
-
return a[
|
|
82
|
+
return a[F.s8 + 0] = I(t.variant), a[F.s8 + 1] = Math.max(t.dotPixelSize * r, 4), a[F.s8 + 2] = t.fieldFloor, a[F.s8 + 3] = t.dotBrightFloor, a[F.s9 + 0] = t.dotMin, a[F.s9 + 1] = t.dotMax, a[F.s9 + 2] = t.pointerRadius, a[F.s9 + 3] = L(t.pointerMode), a[F.s10 + 0] = n.w, a[F.s10 + 1] = n.h, a[F.s10 + 2] = r, a[F.s10 + 3] = t.fieldGround === "transparent" ? 0 : 1, a[F.s11 + 0] = t.interactive ? i.active : 0, a[F.s11 + 1] = i.x, a[F.s11 + 2] = i.y, a[F.s11 + 3] = i.bloom, a[F.s12 + 0] = t.presenceFloor, a[F.s12 + 1] = N, a[F.s12 + 2] = P, a[F.s12 + 3] = i.timeSec, a[F.s13 + 0] = t.weldSwell, a[F.s13 + 1] = t.weldSpecular, a[F.s13 + 2] = t.flowAmt, a[F.s13 + 3] = i.latticeSquash, e;
|
|
68
83
|
}
|
|
69
84
|
//#endregion
|
|
70
85
|
//#region src/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.ts
|
|
71
|
-
var
|
|
72
|
-
${
|
|
86
|
+
var V = p.indexOf("// ── Full-screen triangle vertex stage"), H = `
|
|
87
|
+
${V >= 0 ? p.slice(0, V) : p}
|
|
73
88
|
|
|
74
|
-
// ── Dot-grid uniforms (the s8
|
|
89
|
+
// ── Dot-grid uniforms (the s8–s13 lanes — see uniformBridgeWGPU.ts; the SoT extend) ──
|
|
75
90
|
struct DotUniforms {
|
|
76
91
|
// s8: (uDotMode, uDotPixelSize, uFieldFloor, uDotBrightFloor)
|
|
77
92
|
s8: vec4<f32>,
|
|
78
93
|
// s9: (uDotMin, uDotMax, uPointerRadius, uPointerMode)
|
|
79
94
|
s9: vec4<f32>,
|
|
80
|
-
// s10: (uResX, uResY, uDpr,
|
|
95
|
+
// s10: (uResX, uResY, uDpr, uShadowGate) — res + the opaque-ground cartoon-shadow gate
|
|
81
96
|
s10: vec4<f32>,
|
|
82
97
|
// s11: (uPointerActive, uPointerX, uPointerY, uBloom) — the dot-cursor influence
|
|
83
98
|
s11: vec4<f32>,
|
|
99
|
+
// s12: (uPresenceFloor, uWeldLo, uWeldHi, uTime) — Move 1 floor + Move 2 weld band + twinkle clock
|
|
100
|
+
s12: vec4<f32>,
|
|
101
|
+
// s13: (uWeldSwell, uWeldSpecular, uFlowAmt, uLatticeSquash) — Move 2 ridge + Move 4b lattice
|
|
102
|
+
s13: vec4<f32>,
|
|
84
103
|
};
|
|
85
104
|
@group(0) @binding(1) var<uniform> dg: DotUniforms;
|
|
86
105
|
|
|
@@ -127,9 +146,18 @@ fn fs_main(in: DotVSOut) -> @location(0) vec4<f32> {
|
|
|
127
146
|
let uPointerRadius = max(dg.s9.z, 1e-4);
|
|
128
147
|
let uPointerMode = dg.s9.w; // +1 repel (push out), -1 attract (pull in)
|
|
129
148
|
let uRes = dg.s10.xy;
|
|
149
|
+
let uShadowGate = dg.s10.w; // 1 when an opaque ground is present (cast shadow), else 0
|
|
130
150
|
let pAct = dg.s11.x;
|
|
131
151
|
let cursor = dg.s11.yz; // NDC-ish [-0.5,0.5] (the field's uv space)
|
|
132
152
|
let uBloom = dg.s11.w;
|
|
153
|
+
let uPresenceFloor = dg.s12.x; // Move 1 — the base-lattice floor
|
|
154
|
+
let uWeldLo = dg.s12.y; // Move 2 — the weld band lower fCell
|
|
155
|
+
let uWeldHi = dg.s12.z; // Move 2 — the weld band upper fCell
|
|
156
|
+
let uTime = dg.s12.w; // the φ-twinkle clock (s)
|
|
157
|
+
let uWeldSwell = dg.s13.x; // Move 2 — the neck-ridge radius swell
|
|
158
|
+
let uWeldSpecular = dg.s13.y; // Move 2 — the multiplicative HDR weld pop
|
|
159
|
+
let uFlowAmt = dg.s13.z; // Move 4b — the liquid-lattice advection
|
|
160
|
+
let uLatticeSquash = dg.s13.w; // Move 4b — the volume-preserving squash
|
|
133
161
|
|
|
134
162
|
let bodyR = u.s0.y + breath(u.s0.z) * u.s0.w;
|
|
135
163
|
|
|
@@ -137,6 +165,7 @@ fn fs_main(in: DotVSOut) -> @location(0) vec4<f32> {
|
|
|
137
165
|
// pixel coordinate is in.pos.xy (device px).
|
|
138
166
|
let fragCoord = in.pos.xy;
|
|
139
167
|
let cell = floor(fragCoord / uDotPixelSize);
|
|
168
|
+
let cellHalf = uDotPixelSize * 0.5;
|
|
140
169
|
let cellCtr = (cell + 0.5) * uDotPixelSize;
|
|
141
170
|
|
|
142
171
|
// 2. The field AT THE CELL CENTER (so every fragment in a cell agrees on ONE dot). The cell
|
|
@@ -150,24 +179,53 @@ fn fs_main(in: DotVSOut) -> @location(0) vec4<f32> {
|
|
|
150
179
|
let toCursor = cellCtrUv - cursor;
|
|
151
180
|
let cdist = length(toCursor);
|
|
152
181
|
let influence = (1.0 - smoothstep(0.0, uPointerRadius, cdist)) * pAct;
|
|
153
|
-
let
|
|
182
|
+
let cursorUv = cellCtrUv + normalize(toCursor + vec2<f32>(1e-6)) * influence * uPointerMode * 0.03;
|
|
183
|
+
|
|
184
|
+
// MOVE 4b — the LIQUID LATTICE. Probe the field once at the cursor-shifted cell to get the
|
|
185
|
+
// local gradient, then advect the sample DOWN that gradient toward the forming core (the
|
|
186
|
+
// dots migrate INTO the goo, not a screen-locked grid). The volume-preserving squash leans
|
|
187
|
+
// the cell on the pulse + a fast drag (X·Y ≈ 1, a liquid lean not a balloon).
|
|
188
|
+
let probe = sceneDistG(cursorUv);
|
|
189
|
+
let probeF = clamp(-probe.x / max(bodyR, 1e-4), 0.0, 1.0);
|
|
190
|
+
let flowDir = normalize(probe.yz + vec2<f32>(1e-6));
|
|
191
|
+
let sq = max(uLatticeSquash, 1e-3);
|
|
192
|
+
let leanUv = vec2<f32>(cursorUv.x / sq, cursorUv.y * sq); // vol-preserving X·Y ≈ 1
|
|
193
|
+
let sampleUv = leanUv - flowDir * uFlowAmt * probeF * 0.06;
|
|
154
194
|
|
|
155
195
|
// 4. The field value at the cell — thickness = clamp(-d/bodyR, 0, 1) (metaball.wgsl line 500,
|
|
156
196
|
// the one-line re-use). 0 at the silhouette → 1 deep in the core — the goo↔dot bridge.
|
|
157
197
|
let scene = sceneDistG(sampleUv);
|
|
158
198
|
let fCell = clamp(-scene.x / max(bodyR, 1e-4), 0.0, 1.0);
|
|
159
199
|
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
|
|
163
|
-
let
|
|
164
|
-
let
|
|
200
|
+
// MOVE 1 — the phi-banded PRESENCE FLOOR. band is the meniscus rise the old step() deleted;
|
|
201
|
+
// core is the body rise. present NEVER drops below uPresenceFloor -> a living lattice
|
|
202
|
+
// fills the card corner-to-corner. uPresenceFloor = 0 => byte-identical to the old gate.
|
|
203
|
+
let band = smoothstep(0.0, max(uFieldFloor, 1e-4), fCell);
|
|
204
|
+
let core = smoothstep(uFieldFloor, 1.0, fCell);
|
|
205
|
+
let present = max(uPresenceFloor, band);
|
|
206
|
+
|
|
207
|
+
// MOVE 2 — the NECK-RIDGE. The weld is gated on the rim/iso BAND (where two membranes meet),
|
|
208
|
+
// NOT on core (lower at the waist), AND on a shallow field gradient (a flat welding
|
|
209
|
+
// membrane). At a weld the dots get the field's biggest+brightest swell — the climax.
|
|
210
|
+
let gradMag = length(scene.yz);
|
|
211
|
+
let inBand = smoothstep(uWeldLo, (uWeldLo + uWeldHi) * 0.5, fCell)
|
|
212
|
+
* (1.0 - smoothstep((uWeldLo + uWeldHi) * 0.5, uWeldHi, fCell));
|
|
213
|
+
let weld = inBand * (1.0 - smoothstep(0.0, 0.25, gradMag));
|
|
214
|
+
|
|
215
|
+
// 5. The dot radius (px). The presence floor sets the base; core ramps the body; the weld
|
|
216
|
+
// swells the neck dots ~1+uWeldSwell (pinned sub-cell so they stay ROUND, not clipped
|
|
217
|
+
// squares); the cursor swell + accel bloom ride on top.
|
|
218
|
+
let coreR = (uDotMin + (uDotMax - uDotMin) * core);
|
|
219
|
+
let baseR = mix(uDotMin, coreR, present)
|
|
220
|
+
* (1.0 + uWeldSwell * weld)
|
|
221
|
+
* (1.0 + influence * 0.5 + uBloom * influence);
|
|
222
|
+
let dotR = clamp(baseR, 0.0, 0.98) * cellHalf; // the √φ cell-clip ceiling — round dots
|
|
165
223
|
|
|
166
224
|
var mask = 1.0;
|
|
167
225
|
if (uDotMode > 0.5) {
|
|
168
226
|
// §T2 Register-A dither: ORDERED-dither the field thickness into ON/OFF dots — denser at
|
|
169
227
|
// the core, sparser at the rim (the classic halftone). The dot still AA-stamps below.
|
|
170
|
-
mask = step(0.5, fCell + bayer8(cell) - 0.5);
|
|
228
|
+
mask = step(0.5, max(uPresenceFloor, fCell) + bayer8(cell) - 0.5);
|
|
171
229
|
}
|
|
172
230
|
|
|
173
231
|
// 6. The antialiased circle at the cell center (the fwidth-feathered Book-of-Shaders dot —
|
|
@@ -176,30 +234,47 @@ fn fs_main(in: DotVSOut) -> @location(0) vec4<f32> {
|
|
|
176
234
|
let aa = max(fwidth(pd), 1e-4);
|
|
177
235
|
let dot = (1.0 - smoothstep(dotR - aa, dotR + aa, pd)) * mask;
|
|
178
236
|
|
|
179
|
-
//
|
|
180
|
-
//
|
|
181
|
-
//
|
|
182
|
-
|
|
183
|
-
let
|
|
184
|
-
let
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
//
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
237
|
+
// MOVE 3 — the GATED CARTOON SHADOW. A larger, darker disc UNDER the bright dot, offset by
|
|
238
|
+
// the cursor burst (the velocity tell). GATED on uShadowGate (an opaque ground to cast
|
|
239
|
+
// onto — no dark halos on a light/transparent host). Premultiplied UNDER the dot.
|
|
240
|
+
let twinkle = 0.85 + 0.15 * sin(uTime * 0.6 + hash21(cell) * 6.2831853);
|
|
241
|
+
let shOff = normalize(toCursor + vec2<f32>(1e-6)) * (0.6 + uBloom * 2.2) * uShadowGate;
|
|
242
|
+
let shPd = length(fragCoord - (cellCtr + shOff * cellHalf));
|
|
243
|
+
let shadowR = dotR * 1.45;
|
|
244
|
+
let shadow = (1.0 - smoothstep(shadowR - aa, shadowR + aa, shPd)) * mask
|
|
245
|
+
* uShadowGate * (present * 0.55);
|
|
246
|
+
|
|
247
|
+
// 7. The TECHNICOLOR read (Move 3). The tone maps fCell over the 3-stop warm ramp: deep core
|
|
248
|
+
// = hot butter-gold (stop 0), the weld band = molten coral (stop 1), the base lattice =
|
|
249
|
+
// deep amber (stop 2). On a light host the FLOOR dots read coral/amber (not the L0.96 core
|
|
250
|
+
// stop) so the resting lattice carries chroma. The weld specular is a MULTIPLICATIVE HDR
|
|
251
|
+
// pop that can exceed the core ceiling — the waist is the brightest band.
|
|
252
|
+
let bright = (uDotBrightFloor + (1.0 - uDotBrightFloor) * core + uBloom * influence * 0.6)
|
|
253
|
+
* (1.0 + uWeldSpecular * weld) * twinkle;
|
|
254
|
+
// tone: 0 deep core → 1 base lattice; the weld pulls toward the coral stop (~0.5).
|
|
255
|
+
let tone = clamp(mix(1.0 - core, 0.5, weld), 0.0, 1.0);
|
|
256
|
+
var oklch = samplePaletteOklch(tone);
|
|
257
|
+
oklch.x = clamp(oklch.x * clamp(bright, 0.0, 1.8), 0.0, 1.0);
|
|
258
|
+
let lin = oklabToLinearSrgb(oklchToOklab(gamutClampOklch(oklch)));
|
|
259
|
+
let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
|
|
260
|
+
|
|
261
|
+
let alpha = dot * present * twinkle;
|
|
262
|
+
if (alpha < 0.002 && shadow < 0.002) { discard; }
|
|
263
|
+
|
|
264
|
+
// The cartoon shadow (a warm-dark disc) composited UNDER, then the bright dot OVER. Both
|
|
265
|
+
// premultiplied. The dot wins where it stamps; the shadow shows in the offset crescent.
|
|
266
|
+
let shadowRgb = vec3<f32>(0.10, 0.05, 0.02);
|
|
267
|
+
let outRgb = rgb * alpha + shadowRgb * shadow * (1.0 - alpha);
|
|
268
|
+
let outA = alpha + shadow * (1.0 - alpha);
|
|
269
|
+
return vec4<f32>(outRgb, outA);
|
|
270
|
+
}`, U = "\nstruct GroundUniforms {\n // g0: (uGroundTime, uGroundAspect, _pad, _pad)\n g0: vec4<f32>,\n};\n@group(0) @binding(0) var<uniform> gu: GroundUniforms;\n\nstruct GVSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) uv: vec2<f32>,\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> GVSOut {\n var p = vec2<f32>(-1.0, -1.0);\n if (vi == 1u) { p = vec2<f32>(3.0, -1.0); }\n else if (vi == 2u) { p = vec2<f32>(-1.0, 3.0); }\n var out: GVSOut;\n out.pos = vec4<f32>(p, 0.0, 1.0);\n out.uv = p * 0.5 + 0.5;\n return out;\n}\n\n@fragment\nfn fs_main(in: GVSOut) -> @location(0) vec4<f32> {\n let t = gu.g0.x;\n let uv = in.uv;\n // Two slow warm drifts — the centroid moves so the ground is LIVING (G3c).\n let d1 = 0.5 + 0.5 * sin(t * 0.11 + uv.x * 2.1);\n let d2 = 0.5 + 0.5 * sin(t * 0.07 - uv.y * 1.7 + 1.3);\n let amber = vec3<f32>(0.99, 0.86, 0.62); // warm gold high\n let coral = vec3<f32>(0.95, 0.62, 0.42); // molten coral mid\n let deep = vec3<f32>(0.86, 0.50, 0.30); // deep amber low\n let g = mix(deep, coral, d1);\n let rgb = mix(g, amber, d2 * (1.0 - uv.y) * 0.8);\n return vec4<f32>(rgb, 1.0);\n}", W = g.indexOf("void main()"), G = W >= 0 ? g.slice(0, W) : g, K = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition * 0.5 + 0.5;\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", q = `${G}
|
|
198
271
|
|
|
199
|
-
// ── Dot-grid uniforms (the s8
|
|
272
|
+
// ── Dot-grid uniforms (the s8–s13 lanes — see uniformBridgeWGPU.ts; the SoT extend) ──
|
|
273
|
+
// The GLSL twin sets these as N named scalars (the WGSL packs vec4 lanes); a unit asserts the
|
|
274
|
+
// dU.* count == the WGSL lane-field count (a dropped uniform reds parity).
|
|
200
275
|
uniform float uDotMode; // 0 = smooth field-driven dot, 1 = Bayer dither
|
|
201
276
|
uniform float uDotPixelSize; // device-px cell size
|
|
202
|
-
uniform float uFieldFloor; //
|
|
277
|
+
uniform float uFieldFloor; // the meniscus rise begins here
|
|
203
278
|
uniform float uDotBrightFloor; // dim-outside brightness floor
|
|
204
279
|
uniform float uDotMin; // rim dot radius (fraction of the cell)
|
|
205
280
|
uniform float uDotMax; // core dot radius (fraction of the cell)
|
|
@@ -207,7 +282,16 @@ uniform float uDotPointerRadius;
|
|
|
207
282
|
uniform float uDotPointerMode; // +1 repel, -1 attract
|
|
208
283
|
uniform float uDotPointerActive;
|
|
209
284
|
uniform vec2 uDotCursor; // field-uv cursor [-0.5,0.5]
|
|
210
|
-
uniform float uDotBloom; // accel-burst bloom
|
|
285
|
+
uniform float uDotBloom; // accel-burst bloom (the velocity tell)
|
|
286
|
+
uniform float uDotShadowGate; // 1 when an opaque ground is present (cast the cartoon shadow)
|
|
287
|
+
uniform float uPresenceFloor; // Move 1 — the base-lattice floor
|
|
288
|
+
uniform float uWeldLo; // Move 2 — the weld band lower fCell
|
|
289
|
+
uniform float uWeldHi; // Move 2 — the weld band upper fCell
|
|
290
|
+
uniform float uDotTime; // the φ-twinkle clock (s)
|
|
291
|
+
uniform float uWeldSwell; // Move 2 — the neck-ridge radius swell
|
|
292
|
+
uniform float uWeldSpecular; // Move 2 — the multiplicative HDR weld pop
|
|
293
|
+
uniform float uFlowAmt; // Move 4b — the liquid-lattice advection
|
|
294
|
+
uniform float uLatticeSquash; // Move 4b — the volume-preserving squash
|
|
211
295
|
|
|
212
296
|
// The Codrops Bayer8 ordered-dither macros (the §T2 halftone).
|
|
213
297
|
float bayer2(vec2 a0){ vec2 a = floor(a0); return fract(a.x / 2.0 + a.y * a.y * 0.75); }
|
|
@@ -221,6 +305,7 @@ void main() {
|
|
|
221
305
|
vec2 fragCoord = gl_FragCoord.xy;
|
|
222
306
|
float pix = max(uDotPixelSize, 1.0);
|
|
223
307
|
vec2 cell = floor(fragCoord / pix);
|
|
308
|
+
float cellHalf = pix * 0.5;
|
|
224
309
|
vec2 cellCtr = (cell + 0.5) * pix;
|
|
225
310
|
|
|
226
311
|
// 2. The field uv at the cell center (the SAME uv the metaball pass uses).
|
|
@@ -230,20 +315,42 @@ void main() {
|
|
|
230
315
|
vec2 toCursor = cellCtrUv - uDotCursor;
|
|
231
316
|
float cdist = length(toCursor);
|
|
232
317
|
float influence = (1.0 - smoothstep(0.0, max(uDotPointerRadius, 1e-4), cdist)) * uDotPointerActive;
|
|
233
|
-
vec2
|
|
318
|
+
vec2 cursorUv = cellCtrUv + normalize(toCursor + vec2(1e-6)) * influence * uDotPointerMode * 0.03;
|
|
319
|
+
|
|
320
|
+
// MOVE 4b — the LIQUID LATTICE. Probe the field, advect down the gradient toward the forming
|
|
321
|
+
// core, lean the cell volume-preservingly (X·Y ≈ 1).
|
|
322
|
+
vec3 probe = sceneDistG(cursorUv);
|
|
323
|
+
float probeF = clamp(-probe.x / max(bodyR, 1e-4), 0.0, 1.0);
|
|
324
|
+
vec2 flowDir = normalize(probe.yz + vec2(1e-6));
|
|
325
|
+
float sq = max(uLatticeSquash, 1e-3);
|
|
326
|
+
vec2 leanUv = vec2(cursorUv.x / sq, cursorUv.y * sq);
|
|
327
|
+
vec2 sampleUv = leanUv - flowDir * uFlowAmt * probeF * 0.06;
|
|
234
328
|
|
|
235
329
|
// 4. The field value at the cell — thickness = clamp(-d/bodyR, 0, 1) (the goo↔dot bridge).
|
|
236
330
|
vec3 scene = sceneDistG(sampleUv);
|
|
237
331
|
float fCell = clamp(-scene.x / max(bodyR, 1e-4), 0.0, 1.0);
|
|
238
332
|
|
|
239
|
-
//
|
|
240
|
-
float
|
|
241
|
-
float
|
|
242
|
-
float
|
|
333
|
+
// MOVE 1 — the φ-banded PRESENCE FLOOR (uPresenceFloor = 0 ⇒ byte-identical to the old gate).
|
|
334
|
+
float band = smoothstep(0.0, max(uFieldFloor, 1e-4), fCell);
|
|
335
|
+
float core = smoothstep(uFieldFloor, 1.0, fCell);
|
|
336
|
+
float present = max(uPresenceFloor, band);
|
|
337
|
+
|
|
338
|
+
// MOVE 2 — the NECK-RIDGE (weld gated on the rim/iso band + a shallow gradient, not on core).
|
|
339
|
+
float gradMag = length(scene.yz);
|
|
340
|
+
float inBand = smoothstep(uWeldLo, (uWeldLo + uWeldHi) * 0.5, fCell)
|
|
341
|
+
* (1.0 - smoothstep((uWeldLo + uWeldHi) * 0.5, uWeldHi, fCell));
|
|
342
|
+
float weld = inBand * (1.0 - smoothstep(0.0, 0.25, gradMag));
|
|
343
|
+
|
|
344
|
+
// 5. The field-driven dot radius (px) + the neck-ridge swell + the cursor swell + accel bloom.
|
|
345
|
+
float coreR = (uDotMin + (uDotMax - uDotMin) * core);
|
|
346
|
+
float baseR = mix(uDotMin, coreR, present)
|
|
347
|
+
* (1.0 + uWeldSwell * weld)
|
|
348
|
+
* (1.0 + influence * 0.5 + uDotBloom * influence);
|
|
349
|
+
float dotR = clamp(baseR, 0.0, 0.98) * cellHalf;
|
|
243
350
|
|
|
244
351
|
float mask = 1.0;
|
|
245
352
|
if (uDotMode > 0.5) {
|
|
246
|
-
mask = step(0.5, fCell + bayer8(cell) - 0.5);
|
|
353
|
+
mask = step(0.5, max(uPresenceFloor, fCell) + bayer8(cell) - 0.5);
|
|
247
354
|
}
|
|
248
355
|
|
|
249
356
|
// 6. The crisp fwidth-feathered SDF dot (the ONE AA canon, ~1px band at any DPR).
|
|
@@ -251,91 +358,143 @@ void main() {
|
|
|
251
358
|
float aa = max(fwidth(pd), 1e-4);
|
|
252
359
|
float dot = (1.0 - smoothstep(dotR - aa, dotR + aa, pd)) * mask;
|
|
253
360
|
|
|
254
|
-
//
|
|
255
|
-
|
|
256
|
-
float
|
|
361
|
+
// MOVE 3 — the GATED CARTOON SHADOW (offset by the cursor burst — the velocity tell — gated
|
|
362
|
+
// on uDotShadowGate so no dark halos paint on a light/transparent host).
|
|
363
|
+
float twinkle = 0.85 + 0.15 * sin(uDotTime * 0.6 + hash21(cell) * 6.2831853);
|
|
364
|
+
vec2 shOff = normalize(toCursor + vec2(1e-6)) * (0.6 + uDotBloom * 2.2) * uDotShadowGate;
|
|
365
|
+
float shPd = length(fragCoord - (cellCtr + shOff * cellHalf));
|
|
366
|
+
float shadowR = dotR * 1.45;
|
|
367
|
+
float shadow = (1.0 - smoothstep(shadowR - aa, shadowR + aa, shPd)) * mask
|
|
368
|
+
* uDotShadowGate * (present * 0.55);
|
|
369
|
+
|
|
370
|
+
// 7. The TECHNICOLOR read (Move 3) — core gold, weld coral (the multiplicative HDR specular
|
|
371
|
+
// pop), base lattice amber; the floor dots carry chroma.
|
|
372
|
+
float bright = (uDotBrightFloor + (1.0 - uDotBrightFloor) * core + uDotBloom * influence * 0.6)
|
|
373
|
+
* (1.0 + uWeldSpecular * weld) * twinkle;
|
|
374
|
+
float tone = clamp(mix(1.0 - core, 0.5, weld), 0.0, 1.0);
|
|
257
375
|
vec3 oklch = samplePaletteOklch(tone);
|
|
258
|
-
oklch.x = clamp(oklch.x * clamp(bright, 0.0, 1.
|
|
376
|
+
oklch.x = clamp(oklch.x * clamp(bright, 0.0, 1.8), 0.0, 1.0);
|
|
259
377
|
vec3 lin = oklabToLinearSrgb(oklchToOklab(gamutClampOklch(oklch)));
|
|
260
378
|
vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
|
|
261
379
|
|
|
262
|
-
float alpha = dot *
|
|
263
|
-
if (alpha < 0.002) discard;
|
|
380
|
+
float alpha = dot * present * twinkle;
|
|
381
|
+
if (alpha < 0.002 && shadow < 0.002) discard;
|
|
264
382
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
383
|
+
vec3 shadowRgb = vec3(0.10, 0.05, 0.02);
|
|
384
|
+
vec3 outRgb = rgb * alpha + shadowRgb * shadow * (1.0 - alpha);
|
|
385
|
+
float outA = alpha + shadow * (1.0 - alpha);
|
|
386
|
+
fragColor = vec4(outRgb, outA);
|
|
387
|
+
}`, J = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition * 0.5 + 0.5;\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", te = "#version 300 es\nprecision highp float;\nin vec2 vUv;\nout vec4 fragColor;\nuniform float uGroundTime;\nvoid main() {\n float d1 = 0.5 + 0.5 * sin(uGroundTime * 0.11 + vUv.x * 2.1);\n float d2 = 0.5 + 0.5 * sin(uGroundTime * 0.07 - vUv.y * 1.7 + 1.3);\n vec3 amber = vec3(0.99, 0.86, 0.62);\n vec3 coral = vec3(0.95, 0.62, 0.42);\n vec3 deep = vec3(0.86, 0.50, 0.30);\n vec3 g = mix(deep, coral, d1);\n vec3 rgb = mix(g, amber, d2 * (1.0 - vUv.y) * 0.8);\n fragColor = vec4(rgb, 1.0);\n}", Y = 64, X = 8, ne = 1, Z = 2, Q = "[GooDotMatrix]";
|
|
388
|
+
function re(e, t) {
|
|
268
389
|
let n = e.createShaderModule({
|
|
269
|
-
label: `${
|
|
270
|
-
code:
|
|
390
|
+
label: `${Q} goo-dot.wgsl`,
|
|
391
|
+
code: H
|
|
271
392
|
}), r = e.createBuffer({
|
|
272
|
-
label: `${
|
|
393
|
+
label: `${Q} field-uniforms`,
|
|
273
394
|
size: y,
|
|
274
|
-
usage:
|
|
395
|
+
usage: Y | X
|
|
275
396
|
}), i = e.createBuffer({
|
|
276
|
-
label: `${
|
|
277
|
-
size:
|
|
278
|
-
usage:
|
|
397
|
+
label: `${Q} dot-uniforms`,
|
|
398
|
+
size: 96,
|
|
399
|
+
usage: Y | X
|
|
279
400
|
}), a = e.createBindGroupLayout({
|
|
280
|
-
label: `${
|
|
401
|
+
label: `${Q} bgl`,
|
|
281
402
|
entries: [{
|
|
282
403
|
binding: 0,
|
|
283
|
-
visibility:
|
|
404
|
+
visibility: ne | Z,
|
|
284
405
|
buffer: { type: "uniform" }
|
|
285
406
|
}, {
|
|
286
407
|
binding: 1,
|
|
287
|
-
visibility:
|
|
408
|
+
visibility: Z,
|
|
409
|
+
buffer: { type: "uniform" }
|
|
410
|
+
}]
|
|
411
|
+
}), o = e.createRenderPipeline({
|
|
412
|
+
label: `${Q} pipeline`,
|
|
413
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [a] }),
|
|
414
|
+
vertex: {
|
|
415
|
+
module: n,
|
|
416
|
+
entryPoint: "vs_main"
|
|
417
|
+
},
|
|
418
|
+
fragment: {
|
|
419
|
+
module: n,
|
|
420
|
+
entryPoint: "fs_main",
|
|
421
|
+
targets: [{
|
|
422
|
+
format: t,
|
|
423
|
+
blend: {
|
|
424
|
+
color: {
|
|
425
|
+
srcFactor: "one",
|
|
426
|
+
dstFactor: "one-minus-src-alpha",
|
|
427
|
+
operation: "add"
|
|
428
|
+
},
|
|
429
|
+
alpha: {
|
|
430
|
+
srcFactor: "one",
|
|
431
|
+
dstFactor: "one-minus-src-alpha",
|
|
432
|
+
operation: "add"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}]
|
|
436
|
+
},
|
|
437
|
+
primitive: { topology: "triangle-list" }
|
|
438
|
+
}), s = e.createBindGroup({
|
|
439
|
+
label: `${Q} bg`,
|
|
440
|
+
layout: a,
|
|
441
|
+
entries: [{
|
|
442
|
+
binding: 0,
|
|
443
|
+
resource: { buffer: r }
|
|
444
|
+
}, {
|
|
445
|
+
binding: 1,
|
|
446
|
+
resource: { buffer: i }
|
|
447
|
+
}]
|
|
448
|
+
}), c = e.createShaderModule({
|
|
449
|
+
label: `${Q} goo-dot-ground.wgsl`,
|
|
450
|
+
code: U
|
|
451
|
+
}), l = e.createBuffer({
|
|
452
|
+
label: `${Q} ground-uniforms`,
|
|
453
|
+
size: 16,
|
|
454
|
+
usage: Y | X
|
|
455
|
+
}), u = e.createBindGroupLayout({
|
|
456
|
+
label: `${Q} ground-bgl`,
|
|
457
|
+
entries: [{
|
|
458
|
+
binding: 0,
|
|
459
|
+
visibility: Z,
|
|
288
460
|
buffer: { type: "uniform" }
|
|
289
461
|
}]
|
|
290
462
|
});
|
|
291
463
|
return {
|
|
292
|
-
pipeline:
|
|
293
|
-
|
|
294
|
-
|
|
464
|
+
pipeline: o,
|
|
465
|
+
bindGroup: s,
|
|
466
|
+
groundPipeline: e.createRenderPipeline({
|
|
467
|
+
label: `${Q} ground-pipeline`,
|
|
468
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [u] }),
|
|
295
469
|
vertex: {
|
|
296
|
-
module:
|
|
470
|
+
module: c,
|
|
297
471
|
entryPoint: "vs_main"
|
|
298
472
|
},
|
|
299
473
|
fragment: {
|
|
300
|
-
module:
|
|
474
|
+
module: c,
|
|
301
475
|
entryPoint: "fs_main",
|
|
302
|
-
targets: [{
|
|
303
|
-
format: t,
|
|
304
|
-
blend: {
|
|
305
|
-
color: {
|
|
306
|
-
srcFactor: "one",
|
|
307
|
-
dstFactor: "one-minus-src-alpha",
|
|
308
|
-
operation: "add"
|
|
309
|
-
},
|
|
310
|
-
alpha: {
|
|
311
|
-
srcFactor: "one",
|
|
312
|
-
dstFactor: "one-minus-src-alpha",
|
|
313
|
-
operation: "add"
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}]
|
|
476
|
+
targets: [{ format: t }]
|
|
317
477
|
},
|
|
318
478
|
primitive: { topology: "triangle-list" }
|
|
319
479
|
}),
|
|
320
|
-
|
|
321
|
-
label: `${
|
|
322
|
-
layout:
|
|
480
|
+
groundBindGroup: e.createBindGroup({
|
|
481
|
+
label: `${Q} ground-bg`,
|
|
482
|
+
layout: u,
|
|
323
483
|
entries: [{
|
|
324
484
|
binding: 0,
|
|
325
|
-
resource: { buffer:
|
|
326
|
-
}, {
|
|
327
|
-
binding: 1,
|
|
328
|
-
resource: { buffer: i }
|
|
485
|
+
resource: { buffer: l }
|
|
329
486
|
}]
|
|
330
487
|
}),
|
|
488
|
+
groundBuffer: l,
|
|
489
|
+
groundScratch: new Float32Array(16 / 4),
|
|
331
490
|
fieldBuffer: r,
|
|
332
491
|
dotBuffer: i,
|
|
333
492
|
fieldScratch: h(),
|
|
334
|
-
dotScratch:
|
|
493
|
+
dotScratch: z()
|
|
335
494
|
};
|
|
336
495
|
}
|
|
337
|
-
function
|
|
338
|
-
let t = a(e, e.VERTEX_SHADER,
|
|
496
|
+
function ie(e) {
|
|
497
|
+
let t = a(e, e.VERTEX_SHADER, K, Q), n = a(e, e.FRAGMENT_SHADER, q, Q), r = i(e, t, n, Q);
|
|
339
498
|
e.useProgram(r);
|
|
340
499
|
let o = e.createVertexArray();
|
|
341
500
|
e.bindVertexArray(o);
|
|
@@ -383,127 +542,183 @@ function Q(e) {
|
|
|
383
542
|
pm: e.getUniformLocation(r, "uDotPointerMode"),
|
|
384
543
|
pa: e.getUniformLocation(r, "uDotPointerActive"),
|
|
385
544
|
cursor: e.getUniformLocation(r, "uDotCursor"),
|
|
386
|
-
bloom: e.getUniformLocation(r, "uDotBloom")
|
|
545
|
+
bloom: e.getUniformLocation(r, "uDotBloom"),
|
|
546
|
+
shadowGate: e.getUniformLocation(r, "uDotShadowGate"),
|
|
547
|
+
presenceFloor: e.getUniformLocation(r, "uPresenceFloor"),
|
|
548
|
+
weldLo: e.getUniformLocation(r, "uWeldLo"),
|
|
549
|
+
weldHi: e.getUniformLocation(r, "uWeldHi"),
|
|
550
|
+
time: e.getUniformLocation(r, "uDotTime"),
|
|
551
|
+
weldSwell: e.getUniformLocation(r, "uWeldSwell"),
|
|
552
|
+
weldSpecular: e.getUniformLocation(r, "uWeldSpecular"),
|
|
553
|
+
flowAmt: e.getUniformLocation(r, "uFlowAmt"),
|
|
554
|
+
latticeSquash: e.getUniformLocation(r, "uLatticeSquash")
|
|
555
|
+
}, v = a(e, e.VERTEX_SHADER, J, Q), y = a(e, e.FRAGMENT_SHADER, te, Q), x = i(e, v, y, Q), S = e.createVertexArray();
|
|
556
|
+
e.bindVertexArray(S);
|
|
557
|
+
let C = e.createBuffer();
|
|
558
|
+
e.bindBuffer(e.ARRAY_BUFFER, C), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
559
|
+
-1,
|
|
560
|
+
-1,
|
|
561
|
+
1,
|
|
562
|
+
-1,
|
|
563
|
+
-1,
|
|
564
|
+
1,
|
|
565
|
+
-1,
|
|
566
|
+
1,
|
|
567
|
+
1,
|
|
568
|
+
-1,
|
|
569
|
+
1,
|
|
570
|
+
1
|
|
571
|
+
]), e.STATIC_DRAW);
|
|
572
|
+
let w = e.getAttribLocation(x, "aPosition");
|
|
573
|
+
e.enableVertexAttribArray(w), e.vertexAttribPointer(w, 2, e.FLOAT, !1, 0, 0);
|
|
574
|
+
let T = {
|
|
575
|
+
prog: x,
|
|
576
|
+
vs: v,
|
|
577
|
+
fs: y,
|
|
578
|
+
vao: S,
|
|
579
|
+
buf: C,
|
|
580
|
+
uTime: e.getUniformLocation(x, "uGroundTime")
|
|
387
581
|
};
|
|
388
|
-
return e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), {
|
|
582
|
+
return e.bindVertexArray(null), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), {
|
|
389
583
|
prog: r,
|
|
390
584
|
vs: t,
|
|
391
585
|
fs: n,
|
|
392
586
|
buf: s,
|
|
393
587
|
vao: o,
|
|
394
588
|
locs: g,
|
|
395
|
-
dU: _
|
|
589
|
+
dU: _,
|
|
590
|
+
ground: T
|
|
396
591
|
};
|
|
397
592
|
}
|
|
398
593
|
//#endregion
|
|
399
594
|
//#region src/components/custom/goo-dot-matrix/composables/useGooDotMatrix.ts
|
|
595
|
+
function ae(e) {
|
|
596
|
+
return .5 + .5 * Math.sin(e / 1e3 * .5);
|
|
597
|
+
}
|
|
598
|
+
var oe = 4200;
|
|
400
599
|
function $(e, i) {
|
|
401
|
-
let { config: a } = i, l = i.mode ?? "live", f = a.field, p =
|
|
402
|
-
function
|
|
403
|
-
let t =
|
|
600
|
+
let { config: a } = i, l = i.mode ?? "live", f = () => a.field, p = a.field, h = D(null), g = m(), y = d(h), b = v(p, "goo-dot"), x = t({ respectReducedMotion: a.respectReducedMotion }), S = R(), C = /* @__PURE__ */ new Map();
|
|
601
|
+
function w(e) {
|
|
602
|
+
let t = C.get(e);
|
|
404
603
|
if (t) return t;
|
|
405
604
|
let n = o(s(e));
|
|
406
|
-
return
|
|
605
|
+
return C.size > 256 && C.clear(), C.set(e, n), n;
|
|
407
606
|
}
|
|
408
|
-
let
|
|
409
|
-
function
|
|
410
|
-
let t =
|
|
411
|
-
|
|
412
|
-
let n = Math.max(0, Math.min(t, 50)), r =
|
|
413
|
-
if (
|
|
414
|
-
let e =
|
|
415
|
-
|
|
607
|
+
let T = a.palette.map((e) => `oklch(${e.L} ${e.C} ${e.h})`), E = T[T.length - 1] ?? "oklch(0.92 0.03 78)", O = null, k = !1, A = 0, j = 0, M = !1;
|
|
608
|
+
function F(e) {
|
|
609
|
+
let t = A ? (e - A) * 1e3 : 16;
|
|
610
|
+
A = e;
|
|
611
|
+
let n = Math.max(0, Math.min(t, 50)), r = O?.reducedMotion ?? !1, i = r || k ? 0 : f().tempo, o = i * n;
|
|
612
|
+
if (j += o, r && !M && (j = oe, M = !0), r || (M = !1), i > 0 && y.active.value) {
|
|
613
|
+
let e = y.pointer.value;
|
|
614
|
+
x.setPointer(e.x * .5 + .5, e.y * .5 + .5);
|
|
416
615
|
}
|
|
417
|
-
if (
|
|
418
|
-
pointerActive:
|
|
419
|
-
clicked:
|
|
420
|
-
idleMs:
|
|
421
|
-
}),
|
|
422
|
-
let e =
|
|
423
|
-
|
|
424
|
-
} else
|
|
425
|
-
return {
|
|
426
|
-
params:
|
|
427
|
-
rgb:
|
|
428
|
-
simTimeMs:
|
|
616
|
+
if (x.tick(i === 0 ? 0 : n), r || g.update({
|
|
617
|
+
pointerActive: y.active.value,
|
|
618
|
+
clicked: y.consumeClick(),
|
|
619
|
+
idleMs: y.idleMs()
|
|
620
|
+
}), g.tick(o), r ? y.rest() : y.tick(o), b.tick(j, g.params.value), a.interactive && y.active.value && i > 0) {
|
|
621
|
+
let e = y.pointer.value;
|
|
622
|
+
S.x = e.x * .5, S.y = e.y * .5, S.active += (1 - S.active) * .2, a.pointerMode, S.bloom = Math.max(S.bloom * .9, x.burst.value);
|
|
623
|
+
} else S.active += (0 - S.active) * .12, S.bloom *= .9;
|
|
624
|
+
return S.timeSec = r ? 0 : j / 1e3, S.latticeSquash = 1 + (r ? 0 : ae(j)) * .08 + S.bloom * .18, {
|
|
625
|
+
params: g.params.value,
|
|
626
|
+
rgb: w(E),
|
|
627
|
+
simTimeMs: j,
|
|
429
628
|
timeSec: e,
|
|
430
|
-
resolveColor:
|
|
431
|
-
rimColor: f.surface.rimColor,
|
|
432
|
-
paletteStops:
|
|
629
|
+
resolveColor: w,
|
|
630
|
+
rimColor: f().surface.rimColor,
|
|
631
|
+
paletteStops: T
|
|
433
632
|
};
|
|
434
633
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
634
|
+
function I() {
|
|
635
|
+
return k ? !1 : !g.isSettled() || !y.isAtRest() || !b.isQuiescent() || S.active > .001 || S.bloom > .001;
|
|
437
636
|
}
|
|
438
|
-
function
|
|
637
|
+
function z(e) {
|
|
439
638
|
return function(t, r, i) {
|
|
440
|
-
let o =
|
|
639
|
+
let o = re(t, i);
|
|
441
640
|
function s() {
|
|
442
|
-
let t = n(), r = e.clientWidth || f.geometry.canvasSize, i = e.clientHeight || f.geometry.canvasSize, a = Math.max(1, Math.round(r * t)), o = Math.max(1, Math.round(i * t));
|
|
641
|
+
let t = n(), r = e.clientWidth || f().geometry.canvasSize, i = e.clientHeight || f().geometry.canvasSize, a = Math.max(1, Math.round(r * t)), o = Math.max(1, Math.round(i * t));
|
|
443
642
|
(e.width !== a || e.height !== o) && (e.width = a, e.height = o);
|
|
444
643
|
}
|
|
445
644
|
function c(i) {
|
|
446
|
-
let s =
|
|
447
|
-
_(o.fieldScratch, e, f,
|
|
645
|
+
let s = F(i);
|
|
646
|
+
_(o.fieldScratch, e, f(), y, b, s), t.queue.writeBuffer(o.fieldBuffer, 0, o.fieldScratch.buffer), B(o.dotScratch, a, {
|
|
448
647
|
w: e.width || 1,
|
|
449
648
|
h: e.height || 1
|
|
450
|
-
}, n(),
|
|
451
|
-
let c = r.getCurrentTexture().createView(),
|
|
452
|
-
|
|
649
|
+
}, n(), S), t.queue.writeBuffer(o.dotBuffer, 0, o.dotScratch.buffer);
|
|
650
|
+
let c = a.fieldGround === "warm", l = r.getCurrentTexture().createView(), u = t.createCommandEncoder({ label: `${Q} frame` });
|
|
651
|
+
if (c) {
|
|
652
|
+
o.groundScratch[0] = s.simTimeMs / 1e3, o.groundScratch[1] = (e.width || 1) / (e.height || 1), t.queue.writeBuffer(o.groundBuffer, 0, o.groundScratch.buffer);
|
|
653
|
+
let n = u.beginRenderPass({ colorAttachments: [{
|
|
654
|
+
view: l,
|
|
655
|
+
clearValue: {
|
|
656
|
+
r: 0,
|
|
657
|
+
g: 0,
|
|
658
|
+
b: 0,
|
|
659
|
+
a: 0
|
|
660
|
+
},
|
|
661
|
+
loadOp: "clear",
|
|
662
|
+
storeOp: "store"
|
|
663
|
+
}] });
|
|
664
|
+
n.setPipeline(o.groundPipeline), n.setBindGroup(0, o.groundBindGroup), n.draw(3, 1, 0, 0), n.end();
|
|
665
|
+
}
|
|
666
|
+
let d = u.beginRenderPass({ colorAttachments: [{
|
|
667
|
+
view: l,
|
|
453
668
|
clearValue: {
|
|
454
669
|
r: 0,
|
|
455
670
|
g: 0,
|
|
456
671
|
b: 0,
|
|
457
672
|
a: 0
|
|
458
673
|
},
|
|
459
|
-
loadOp: "clear",
|
|
674
|
+
loadOp: c ? "load" : "clear",
|
|
460
675
|
storeOp: "store"
|
|
461
676
|
}] });
|
|
462
|
-
|
|
677
|
+
d.setPipeline(o.pipeline), d.setBindGroup(0, o.bindGroup), d.draw(3, 1, 0, 0), d.end(), t.queue.submit([u.finish()]);
|
|
463
678
|
}
|
|
464
679
|
return {
|
|
465
680
|
frame: c,
|
|
466
|
-
shouldContinue:
|
|
681
|
+
shouldContinue: I,
|
|
467
682
|
resize: s,
|
|
468
683
|
teardown: () => {
|
|
469
|
-
o.fieldBuffer.destroy(), o.dotBuffer.destroy();
|
|
684
|
+
o.fieldBuffer.destroy(), o.dotBuffer.destroy(), o.groundBuffer.destroy();
|
|
470
685
|
}
|
|
471
686
|
};
|
|
472
687
|
};
|
|
473
688
|
}
|
|
474
|
-
function
|
|
689
|
+
function V(e) {
|
|
475
690
|
return function(t) {
|
|
476
|
-
let r =
|
|
691
|
+
let r = ie(t), { prog: i, vao: o, locs: s, dU: c } = r;
|
|
477
692
|
function l() {
|
|
478
|
-
let r = n(), i = e.clientWidth || f.geometry.canvasSize, a = e.clientHeight || f.geometry.canvasSize, o = Math.max(1, Math.round(i * r)), s = Math.max(1, Math.round(a * r));
|
|
693
|
+
let r = n(), i = e.clientWidth || f().geometry.canvasSize, a = e.clientHeight || f().geometry.canvasSize, o = Math.max(1, Math.round(i * r)), s = Math.max(1, Math.round(a * r));
|
|
479
694
|
(e.width !== o || e.height !== s) && (e.width = o, e.height = s), t.viewport(0, 0, e.width, e.height);
|
|
480
695
|
}
|
|
481
|
-
function d(
|
|
482
|
-
let
|
|
483
|
-
t.useProgram(i);
|
|
484
|
-
let
|
|
485
|
-
t.uniform1f(c.mode, +(a.variant === "dot-dither")), t.uniform1f(c.pix, Math.max(a.dotPixelSize *
|
|
696
|
+
function d(l) {
|
|
697
|
+
let d = F(l), p = a.fieldGround === "warm";
|
|
698
|
+
p && (t.disable(t.BLEND), t.clearColor(0, 0, 0, 0), t.clear(t.COLOR_BUFFER_BIT), t.useProgram(r.ground.prog), t.bindVertexArray(r.ground.vao), t.uniform1f(r.ground.uTime, d.simTimeMs / 1e3), t.drawArrays(t.TRIANGLES, 0, 6), t.bindVertexArray(null), t.enable(t.BLEND), t.blendFunc(t.ONE, t.ONE_MINUS_SRC_ALPHA)), t.useProgram(i);
|
|
699
|
+
let m = n();
|
|
700
|
+
t.uniform1f(c.mode, +(a.variant === "dot-dither")), t.uniform1f(c.pix, Math.max(a.dotPixelSize * m, 4)), t.uniform1f(c.floor, a.fieldFloor), t.uniform1f(c.bright, a.dotBrightFloor), t.uniform1f(c.min, a.dotMin), t.uniform1f(c.max, a.dotMax), t.uniform1f(c.pr, a.pointerRadius), t.uniform1f(c.pm, L(a.pointerMode)), t.uniform1f(c.pa, a.interactive ? S.active : 0), t.uniform2f(c.cursor, S.x, S.y), t.uniform1f(c.bloom, S.bloom), t.uniform1f(c.shadowGate, +!!p), t.uniform1f(c.presenceFloor, a.presenceFloor), t.uniform1f(c.weldLo, N), t.uniform1f(c.weldHi, P), t.uniform1f(c.time, S.timeSec), t.uniform1f(c.weldSwell, a.weldSwell), t.uniform1f(c.weldSpecular, a.weldSpecular), t.uniform1f(c.flowAmt, a.flowAmt), t.uniform1f(c.latticeSquash, S.latticeSquash), u(t, i, o, s, e, f(), y, b, d);
|
|
486
701
|
}
|
|
487
702
|
return {
|
|
488
703
|
frame: d,
|
|
489
|
-
shouldContinue:
|
|
704
|
+
shouldContinue: I,
|
|
490
705
|
resize: l,
|
|
491
706
|
teardown: () => {
|
|
492
|
-
t.deleteProgram(r.prog), t.deleteShader(r.vs), t.deleteShader(r.fs), t.deleteBuffer(r.buf), t.deleteVertexArray(r.vao);
|
|
707
|
+
t.deleteProgram(r.prog), t.deleteShader(r.vs), t.deleteShader(r.fs), t.deleteBuffer(r.buf), t.deleteVertexArray(r.vao), t.deleteProgram(r.ground.prog), t.deleteShader(r.ground.vs), t.deleteShader(r.ground.fs), t.deleteBuffer(r.ground.buf), t.deleteVertexArray(r.ground.vao);
|
|
493
708
|
}
|
|
494
709
|
};
|
|
495
710
|
};
|
|
496
711
|
}
|
|
497
712
|
c(e, {
|
|
498
|
-
pause: () =>
|
|
499
|
-
resume: () =>
|
|
713
|
+
pause: () => O?.suspend("off-screen-io"),
|
|
714
|
+
resume: () => O?.resume("off-screen-io")
|
|
500
715
|
}, {
|
|
501
716
|
rootMargin: "200px",
|
|
502
717
|
pauseWhenHidden: !1
|
|
503
718
|
});
|
|
504
|
-
let
|
|
719
|
+
let H = () => {
|
|
505
720
|
let t = e.value;
|
|
506
|
-
return t ? (
|
|
721
|
+
return t ? (O || (h.value = t.parentElement ?? t, O = r(t, {
|
|
507
722
|
mode: l,
|
|
508
723
|
contextAttrs: {
|
|
509
724
|
alpha: !0,
|
|
@@ -512,38 +727,38 @@ function $(e, i) {
|
|
|
512
727
|
preserveDrawingBuffer: !1
|
|
513
728
|
},
|
|
514
729
|
respectReducedMotion: a.respectReducedMotion,
|
|
515
|
-
setupWGPU:
|
|
516
|
-
setupGL:
|
|
517
|
-
}),
|
|
730
|
+
setupWGPU: z(t),
|
|
731
|
+
setupGL: V(t)
|
|
732
|
+
}), O.armAsync()), O) : null;
|
|
518
733
|
};
|
|
519
|
-
queueMicrotask(() =>
|
|
520
|
-
let
|
|
734
|
+
queueMicrotask(() => H());
|
|
735
|
+
let U = {
|
|
521
736
|
get backend() {
|
|
522
|
-
return
|
|
737
|
+
return H()?.backend ?? "webgpu";
|
|
523
738
|
},
|
|
524
739
|
pause: () => {
|
|
525
|
-
|
|
740
|
+
k = !0, H()?.suspend("manual");
|
|
526
741
|
},
|
|
527
742
|
resume: () => {
|
|
528
|
-
|
|
743
|
+
k = !1, H()?.resume("manual");
|
|
529
744
|
},
|
|
530
|
-
wake: () =>
|
|
531
|
-
renderAt: (e) =>
|
|
745
|
+
wake: () => H()?.wake(),
|
|
746
|
+
renderAt: (e) => H()?.renderAt(e),
|
|
532
747
|
get reducedMotion() {
|
|
533
|
-
return
|
|
748
|
+
return O?.reducedMotion ?? !1;
|
|
534
749
|
},
|
|
535
750
|
dispose: () => {
|
|
536
|
-
|
|
751
|
+
x.dispose(), O?.dispose(), O = null;
|
|
537
752
|
}
|
|
538
753
|
};
|
|
539
|
-
return
|
|
754
|
+
return ee(() => U.dispose()), U;
|
|
540
755
|
}
|
|
541
756
|
//#endregion
|
|
542
757
|
//#region src/components/custom/goo-dot-matrix/GooDotMatrix.vue
|
|
543
|
-
var
|
|
758
|
+
var se = /* @__PURE__ */ e(/* @__PURE__ */ w({
|
|
544
759
|
__name: "GooDotMatrix",
|
|
545
760
|
props: {
|
|
546
|
-
config: { default: () =>
|
|
761
|
+
config: { default: () => M },
|
|
547
762
|
paused: {
|
|
548
763
|
type: Boolean,
|
|
549
764
|
default: !1
|
|
@@ -551,8 +766,13 @@ var te = /* @__PURE__ */ e(/* @__PURE__ */ w({
|
|
|
551
766
|
},
|
|
552
767
|
emits: ["update:paused"],
|
|
553
768
|
setup(e, { expose: t }) {
|
|
554
|
-
let n = O("canvasRef"), r = $(n, { config:
|
|
555
|
-
|
|
769
|
+
let n = O("canvasRef"), r = $(n, { config: new Proxy({}, {
|
|
770
|
+
get: (t, n) => Reflect.get(e.config, n),
|
|
771
|
+
has: (t, n) => Reflect.has(e.config, n),
|
|
772
|
+
ownKeys: () => Reflect.ownKeys(e.config),
|
|
773
|
+
getOwnPropertyDescriptor: (t, n) => Reflect.getOwnPropertyDescriptor(e.config, n)
|
|
774
|
+
}) });
|
|
775
|
+
k(() => e.config, () => r.wake(), { deep: !0 }), k(() => e.paused, (e) => e ? r.pause() : r.resume(), { immediate: !0 });
|
|
556
776
|
let i = x(() => {
|
|
557
777
|
let t = e.config.background;
|
|
558
778
|
if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
|
|
@@ -562,7 +782,7 @@ var te = /* @__PURE__ */ e(/* @__PURE__ */ w({
|
|
|
562
782
|
resume: r.resume,
|
|
563
783
|
wake: r.wake,
|
|
564
784
|
renderAt: r.renderAt
|
|
565
|
-
}), (e, t) => (
|
|
785
|
+
}), (e, t) => (E(), S("div", {
|
|
566
786
|
class: "goo-dot-matrix-wrapper",
|
|
567
787
|
style: T(i.value ? { background: i.value } : void 0)
|
|
568
788
|
}, [C("canvas", {
|
|
@@ -573,19 +793,19 @@ var te = /* @__PURE__ */ e(/* @__PURE__ */ w({
|
|
|
573
793
|
"data-testid": "goo-dot-matrix-canvas"
|
|
574
794
|
}, null, 512)], 4));
|
|
575
795
|
}
|
|
576
|
-
}), [["__scopeId", "data-v-
|
|
796
|
+
}), [["__scopeId", "data-v-8b833d12"]]);
|
|
577
797
|
//#endregion
|
|
578
798
|
//#region src/components/custom/goo-dot-matrix/composables/gooDotLattice.ts
|
|
579
|
-
function
|
|
799
|
+
function ce(e, t, n) {
|
|
580
800
|
let r = Math.max(t, 1), i = e % r, a = Math.floor(e / r), o = (r - 1) / 2;
|
|
581
801
|
return {
|
|
582
802
|
x: (i - o) * n,
|
|
583
803
|
y: (a - o) * n
|
|
584
804
|
};
|
|
585
805
|
}
|
|
586
|
-
function
|
|
806
|
+
function le(e) {
|
|
587
807
|
let t = Math.max(e, 1);
|
|
588
808
|
return t * t;
|
|
589
809
|
}
|
|
590
810
|
//#endregion
|
|
591
|
-
export {
|
|
811
|
+
export { M as DEFAULT_GOO_DOT_CONFIG, se as GooDotMatrix, A as MIN_DOT_PIXEL_SIZE, j as WARM_IDENTITY_PALETTE, l as fibonacciDot, ce as gridOrigin, le as latticeInstanceCount, $ as useGooDotMatrix };
|