@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/paper-grid.js
CHANGED
|
@@ -1,139 +1,28 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import { t } from "./usePointerVelocityField-
|
|
3
|
-
import { n, o as r } from "./procedural-color.wgsl-
|
|
4
|
-
import { t as i } from "./flow.glsl-
|
|
5
|
-
import { a, t as o } from "./useGpuSubstrate-
|
|
6
|
-
import { c as s, t as c } from "./color-
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
Math.PI * 2;
|
|
10
|
-
var b = .012;
|
|
11
|
-
function x(e, t) {
|
|
12
|
-
let n = e * .1031 % 1, r = t * .1031 % 1, i = e * .1031 % 1;
|
|
13
|
-
n < 0 && (n += 1), r < 0 && (r += 1), i < 0 && (i += 1);
|
|
14
|
-
let a = n * (r + 33.33) + r * (i + 33.33) + i * (n + 33.33);
|
|
15
|
-
n += a, r += a, i += a;
|
|
16
|
-
let o = (n + r) * i % 1;
|
|
17
|
-
return o < 0 && (o += 1), o;
|
|
18
|
-
}
|
|
19
|
-
function S(e, t, n) {
|
|
20
|
-
return e + (t - e) * n;
|
|
21
|
-
}
|
|
22
|
-
function C(e, t) {
|
|
23
|
-
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);
|
|
24
|
-
return S(S(c, l, o), S(u, d, o), s);
|
|
25
|
-
}
|
|
26
|
-
function w(e) {
|
|
27
|
-
let t = 0, n = .5, r = 1, i = e.x, a = e.y;
|
|
28
|
-
for (let e = 0; e < 3; e++) {
|
|
29
|
-
t += n * C(i * r, a * r);
|
|
30
|
-
let e = .8 * i - .6 * a, o = .6 * i + .8 * a;
|
|
31
|
-
i = e, a = o, r *= 2, n *= .5;
|
|
32
|
-
}
|
|
33
|
-
return t;
|
|
34
|
-
}
|
|
35
|
-
function T(e) {
|
|
36
|
-
let t = w({
|
|
37
|
-
x: e.x + b,
|
|
38
|
-
y: e.y
|
|
39
|
-
}) - w({
|
|
40
|
-
x: e.x - b,
|
|
41
|
-
y: e.y
|
|
42
|
-
}), n = w({
|
|
43
|
-
x: e.x,
|
|
44
|
-
y: e.y + b
|
|
45
|
-
}) - w({
|
|
46
|
-
x: e.x,
|
|
47
|
-
y: e.y - b
|
|
48
|
-
}), r = t / (2 * b);
|
|
49
|
-
return {
|
|
50
|
-
x: n / (2 * b),
|
|
51
|
-
y: -r
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function E(e, t, n, r, i, a, o) {
|
|
55
|
-
let s = T({
|
|
56
|
-
x: e.x * n + t * r,
|
|
57
|
-
y: e.y * n + t * r
|
|
58
|
-
}), c = T({
|
|
59
|
-
x: e.x * i - t * a,
|
|
60
|
-
y: e.y * i - t * a
|
|
61
|
-
});
|
|
62
|
-
return {
|
|
63
|
-
x: s.x * o + c.x * o * .5,
|
|
64
|
-
y: s.y * o + c.y * o * .5
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function D(e, t, n, r) {
|
|
68
|
-
let i = e.x - t.x, a = e.y - t.y, o = Math.hypot(i, a), s = Math.max(r, 1e-4), c = n * Math.exp(-(o * o) / (2 * s * s));
|
|
69
|
-
if (o < 1e-5) return {
|
|
70
|
-
x: 0,
|
|
71
|
-
y: 0
|
|
72
|
-
};
|
|
73
|
-
let l = 1 / o;
|
|
74
|
-
return {
|
|
75
|
-
x: i * l * c,
|
|
76
|
-
y: a * l * c
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function O(e, t, n) {
|
|
80
|
-
let r = t - e, i = Math.abs(r) < 1e-9 ? r < 0 ? -1e-9 : 1e-9 : r, a = Math.min(Math.max((n - e) / i, 0), 1);
|
|
81
|
-
return a * a * (3 - 2 * a);
|
|
82
|
-
}
|
|
83
|
-
function k(e, t, n) {
|
|
84
|
-
return Math.min(Math.max(e, t), n);
|
|
85
|
-
}
|
|
86
|
-
function A(e, t, n) {
|
|
87
|
-
let r = 1 - Math.abs((e.x - Math.floor(e.x)) * 2 - 1), i = 1 - Math.abs((e.y - Math.floor(e.y)) * 2 - 1), a = k(t, n.x, .5), o = k(t, n.y, .5), s = n.x * 1.5, c = n.y * 1.5, l = O(a + s, a - s, r), u = O(o + c, o - c, i);
|
|
88
|
-
return l *= k(t / Math.max(a, 1e-6), 0, 1), u *= k(t / Math.max(o, 1e-6), 0, 1), l = S(l, t, k(n.x * 2 - 1, 0, 1)), u = S(u, t, k(n.y * 2 - 1, 0, 1)), Math.max(l, u);
|
|
89
|
-
}
|
|
90
|
-
function j(e, t, n) {
|
|
91
|
-
let r = {
|
|
92
|
-
x: e.x * n.gridScale,
|
|
93
|
-
y: e.y * n.gridScale
|
|
94
|
-
}, i = E(r, t, n.warpScale, n.warpSpeed, n.warpScale2, n.warpSpeed2, n.amplitude);
|
|
95
|
-
r = {
|
|
96
|
-
x: r.x + i.x,
|
|
97
|
-
y: r.y + i.y
|
|
98
|
-
};
|
|
99
|
-
let a = D(r, n.cursor, n.bulgeStrength * n.bulgeMode, n.bulgeRadius);
|
|
100
|
-
r = {
|
|
101
|
-
x: r.x + a.x,
|
|
102
|
-
y: r.y + a.y
|
|
103
|
-
};
|
|
104
|
-
let o = A(r, n.targetWidth, n.uvDeriv), s = Math.max(n.majorEvery, 1), c = {
|
|
105
|
-
x: r.x / s,
|
|
106
|
-
y: r.y / s
|
|
107
|
-
}, l = {
|
|
108
|
-
x: n.uvDeriv.x / s,
|
|
109
|
-
y: n.uvDeriv.y / s
|
|
110
|
-
}, u = A(c, n.targetWidthMajor, l), d = Math.max(o * n.minorAlpha, u * n.majorAlpha);
|
|
111
|
-
return {
|
|
112
|
-
line: d,
|
|
113
|
-
alpha: d * n.fieldAlpha
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function M(e, t) {
|
|
117
|
-
return e / Math.max(t, 1);
|
|
118
|
-
}
|
|
119
|
-
//#endregion
|
|
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 } from "./procedural-color.wgsl-C1Y5PkM6.js";
|
|
4
|
+
import { t as i } from "./flow.glsl-DqEGRpl4.js";
|
|
5
|
+
import { a, t as o } from "./useGpuSubstrate-Ceet70xq.js";
|
|
6
|
+
import { c as s, t as c } from "./color-B9jZdhJX.js";
|
|
7
|
+
import { a as l, d as u, f as d, i as f, n as p, o as m, p as h, r as g, t as _ } from "./paperGrid-CXCSMbZ1.js";
|
|
8
|
+
import { computed as v, createElementBlock as y, createElementVNode as b, defineComponent as x, normalizeStyle as S, onMounted as C, onScopeDispose as w, openBlock as T, reactive as E, useTemplateRef as D, watch as O } from "vue";
|
|
120
9
|
//#region src/components/custom/paper-grid/shaders/paper-grid.wgsl.ts
|
|
121
|
-
var
|
|
10
|
+
var k = `
|
|
122
11
|
const TAU: f32 = 6.283185307179586;
|
|
123
12
|
|
|
124
13
|
// ── Paper-grid uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
|
|
125
14
|
struct PaperGridUniforms {
|
|
126
15
|
// u0: (uTime, uGridScale, uMinorPitch, uMajorEvery)
|
|
127
16
|
u0: vec4<f32>,
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
// warp2: (uAmplitude, uAspect,
|
|
17
|
+
// face: (uFaceAlpha, uFaceRelief, uSquashK, uBaseInset) — the height-lit FACE (re-points the retired warp lane)
|
|
18
|
+
face: vec4<f32>,
|
|
19
|
+
// warp2: (uAmplitude, uAspect, uLightDirX, uLightDirY) — aspect + the cel key-light
|
|
131
20
|
warp2: vec4<f32>,
|
|
132
21
|
// grid: (uTargetWidth, uTargetWidthMajor, uMinorAlpha, uMajorAlpha)
|
|
133
22
|
grid: vec4<f32>,
|
|
134
23
|
// field: (uFieldAlpha, uHasBackground, _pad, _pad)
|
|
135
24
|
field: vec4<f32>,
|
|
136
|
-
// cursor: (uCursorX, uCursorY,
|
|
25
|
+
// cursor: (uCursorX, uCursorY, uSwirlStrength, uSwirlRadius)
|
|
137
26
|
cursor: vec4<f32>,
|
|
138
27
|
// cursor2: (uBulgeMode, uInteractive, _pad, _pad)
|
|
139
28
|
cursor2: vec4<f32>,
|
|
@@ -141,6 +30,16 @@ struct PaperGridUniforms {
|
|
|
141
30
|
line: vec4<f32>,
|
|
142
31
|
// bg: (uBg.rgb (linear), _pad)
|
|
143
32
|
bg: vec4<f32>,
|
|
33
|
+
// wave: (waveDirX, waveDirY, waveK, waveOmega) — the traveling-wave crest
|
|
34
|
+
wave: vec4<f32>,
|
|
35
|
+
// wave2: (waveSigma, twistMax, shearMax, amp) — the cell-twist envelope (amp: spring-eased)
|
|
36
|
+
wave2: vec4<f32>,
|
|
37
|
+
// faceLo: (rose-umber trough .rgb (linear), _pad) — the warm-divergent ramp (FOLD B, 3-stop)
|
|
38
|
+
faceLo: vec4<f32>,
|
|
39
|
+
// faceMid: (ember-amber mid .rgb (linear), _pad)
|
|
40
|
+
faceMid: vec4<f32>,
|
|
41
|
+
// faceHi: (warm-wheat crest .rgb (linear), _pad)
|
|
42
|
+
faceHi: vec4<f32>,
|
|
144
43
|
};
|
|
145
44
|
|
|
146
45
|
@group(0) @binding(0) var<uniform> u: PaperGridUniforms;
|
|
@@ -197,45 +96,13 @@ fn potentialFBM(p: vec2f) -> f32 {
|
|
|
197
96
|
}
|
|
198
97
|
|
|
199
98
|
// The shared divergence-free 2D-curl operator (flow.wgsl.ts — the FIRST WGSL curl consumer).
|
|
99
|
+
${h}
|
|
200
100
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
let dx = potentialFBM(p + vec2f(CURL_EPS, 0.0)) - potentialFBM(p - vec2f(CURL_EPS, 0.0));
|
|
207
|
-
let dy = potentialFBM(p + vec2f(0.0, CURL_EPS)) - potentialFBM(p - vec2f(0.0, CURL_EPS));
|
|
208
|
-
// ψ-gradient is (dx, dy)/(2·eps); the curl rotates it 90°: (∂ψ/∂y, −∂ψ/∂x).
|
|
209
|
-
let g = vec2f(dx, dy) / (2.0 * CURL_EPS);
|
|
210
|
-
return vec2f(g.y, -g.x);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
// ── §3 The "liquid": the global curl-flow domain warp (transcribes paperGrid.ts curlWarp) ──
|
|
215
|
-
// TWO counter-flowing curl terms at different scales/speeds (Alex Harri counter-flow — never
|
|
216
|
-
// visibly loops). A SHALLOW, LOW-frequency warp keeps the lines a clearly-readable grid.
|
|
217
|
-
fn curlWarp(g: vec2f, t: f32) -> vec2f {
|
|
218
|
-
let warpScale = u.warp.x;
|
|
219
|
-
let warpSpeed = u.warp.y;
|
|
220
|
-
let warpScale2 = u.warp.z;
|
|
221
|
-
let warpSpeed2 = u.warp.w;
|
|
222
|
-
let amp = u.warp2.x;
|
|
223
|
-
let a = curlFBM(vec2f(g.x * warpScale + t * warpSpeed, g.y * warpScale + t * warpSpeed));
|
|
224
|
-
let b = curlFBM(vec2f(g.x * warpScale2 - t * warpSpeed2, g.y * warpScale2 - t * warpSpeed2));
|
|
225
|
-
return vec2f(a.x * amp + b.x * amp * 0.5, a.y * amp + b.y * amp * 0.5);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// ── §4 The pointer bulge: a LOCAL Gaussian warp (transcribes paperGrid.ts cursorBulge) ──
|
|
229
|
-
fn cursorBulge(g: vec2f) -> vec2f {
|
|
230
|
-
let cursor = u.cursor.xy;
|
|
231
|
-
let strength = u.cursor.z * u.cursor2.x; // bulgeStrength × bulgeMode (+repel / −attract)
|
|
232
|
-
let radius = max(u.cursor.w, 1e-4);
|
|
233
|
-
let toC = g - cursor;
|
|
234
|
-
let d = length(toC);
|
|
235
|
-
let bulge = strength * exp(-(d * d) / (2.0 * radius * radius));
|
|
236
|
-
if (d < 1e-5) { return vec2f(0.0); }
|
|
237
|
-
return (toC / d) * bulge;
|
|
238
|
-
}
|
|
101
|
+
// The shared traveling-wave CELL-WARP chunk (waveField.wgsl.ts — cellTwist/cursorSwirl/
|
|
102
|
+
// travelingEnvelope; splices AFTER valueNoise + curlFBM are declared). paper-grid + concentric
|
|
103
|
+
// share this EXACTLY — the cell-local twist replaces the retired LINE-warp (the C3 cure: the
|
|
104
|
+
// boxes twist about their own center, the lines stay locally straight).
|
|
105
|
+
${d}
|
|
239
106
|
|
|
240
107
|
// ── §1 The crisp line: Ben Golus derivative-AA grid coverage (transcribes gridCoverage) ──
|
|
241
108
|
// targetWidth is the line half-width in GRID UNITS (lineWidthPx / minorPitchPx); uvDeriv is
|
|
@@ -255,6 +122,18 @@ fn gridCoverage(g: vec2f, targetWidth: f32, uvDeriv: vec2f) -> f32 {
|
|
|
255
122
|
return max(grid2.x, grid2.y);
|
|
256
123
|
}
|
|
257
124
|
|
|
125
|
+
// ── The 3-stop warm-divergent FACE ramp (FOLD B — height-keyed, NOT a 2-point mid-park) ──
|
|
126
|
+
// trough (faceLo) → mid (faceMid) → crest (faceHi), keyed on rampT = mix(shade, h). All stops
|
|
127
|
+
// are warm hue ∈ [20,90] (the teal-navy purge clear by construction). Linear-space stops; the
|
|
128
|
+
// fs_main routes the result through the production OETF (FOLD E).
|
|
129
|
+
fn faceRamp(rampT: f32) -> vec3f {
|
|
130
|
+
let s = clamp(rampT, 0.0, 1.0);
|
|
131
|
+
if (s < 0.5) {
|
|
132
|
+
return mix(u.faceLo.rgb, u.faceMid.rgb, s * 2.0);
|
|
133
|
+
}
|
|
134
|
+
return mix(u.faceMid.rgb, u.faceHi.rgb, (s - 0.5) * 2.0);
|
|
135
|
+
}
|
|
136
|
+
|
|
258
137
|
// Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the
|
|
259
138
|
// viewport from a single 3-vertex draw — no vertex buffer.
|
|
260
139
|
struct VSOut {
|
|
@@ -282,10 +161,20 @@ fn fs_main(in: VSOut) -> @location(0) vec4f {
|
|
|
282
161
|
let t = u.u0.x;
|
|
283
162
|
let gridScale = u.u0.y;
|
|
284
163
|
|
|
285
|
-
// §5 the per-pixel kernel:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
164
|
+
// §5 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.
|
|
165
|
+
// cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally
|
|
166
|
+
// straight — the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells
|
|
167
|
+
// about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).
|
|
168
|
+
let g0 = uv * gridScale;
|
|
169
|
+
// FOLD A — the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)
|
|
170
|
+
// at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.
|
|
171
|
+
let drv = cellDriver(g0, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
|
|
172
|
+
let cc = drv.xy;
|
|
173
|
+
var g = cellTwist(g0, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.y, u.wave2.z, u.wave2.w);
|
|
174
|
+
if (u.cursor2.y > 0.5) {
|
|
175
|
+
// bulgeMode (cursor2.x: +repel / −attract) signs the swirl direction.
|
|
176
|
+
g = cursorSwirl(g, u.cursor.xy, u.cursor.z * u.cursor2.x, u.cursor.w);
|
|
177
|
+
}
|
|
289
178
|
|
|
290
179
|
// The screen-space derivative of g (Golus): length(vec2(dpdx, dpdy)) per axis. fwidth-class
|
|
291
180
|
// derivative reads the ACTUAL backing-store pixel (NOT fwidthFine — Compatibility-Mode safe).
|
|
@@ -300,86 +189,112 @@ fn fs_main(in: VSOut) -> @location(0) vec4f {
|
|
|
300
189
|
let major = gridCoverage(g / me, u.grid.y, dv / me);
|
|
301
190
|
let line = max(minor * u.grid.z, major * u.grid.w);
|
|
302
191
|
|
|
192
|
+
// ── The FACE (BD.W-PAPERGRID-FACE) — height-lit filled cell interior ──────────────────
|
|
193
|
+
// Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the ∇H slope against the
|
|
194
|
+
// fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent
|
|
195
|
+
// ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).
|
|
196
|
+
let h = cellHeight(cc, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
|
|
197
|
+
let grad = faceRelief(cc, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
|
|
198
|
+
let n = normalize(vec3f(-grad * u.face.y, 1.0));
|
|
199
|
+
let shade = clamp(0.5 + dot(n, normalize(vec3f(u.warp2.zw, 1.0))) * 0.5, 0.0, 1.0);
|
|
200
|
+
let inset = u.face.w * (1.0 - u.face.z * h); // squash & stretch
|
|
201
|
+
let face = facePlateau(g, inset, dv);
|
|
202
|
+
let rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B — height-keyed crest
|
|
203
|
+
let faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3f(0.0), vec3f(1.0));
|
|
204
|
+
let faceA = face * u.face.x * u.field.x; // FOLD D — one field-blend scalar
|
|
205
|
+
|
|
303
206
|
let col = clamp(linearToSrgb(u.line.rgb), vec3f(0.0), vec3f(1.0));
|
|
304
207
|
let hasBg = u.field.y;
|
|
305
208
|
if (hasBg > 0.5) {
|
|
306
|
-
// opaque ground:
|
|
209
|
+
// opaque ground: the face fills the cell, the ink over the themed bg, the line on top.
|
|
307
210
|
let bg = clamp(linearToSrgb(u.bg.rgb), vec3f(0.0), vec3f(1.0));
|
|
211
|
+
let base = mix(bg, faceInk, faceA);
|
|
308
212
|
let a = line * u.field.x;
|
|
309
|
-
let outRgb = mix(
|
|
213
|
+
let outRgb = mix(base, col, a);
|
|
310
214
|
return vec4f(outRgb, 1.0);
|
|
311
215
|
}
|
|
312
|
-
// transparent ground: the
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
216
|
+
// transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in
|
|
217
|
+
// PREMULTIPLIED space (the page reads through the gutters). faceAlpha:0 → faceA=0 → the face
|
|
218
|
+
// term vanishes → vec4f(col·line, line) = byte-identical to the HEAD line-only render.
|
|
219
|
+
let linePremult = (col * line) * u.field.x; // line layer (the FieldAlpha global subtlety)
|
|
220
|
+
let lineA = line * u.field.x;
|
|
221
|
+
let facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field.x)
|
|
222
|
+
let outPremult = linePremult + facePremult * (1.0 - lineA);
|
|
223
|
+
let a = lineA + faceA * (1.0 - lineA);
|
|
224
|
+
return vec4f(outPremult, a); // premultiplied over transparent
|
|
225
|
+
}
|
|
226
|
+
`, A = {
|
|
317
227
|
u0: 0,
|
|
318
|
-
|
|
228
|
+
face: 4,
|
|
319
229
|
warp2: 8,
|
|
320
230
|
grid: 12,
|
|
321
231
|
field: 16,
|
|
322
232
|
cursor: 20,
|
|
323
233
|
cursor2: 24,
|
|
324
234
|
line: 28,
|
|
325
|
-
bg: 32
|
|
235
|
+
bg: 32,
|
|
236
|
+
wave: 36,
|
|
237
|
+
wave2: 40,
|
|
238
|
+
faceLo: 44,
|
|
239
|
+
faceMid: 48,
|
|
240
|
+
faceHi: 52
|
|
326
241
|
};
|
|
327
|
-
function
|
|
328
|
-
let e = /* @__PURE__ */ new ArrayBuffer(
|
|
242
|
+
function j() {
|
|
243
|
+
let e = /* @__PURE__ */ new ArrayBuffer(224);
|
|
329
244
|
return {
|
|
330
245
|
buffer: e,
|
|
331
246
|
f32: new Float32Array(e)
|
|
332
247
|
};
|
|
333
248
|
}
|
|
334
|
-
function
|
|
335
|
-
let { f32:
|
|
336
|
-
|
|
337
|
-
let
|
|
338
|
-
|
|
339
|
-
let
|
|
340
|
-
|
|
341
|
-
let
|
|
342
|
-
|
|
343
|
-
let _ = s(t.lineColor);
|
|
344
|
-
if (o[P.line + 0] = _[0], o[P.line + 1] = _[1], o[P.line + 2] = _[2], o[P.line + 3] = 0, t.background === "transparent") o[P.bg + 0] = 0, o[P.bg + 1] = 0, o[P.bg + 2] = 0, o[P.bg + 3] = 0;
|
|
249
|
+
function M(e, t, n, r, i, a, o) {
|
|
250
|
+
let { f32: c } = e, l = f(i, t.cellSize);
|
|
251
|
+
c[A.u0 + 0] = n, c[A.u0 + 1] = l, c[A.u0 + 2] = t.cellSize, c[A.u0 + 3] = t.majorEvery, c[A.face + 0] = t.faceAlpha, c[A.face + 1] = t.faceRelief, c[A.face + 2] = t.squashK, c[A.face + 3] = t.baseInset, c[A.warp2 + 0] = 0, c[A.warp2 + 1] = r, c[A.warp2 + 2] = t.lightDir[0], c[A.warp2 + 3] = t.lightDir[1];
|
|
252
|
+
let u = Math.max(t.cellSize, 1), d = t.lineWidth / u, p = t.lineWidth * 1.6 / u;
|
|
253
|
+
c[A.grid + 0] = d, c[A.grid + 1] = p, c[A.grid + 2] = t.minorAlpha, c[A.grid + 3] = t.majorAlpha;
|
|
254
|
+
let m = t.background === "transparent" ? 0 : 1;
|
|
255
|
+
c[A.field + 0] = t.fieldAlpha, c[A.field + 1] = m, c[A.field + 2] = 0, c[A.field + 3] = 0, c[A.cursor + 0] = a.x, c[A.cursor + 1] = a.y, c[A.cursor + 2] = t.bulgeStrength, c[A.cursor + 3] = t.bulgeRadius, c[A.cursor2 + 0] = t.bulgeMode === "attract" ? -1 : 1, c[A.cursor2 + 1] = +!!t.interactive, c[A.cursor2 + 2] = 0, c[A.cursor2 + 3] = 0;
|
|
256
|
+
let h = s(t.lineColor);
|
|
257
|
+
if (c[A.line + 0] = h[0], c[A.line + 1] = h[1], c[A.line + 2] = h[2], c[A.line + 3] = 0, t.background === "transparent") c[A.bg + 0] = 0, c[A.bg + 1] = 0, c[A.bg + 2] = 0, c[A.bg + 3] = 0;
|
|
345
258
|
else {
|
|
346
259
|
let e = s(t.background);
|
|
347
|
-
|
|
260
|
+
c[A.bg + 0] = e[0], c[A.bg + 1] = e[1], c[A.bg + 2] = e[2], c[A.bg + 3] = 0;
|
|
348
261
|
}
|
|
349
|
-
|
|
262
|
+
c[A.wave + 0] = t.waveDir[0], c[A.wave + 1] = t.waveDir[1], c[A.wave + 2] = t.waveK, c[A.wave + 3] = t.waveOmega, c[A.wave2 + 0] = t.waveSigma, c[A.wave2 + 1] = t.twistMax, c[A.wave2 + 2] = t.shearMax, c[A.wave2 + 3] = o;
|
|
263
|
+
let g = s(t.faceWarmLo), _ = s(t.faceWarmMid), v = s(t.faceWarmHi);
|
|
264
|
+
return c[A.faceLo + 0] = g[0], c[A.faceLo + 1] = g[1], c[A.faceLo + 2] = g[2], c[A.faceLo + 3] = 0, c[A.faceMid + 0] = _[0], c[A.faceMid + 1] = _[1], c[A.faceMid + 2] = _[2], c[A.faceMid + 3] = 0, c[A.faceHi + 0] = v[0], c[A.faceHi + 1] = v[1], c[A.faceHi + 2] = v[2], c[A.faceHi + 3] = 0, e;
|
|
350
265
|
}
|
|
351
266
|
//#endregion
|
|
352
267
|
//#region src/components/custom/paper-grid/composables/paperGridWGPUSetup.ts
|
|
353
|
-
var
|
|
354
|
-
function
|
|
355
|
-
let { canvas: t, config: n, getCursor: r,
|
|
356
|
-
return function(e,
|
|
357
|
-
let
|
|
268
|
+
var N = 64, P = 8, F = 2;
|
|
269
|
+
function I(e) {
|
|
270
|
+
let { canvas: t, config: n, getCursor: r, getAmp: i, shouldContinue: o, onFrame: s } = e;
|
|
271
|
+
return function(e, c, l) {
|
|
272
|
+
let u = e.createShaderModule({
|
|
358
273
|
label: "[PaperGrid] paper-grid.wgsl",
|
|
359
|
-
code:
|
|
360
|
-
}),
|
|
274
|
+
code: k
|
|
275
|
+
}), d = j(), f = e.createBuffer({
|
|
361
276
|
label: "[PaperGrid] uniforms",
|
|
362
|
-
size:
|
|
363
|
-
usage:
|
|
364
|
-
}),
|
|
277
|
+
size: d.buffer.byteLength,
|
|
278
|
+
usage: N | P
|
|
279
|
+
}), p = e.createBindGroupLayout({
|
|
365
280
|
label: "[PaperGrid] bgl",
|
|
366
281
|
entries: [{
|
|
367
282
|
binding: 0,
|
|
368
|
-
visibility:
|
|
283
|
+
visibility: F,
|
|
369
284
|
buffer: { type: "uniform" }
|
|
370
285
|
}]
|
|
371
|
-
}),
|
|
286
|
+
}), m = e.createRenderPipeline({
|
|
372
287
|
label: "[PaperGrid] pipeline",
|
|
373
|
-
layout: e.createPipelineLayout({ bindGroupLayouts: [
|
|
288
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [p] }),
|
|
374
289
|
vertex: {
|
|
375
|
-
module:
|
|
290
|
+
module: u,
|
|
376
291
|
entryPoint: "vs_main"
|
|
377
292
|
},
|
|
378
293
|
fragment: {
|
|
379
|
-
module:
|
|
294
|
+
module: u,
|
|
380
295
|
entryPoint: "fs_main",
|
|
381
296
|
targets: [{
|
|
382
|
-
format:
|
|
297
|
+
format: l,
|
|
383
298
|
blend: {
|
|
384
299
|
color: {
|
|
385
300
|
srcFactor: "one",
|
|
@@ -395,24 +310,24 @@ function B(e) {
|
|
|
395
310
|
}]
|
|
396
311
|
},
|
|
397
312
|
primitive: { topology: "triangle-list" }
|
|
398
|
-
}),
|
|
313
|
+
}), h = e.createBindGroup({
|
|
399
314
|
label: "[PaperGrid] bg",
|
|
400
|
-
layout:
|
|
315
|
+
layout: p,
|
|
401
316
|
entries: [{
|
|
402
317
|
binding: 0,
|
|
403
|
-
resource: { buffer:
|
|
318
|
+
resource: { buffer: f }
|
|
404
319
|
}]
|
|
405
320
|
});
|
|
406
|
-
function
|
|
321
|
+
function g() {
|
|
407
322
|
let e = a(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), o = Math.max(1, Math.round(r * e));
|
|
408
323
|
(t.width !== i || t.height !== o) && (t.width = i, t.height = o);
|
|
409
324
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
412
|
-
let
|
|
413
|
-
|
|
414
|
-
let
|
|
415
|
-
view:
|
|
325
|
+
function _(o) {
|
|
326
|
+
s?.(o);
|
|
327
|
+
let l = t.clientWidth || 320, u = t.clientHeight || 320;
|
|
328
|
+
M(d, n, o, l / Math.max(u, 1), t.height || Math.round(u * a()), r(), i()), e.queue.writeBuffer(f, 0, d.buffer);
|
|
329
|
+
let p = e.createCommandEncoder({ label: "[PaperGrid] frame" }), g = c.getCurrentTexture().createView(), _ = p.beginRenderPass({ colorAttachments: [{
|
|
330
|
+
view: g,
|
|
416
331
|
clearValue: {
|
|
417
332
|
r: 0,
|
|
418
333
|
g: 0,
|
|
@@ -422,21 +337,21 @@ function B(e) {
|
|
|
422
337
|
loadOp: "clear",
|
|
423
338
|
storeOp: "store"
|
|
424
339
|
}] });
|
|
425
|
-
|
|
340
|
+
_.setPipeline(m), _.setBindGroup(0, h), _.draw(3, 1, 0, 0), _.end(), e.queue.submit([p.finish()]);
|
|
426
341
|
}
|
|
427
342
|
return {
|
|
428
|
-
frame:
|
|
429
|
-
shouldContinue:
|
|
430
|
-
resize:
|
|
343
|
+
frame: _,
|
|
344
|
+
shouldContinue: o,
|
|
345
|
+
resize: g,
|
|
431
346
|
teardown: () => {
|
|
432
|
-
|
|
347
|
+
f.destroy();
|
|
433
348
|
}
|
|
434
349
|
};
|
|
435
350
|
};
|
|
436
351
|
}
|
|
437
352
|
//#endregion
|
|
438
353
|
//#region src/components/custom/paper-grid/shaders/paper-grid.glsl.ts
|
|
439
|
-
var
|
|
354
|
+
var L = "#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}", R = `#version 300 es
|
|
440
355
|
precision highp float;
|
|
441
356
|
|
|
442
357
|
#define TAU 6.283185307179586
|
|
@@ -453,13 +368,32 @@ uniform float uAmplitude;
|
|
|
453
368
|
uniform vec4 uGrid; // (targetWidth, targetWidthMajor, minorAlpha, majorAlpha)
|
|
454
369
|
uniform float uFieldAlpha;
|
|
455
370
|
uniform float uHasBackground;
|
|
456
|
-
uniform vec4 uCursor; // (cursorX, cursorY,
|
|
457
|
-
uniform float uBulgeMode; // +1 repel / −1 attract
|
|
371
|
+
uniform vec4 uCursor; // (cursorX, cursorY, swirlStrength, swirlRadius)
|
|
372
|
+
uniform float uBulgeMode; // +1 repel / −1 attract (signs the swirl)
|
|
373
|
+
uniform float uInteractive; // 1 = cursor swirl on
|
|
374
|
+
uniform vec4 uWave; // (waveDirX, waveDirY, waveK, waveOmega)
|
|
375
|
+
uniform vec4 uWave2; // (waveSigma, twistMax, shearMax, amp)
|
|
458
376
|
uniform vec3 uLineColor; // linear-sRGB ink
|
|
459
377
|
uniform vec3 uBg; // linear-sRGB themed bg
|
|
378
|
+
// ── The FACE (BD.W-PAPERGRID-FACE) — the height-lit filled cell interior ──
|
|
379
|
+
uniform vec4 uFace; // (faceAlpha, faceRelief, squashK, baseInset)
|
|
380
|
+
uniform vec2 uLightDir; // the cel key-light direction
|
|
381
|
+
uniform vec3 uFaceLo; // linear-sRGB rose-umber trough (FOLD B, 3-stop)
|
|
382
|
+
uniform vec3 uFaceMid; // linear-sRGB ember-amber mid
|
|
383
|
+
uniform vec3 uFaceHi; // linear-sRGB warm-wheat crest
|
|
460
384
|
|
|
461
385
|
${r}
|
|
462
386
|
|
|
387
|
+
// The 3-stop warm-divergent FACE ramp (FOLD B — height-keyed, NOT a 2-point mid-park). All stops
|
|
388
|
+
// warm hue ∈ [20,90]; linear-space (the OETF runs in main, FOLD E).
|
|
389
|
+
vec3 faceRamp(float rampT) {
|
|
390
|
+
float s = clamp(rampT, 0.0, 1.0);
|
|
391
|
+
if (s < 0.5) {
|
|
392
|
+
return mix(uFaceLo, uFaceMid, s * 2.0);
|
|
393
|
+
}
|
|
394
|
+
return mix(uFaceMid, uFaceHi, (s - 0.5) * 2.0);
|
|
395
|
+
}
|
|
396
|
+
|
|
463
397
|
// The shared divergence-free 2D-curl operator (flow.glsl.ts) — the prototype declares
|
|
464
398
|
// potentialFBM; the host defines its BODY below the splice (GLSL forward-declaration).
|
|
465
399
|
${i}
|
|
@@ -510,28 +444,11 @@ float potentialFBM(vec2 p) {
|
|
|
510
444
|
return v;
|
|
511
445
|
}
|
|
512
446
|
|
|
513
|
-
//
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
float warpSpeed2 = uWarp.w;
|
|
519
|
-
vec2 a = curlFBM(vec2(g.x * warpScale + t * warpSpeed, g.y * warpScale + t * warpSpeed));
|
|
520
|
-
vec2 b = curlFBM(vec2(g.x * warpScale2 - t * warpSpeed2, g.y * warpScale2 - t * warpSpeed2));
|
|
521
|
-
return vec2(a.x * uAmplitude + b.x * uAmplitude * 0.5, a.y * uAmplitude + b.y * uAmplitude * 0.5);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// ── §4 The local pointer bulge (transcribes paperGrid.ts cursorBulge) ──
|
|
525
|
-
vec2 cursorBulge(vec2 g) {
|
|
526
|
-
vec2 cursor = uCursor.xy;
|
|
527
|
-
float strength = uCursor.z * uBulgeMode; // bulgeStrength × bulgeMode (+repel / −attract)
|
|
528
|
-
float radius = max(uCursor.w, 1e-4);
|
|
529
|
-
vec2 toC = g - cursor;
|
|
530
|
-
float d = length(toC);
|
|
531
|
-
float bulge = strength * exp(-(d * d) / (2.0 * radius * radius));
|
|
532
|
-
if (d < 1e-5) return vec2(0.0);
|
|
533
|
-
return (toC / d) * bulge;
|
|
534
|
-
}
|
|
447
|
+
// The shared traveling-wave CELL-WARP chunk (waveField.glsl.ts — cellTwist/cursorSwirl/
|
|
448
|
+
// travelingEnvelope; spliced AFTER valueNoise + potentialFBM bodies + the curlFBM chunk).
|
|
449
|
+
// paper-grid + concentric share this EXACTLY (the C3 cure: the boxes twist about their own
|
|
450
|
+
// center, the lines stay locally straight — never the retired LINE-warp).
|
|
451
|
+
${u}
|
|
535
452
|
|
|
536
453
|
// ── §1 The Ben Golus derivative-AA grid coverage (transcribes paperGrid.ts gridCoverage) ──
|
|
537
454
|
float gridCoverage(vec2 g, float targetWidth, vec2 uvDeriv) {
|
|
@@ -548,10 +465,19 @@ void main() {
|
|
|
548
465
|
float aspect = max(uAspect, 1e-4);
|
|
549
466
|
vec2 uv = vec2(vUv.x * aspect, vUv.y);
|
|
550
467
|
|
|
551
|
-
// §5 the per-pixel kernel:
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
468
|
+
// §5 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.
|
|
469
|
+
// cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally
|
|
470
|
+
// straight — the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells
|
|
471
|
+
// about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).
|
|
472
|
+
vec2 g0 = uv * uGridScale;
|
|
473
|
+
// FOLD A — the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)
|
|
474
|
+
// at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.
|
|
475
|
+
vec3 drv = cellDriver(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
|
|
476
|
+
vec2 cc = drv.xy;
|
|
477
|
+
vec2 g = cellTwist(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.y, uWave2.z, uWave2.w);
|
|
478
|
+
if (uInteractive > 0.5) {
|
|
479
|
+
g = cursorSwirl(g, uCursor.xy, uCursor.z * uBulgeMode, uCursor.w);
|
|
480
|
+
}
|
|
555
481
|
|
|
556
482
|
// The screen-space derivative of g (Golus): length(vec2(dFdx, dFdy)) per axis (the actual
|
|
557
483
|
// backing-store pixel — NOT a CSS sub-pixel, the blur-kill).
|
|
@@ -565,19 +491,41 @@ void main() {
|
|
|
565
491
|
float major = gridCoverage(g / me, uGrid.y, dv / me);
|
|
566
492
|
float line = max(minor * uGrid.z, major * uGrid.w);
|
|
567
493
|
|
|
494
|
+
// ── The FACE (BD.W-PAPERGRID-FACE) — height-lit filled cell interior ──────────────────
|
|
495
|
+
// Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the ∇H slope against the
|
|
496
|
+
// fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent
|
|
497
|
+
// ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).
|
|
498
|
+
float h = cellHeight(cc, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
|
|
499
|
+
vec2 grad = faceRelief(cc, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
|
|
500
|
+
vec3 n = normalize(vec3(-grad * uFace.y, 1.0));
|
|
501
|
+
float shade = clamp(0.5 + dot(n, normalize(vec3(uLightDir, 1.0))) * 0.5, 0.0, 1.0);
|
|
502
|
+
float inset = uFace.w * (1.0 - uFace.z * h); // squash & stretch
|
|
503
|
+
float face = facePlateau(g, inset, dv);
|
|
504
|
+
float rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B — height-keyed crest
|
|
505
|
+
vec3 faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3(0.0), vec3(1.0));
|
|
506
|
+
float faceA = face * uFace.x * uFieldAlpha; // FOLD D — one field-blend scalar
|
|
507
|
+
|
|
568
508
|
vec3 col = clamp(linearToSrgb(uLineColor), vec3(0.0), vec3(1.0));
|
|
569
509
|
if (uHasBackground > 0.5) {
|
|
570
510
|
vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));
|
|
511
|
+
vec3 base = mix(bg, faceInk, faceA);
|
|
571
512
|
float a = line * uFieldAlpha;
|
|
572
|
-
fragColor = vec4(mix(
|
|
513
|
+
fragColor = vec4(mix(base, col, a), 1.0);
|
|
573
514
|
return;
|
|
574
515
|
}
|
|
575
|
-
|
|
576
|
-
|
|
516
|
+
// transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in
|
|
517
|
+
// PREMULTIPLIED space. faceAlpha:0 → faceA=0 → the face term vanishes → vec4(col·line, line) =
|
|
518
|
+
// byte-identical to the HEAD line-only render.
|
|
519
|
+
vec3 linePremult = (col * line) * uFieldAlpha; // line layer (the FieldAlpha subtlety)
|
|
520
|
+
float lineA = line * uFieldAlpha;
|
|
521
|
+
vec3 facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field)
|
|
522
|
+
vec3 outPremult = linePremult + facePremult * (1.0 - lineA);
|
|
523
|
+
float a = lineA + faceA * (1.0 - lineA);
|
|
524
|
+
fragColor = vec4(outPremult, a); // premultiplied over transparent
|
|
577
525
|
}`;
|
|
578
526
|
//#endregion
|
|
579
527
|
//#region src/components/custom/paper-grid/composables/paperGridGLSetup.ts
|
|
580
|
-
function
|
|
528
|
+
function z(e, t, n) {
|
|
581
529
|
let r = e.createShader(t);
|
|
582
530
|
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
583
531
|
let t = e.getShaderInfoLog(r);
|
|
@@ -585,16 +533,16 @@ function U(e, t, n) {
|
|
|
585
533
|
}
|
|
586
534
|
return r;
|
|
587
535
|
}
|
|
588
|
-
function
|
|
589
|
-
let { canvas: t, config: n, getCursor: r,
|
|
536
|
+
function B(e) {
|
|
537
|
+
let { canvas: t, config: n, getCursor: r, getAmp: i, shouldContinue: o, onFrame: c } = e;
|
|
590
538
|
return function(e) {
|
|
591
|
-
let
|
|
592
|
-
if (e.attachShader(
|
|
593
|
-
e.deleteShader(
|
|
594
|
-
let
|
|
595
|
-
e.bindVertexArray(
|
|
596
|
-
let
|
|
597
|
-
e.bindBuffer(e.ARRAY_BUFFER,
|
|
539
|
+
let l = z(e, e.VERTEX_SHADER, L), u = z(e, e.FRAGMENT_SHADER, R), d = e.createProgram();
|
|
540
|
+
if (e.attachShader(d, l), e.attachShader(d, u), e.linkProgram(d), !e.getProgramParameter(d, e.LINK_STATUS)) throw Error(`[PaperGrid] link failed: ${e.getProgramInfoLog(d)}`);
|
|
541
|
+
e.deleteShader(l), e.deleteShader(u);
|
|
542
|
+
let p = e.createVertexArray();
|
|
543
|
+
e.bindVertexArray(p);
|
|
544
|
+
let m = e.createBuffer();
|
|
545
|
+
e.bindBuffer(e.ARRAY_BUFFER, m), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
598
546
|
-1,
|
|
599
547
|
-1,
|
|
600
548
|
3,
|
|
@@ -602,144 +550,169 @@ function W(e) {
|
|
|
602
550
|
-1,
|
|
603
551
|
3
|
|
604
552
|
]), e.STATIC_DRAW);
|
|
605
|
-
let
|
|
606
|
-
e.enableVertexAttribArray(
|
|
607
|
-
let
|
|
608
|
-
function
|
|
553
|
+
let h = e.getAttribLocation(d, "aPosition");
|
|
554
|
+
e.enableVertexAttribArray(h), e.vertexAttribPointer(h, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
|
|
555
|
+
let g = (t) => e.getUniformLocation(d, t), _ = g("uTime"), v = g("uGridScale"), y = g("uMajorEvery"), b = g("uAspect"), x = g("uGrid"), S = g("uFieldAlpha"), C = g("uHasBackground"), w = g("uCursor"), T = g("uBulgeMode"), E = g("uInteractive"), D = g("uWave"), O = g("uWave2"), k = g("uLineColor"), A = g("uBg"), j = g("uFace"), M = g("uLightDir"), N = g("uFaceLo"), P = g("uFaceMid"), F = g("uFaceHi");
|
|
556
|
+
function I() {
|
|
609
557
|
let n = a(), r = t.clientWidth || 320, i = t.clientHeight || 320, o = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
|
|
610
558
|
(t.width !== o || t.height !== s) && (t.width = o, t.height = s), e.viewport(0, 0, t.width, t.height);
|
|
611
559
|
}
|
|
612
|
-
function
|
|
613
|
-
|
|
614
|
-
let
|
|
615
|
-
e.useProgram(
|
|
616
|
-
let
|
|
617
|
-
e.uniform4f(
|
|
618
|
-
let
|
|
619
|
-
e.uniform4f(
|
|
620
|
-
let
|
|
621
|
-
e.uniform4f(
|
|
622
|
-
let
|
|
623
|
-
if (e.uniform3f(
|
|
560
|
+
function B(o) {
|
|
561
|
+
c?.(o);
|
|
562
|
+
let l = t.clientWidth || 320, u = t.clientHeight || 320, m = l / Math.max(u, 1), h = f(t.height || Math.round(u * a()), n.cellSize);
|
|
563
|
+
e.useProgram(d), e.bindVertexArray(p), 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(_, o), e.uniform1f(v, h), e.uniform1f(y, n.majorEvery), e.uniform1f(b, m), e.uniform4f(D, n.waveDir[0], n.waveDir[1], n.waveK, n.waveOmega), e.uniform4f(O, n.waveSigma, n.twistMax, n.shearMax, i()), e.uniform1f(E, +!!n.interactive);
|
|
564
|
+
let g = Math.max(n.cellSize, 1), I = n.lineWidth / g, L = n.lineWidth * 1.6 / g;
|
|
565
|
+
e.uniform4f(x, I, L, n.minorAlpha, n.majorAlpha), e.uniform1f(S, n.fieldAlpha);
|
|
566
|
+
let R = r();
|
|
567
|
+
e.uniform4f(w, R.x, R.y, n.bulgeStrength, n.bulgeRadius), e.uniform1f(T, n.bulgeMode === "attract" ? -1 : 1);
|
|
568
|
+
let z = s(n.lineColor);
|
|
569
|
+
e.uniform3f(k, z[0], z[1], z[2]), e.uniform4f(j, n.faceAlpha, n.faceRelief, n.squashK, n.baseInset), e.uniform2f(M, n.lightDir[0], n.lightDir[1]);
|
|
570
|
+
let B = s(n.faceWarmLo), V = s(n.faceWarmMid), H = s(n.faceWarmHi);
|
|
571
|
+
if (e.uniform3f(N, B[0], B[1], B[2]), e.uniform3f(P, V[0], V[1], V[2]), e.uniform3f(F, H[0], H[1], H[2]), n.background === "transparent") e.uniform1f(C, 0), e.uniform3f(A, 0, 0, 0);
|
|
624
572
|
else {
|
|
625
573
|
e.uniform1f(C, 1);
|
|
626
574
|
let t = s(n.background);
|
|
627
|
-
e.uniform3f(
|
|
575
|
+
e.uniform3f(A, t[0], t[1], t[2]);
|
|
628
576
|
}
|
|
629
577
|
e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
|
|
630
578
|
}
|
|
631
579
|
return {
|
|
632
|
-
frame:
|
|
633
|
-
shouldContinue:
|
|
634
|
-
resize:
|
|
580
|
+
frame: B,
|
|
581
|
+
shouldContinue: o,
|
|
582
|
+
resize: I,
|
|
635
583
|
teardown: () => {
|
|
636
|
-
e.deleteProgram(
|
|
584
|
+
e.deleteProgram(d), e.deleteVertexArray(p), e.deleteBuffer(m);
|
|
637
585
|
}
|
|
638
586
|
};
|
|
639
587
|
};
|
|
640
588
|
}
|
|
641
589
|
//#endregion
|
|
642
590
|
//#region src/components/custom/paper-grid/composables/usePaperGrid.ts
|
|
643
|
-
function
|
|
591
|
+
function V(e, n) {
|
|
644
592
|
let { config: r } = n, i = n.mode ?? "live", s = t({ respectReducedMotion: r.respectReducedMotion }), c = {
|
|
645
593
|
x: 1e6,
|
|
646
594
|
y: 1e6
|
|
647
|
-
}, l = () => c, u = 0, d = null;
|
|
648
|
-
function
|
|
649
|
-
let n =
|
|
650
|
-
if (
|
|
595
|
+
}, l = () => c, u = 0, d = () => u, p = 0, m = null;
|
|
596
|
+
function h(t) {
|
|
597
|
+
let n = p > 0 ? (t - p) * 1e3 : 16.7;
|
|
598
|
+
if (p = t, s.tick(n), m?.reducedMotion ? u = 0 : (u += (1.06 - u) * .04, u > 1 && (u = 1 + (u - 1) * .85)), !r.interactive || !s.active.value) {
|
|
651
599
|
c = {
|
|
652
600
|
x: 1e6,
|
|
653
601
|
y: 1e6
|
|
654
602
|
};
|
|
655
603
|
return;
|
|
656
604
|
}
|
|
657
|
-
let i = e.value, o = i?.clientHeight || 320, l = (i?.clientWidth || 320) / Math.max(o, 1), d =
|
|
605
|
+
let i = e.value, o = i?.clientHeight || 320, l = (i?.clientWidth || 320) / Math.max(o, 1), d = f(i?.height || Math.round(o * a()) || 320, r.cellSize), h = s.smoothedPosition.value, g = s.velocity.value, _ = s.burst.value, v = (h.x * 2 - 1) * l, y = -(h.y * 2 - 1), b = .12 + Math.min(.4, _);
|
|
658
606
|
c = {
|
|
659
|
-
x: (
|
|
660
|
-
y: (
|
|
607
|
+
x: (v + g.x * b) * d,
|
|
608
|
+
y: (y - g.y * b) * d
|
|
661
609
|
};
|
|
662
610
|
}
|
|
663
|
-
let
|
|
664
|
-
s.onPointerEnter(), r.interactive &&
|
|
665
|
-
},
|
|
666
|
-
s.onPointerMove(e), r.interactive &&
|
|
667
|
-
},
|
|
668
|
-
function
|
|
669
|
-
let t =
|
|
670
|
-
t.addEventListener("pointermove",
|
|
611
|
+
let g = () => {
|
|
612
|
+
s.onPointerEnter(), r.interactive && m?.wake();
|
|
613
|
+
}, _ = (e) => {
|
|
614
|
+
s.onPointerMove(e), r.interactive && m?.wake();
|
|
615
|
+
}, v = (e) => e.parentElement ?? e;
|
|
616
|
+
function y(e) {
|
|
617
|
+
let t = v(e);
|
|
618
|
+
t.addEventListener("pointermove", _), t.addEventListener("pointerenter", g), t.addEventListener("pointerleave", s.onPointerLeave);
|
|
671
619
|
}
|
|
672
|
-
function
|
|
673
|
-
let t =
|
|
674
|
-
t.removeEventListener("pointermove",
|
|
620
|
+
function b(e) {
|
|
621
|
+
let t = v(e);
|
|
622
|
+
t.removeEventListener("pointermove", _), t.removeEventListener("pointerenter", g), t.removeEventListener("pointerleave", s.onPointerLeave);
|
|
675
623
|
}
|
|
676
|
-
let
|
|
624
|
+
let x = () => {
|
|
677
625
|
let t = e.value;
|
|
678
|
-
return t ? (
|
|
626
|
+
return t ? (m || (y(t), m = o(t, {
|
|
679
627
|
mode: i,
|
|
680
628
|
respectReducedMotion: r.respectReducedMotion,
|
|
681
|
-
setupWGPU:
|
|
629
|
+
setupWGPU: I({
|
|
682
630
|
canvas: t,
|
|
683
631
|
config: r,
|
|
684
632
|
getCursor: l,
|
|
633
|
+
getAmp: d,
|
|
685
634
|
shouldContinue: () => !0,
|
|
686
|
-
onFrame:
|
|
635
|
+
onFrame: h
|
|
687
636
|
}),
|
|
688
|
-
setupGL:
|
|
637
|
+
setupGL: B({
|
|
689
638
|
canvas: t,
|
|
690
639
|
config: r,
|
|
691
640
|
getCursor: l,
|
|
641
|
+
getAmp: d,
|
|
692
642
|
shouldContinue: () => !0,
|
|
693
|
-
onFrame:
|
|
643
|
+
onFrame: h
|
|
694
644
|
})
|
|
695
|
-
}),
|
|
645
|
+
}), m.armAsync()), m) : null;
|
|
696
646
|
};
|
|
697
|
-
queueMicrotask(() =>
|
|
698
|
-
let
|
|
647
|
+
queueMicrotask(() => x());
|
|
648
|
+
let S = {
|
|
699
649
|
get backend() {
|
|
700
|
-
return
|
|
650
|
+
return x()?.backend ?? "webgpu";
|
|
701
651
|
},
|
|
702
|
-
pause: () =>
|
|
703
|
-
resume: () =>
|
|
704
|
-
wake: () =>
|
|
705
|
-
renderAt: (e) =>
|
|
652
|
+
pause: () => x()?.suspend("manual"),
|
|
653
|
+
resume: () => x()?.resume("manual"),
|
|
654
|
+
wake: () => x()?.wake(),
|
|
655
|
+
renderAt: (e) => x()?.renderAt(e),
|
|
706
656
|
get reducedMotion() {
|
|
707
|
-
return
|
|
657
|
+
return m?.reducedMotion ?? !1;
|
|
708
658
|
},
|
|
709
659
|
dispose: () => {
|
|
710
660
|
let t = e.value;
|
|
711
|
-
t &&
|
|
661
|
+
t && b(t), s.dispose(), m?.dispose();
|
|
712
662
|
}
|
|
713
663
|
};
|
|
714
|
-
return
|
|
664
|
+
return w(() => S.dispose()), S;
|
|
715
665
|
}
|
|
716
666
|
//#endregion
|
|
717
667
|
//#region src/components/custom/paper-grid/constants.ts
|
|
718
|
-
var
|
|
668
|
+
var H = 16, U = {
|
|
719
669
|
L: .62,
|
|
720
670
|
C: .05,
|
|
721
671
|
h: 62
|
|
722
|
-
},
|
|
672
|
+
}, W = {
|
|
673
|
+
L: .44,
|
|
674
|
+
C: .07,
|
|
675
|
+
h: 32
|
|
676
|
+
}, G = {
|
|
677
|
+
L: .66,
|
|
678
|
+
C: .12,
|
|
679
|
+
h: 58
|
|
680
|
+
}, K = {
|
|
681
|
+
L: .9,
|
|
682
|
+
C: .1,
|
|
683
|
+
h: 84
|
|
684
|
+
}, q = {
|
|
723
685
|
cellSize: 64,
|
|
724
686
|
majorEvery: 5,
|
|
725
|
-
minorAlpha: .
|
|
726
|
-
majorAlpha: .
|
|
687
|
+
minorAlpha: .12,
|
|
688
|
+
majorAlpha: .22,
|
|
727
689
|
lineWidth: 1,
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
690
|
+
twistMax: .62,
|
|
691
|
+
shearMax: .26,
|
|
692
|
+
waveDir: [.92, .39],
|
|
693
|
+
waveK: .62,
|
|
694
|
+
waveOmega: 1.05,
|
|
695
|
+
waveSigma: .42,
|
|
731
696
|
fieldAlpha: 1,
|
|
732
|
-
bulgeStrength: .
|
|
733
|
-
bulgeRadius:
|
|
697
|
+
bulgeStrength: .9,
|
|
698
|
+
bulgeRadius: 2.5,
|
|
734
699
|
bulgeMode: "repel",
|
|
735
|
-
lineColor:
|
|
700
|
+
lineColor: U,
|
|
701
|
+
faceAlpha: 0,
|
|
702
|
+
faceRelief: 2.6,
|
|
703
|
+
squashK: .42,
|
|
704
|
+
baseInset: .14,
|
|
705
|
+
faceWarmLo: W,
|
|
706
|
+
faceWarmMid: G,
|
|
707
|
+
faceWarmHi: K,
|
|
708
|
+
lightDir: [.6, .8],
|
|
736
709
|
background: "transparent",
|
|
737
710
|
interactive: !0,
|
|
738
711
|
respectReducedMotion: !0
|
|
739
|
-
},
|
|
712
|
+
}, J = /* @__PURE__ */ e(/* @__PURE__ */ x({
|
|
740
713
|
__name: "PaperGrid",
|
|
741
714
|
props: {
|
|
742
|
-
config: { default: () =>
|
|
715
|
+
config: { default: () => q },
|
|
743
716
|
paused: {
|
|
744
717
|
type: Boolean,
|
|
745
718
|
default: !1
|
|
@@ -747,9 +720,9 @@ var K = 16, q = {
|
|
|
747
720
|
},
|
|
748
721
|
emits: ["update:paused"],
|
|
749
722
|
setup(e, { expose: t }) {
|
|
750
|
-
let n =
|
|
751
|
-
|
|
752
|
-
if (e.config.lineColor ===
|
|
723
|
+
let n = D("wrapperRef"), r = D("canvasRef"), i = E({ ...e.config });
|
|
724
|
+
O(() => e.config, (e) => Object.assign(i, e), { deep: !0 }), C(() => {
|
|
725
|
+
if (e.config.lineColor === q.lineColor) {
|
|
753
726
|
let e = n.value;
|
|
754
727
|
if (e) {
|
|
755
728
|
let t = getComputedStyle(e).getPropertyValue("--foreground").trim();
|
|
@@ -759,9 +732,9 @@ var K = 16, q = {
|
|
|
759
732
|
}
|
|
760
733
|
}
|
|
761
734
|
});
|
|
762
|
-
let a =
|
|
763
|
-
|
|
764
|
-
let o =
|
|
735
|
+
let a = V(r, { config: i });
|
|
736
|
+
O(() => e.paused, (e) => e ? a.pause() : a.resume(), { immediate: !0 });
|
|
737
|
+
let o = v(() => {
|
|
765
738
|
let t = e.config.background;
|
|
766
739
|
if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
|
|
767
740
|
});
|
|
@@ -770,12 +743,12 @@ var K = 16, q = {
|
|
|
770
743
|
resume: a.resume,
|
|
771
744
|
wake: a.wake,
|
|
772
745
|
renderAt: a.renderAt
|
|
773
|
-
}), (e, t) => (
|
|
746
|
+
}), (e, t) => (T(), y("div", {
|
|
774
747
|
ref_key: "wrapperRef",
|
|
775
748
|
ref: n,
|
|
776
749
|
class: "paper-grid-wrapper",
|
|
777
|
-
style:
|
|
778
|
-
}, [
|
|
750
|
+
style: S(o.value ? { background: o.value } : void 0)
|
|
751
|
+
}, [b("canvas", {
|
|
779
752
|
ref_key: "canvasRef",
|
|
780
753
|
ref: r,
|
|
781
754
|
class: "paper-grid-canvas",
|
|
@@ -785,4 +758,4 @@ var K = 16, q = {
|
|
|
785
758
|
}
|
|
786
759
|
}), [["__scopeId", "data-v-fc108d7d"]]);
|
|
787
760
|
//#endregion
|
|
788
|
-
export {
|
|
761
|
+
export { _ as CURL_EPS, q as DEFAULT_PAPER_GRID_CONFIG, K as FACE_WARM_HI, W as FACE_WARM_LO, G as FACE_WARM_MID, H as PAPER_GRID_MAX_MAJOR_EVERY, J as PaperGrid, U as WARM_IDENTITY_INK, p as curlFBM, g as gridCoverage, f as gridScaleFor, l as potentialFBM, m as samplePaperGrid, V as usePaperGrid };
|