@mkbabb/glass-ui 4.0.0 → 4.1.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/README.md +3 -1
- package/dist/CardAction-8whJrLWt.js +268 -0
- package/dist/{CommandShortcut-DdtWXxOK.js → CommandShortcut-D3yxgHNn.js} +25 -14
- package/dist/ConfiguratorRow-CaP7U3ZA.js +143 -0
- package/dist/ContextMenuContent-B3ZsheLV.js +90 -0
- package/dist/{ContextMenuSubContent-B0Vs6atR.js → ContextMenuSubContent-DDRID3qC.js} +28 -33
- package/dist/{DataTable-C464Zbqd.js → DataTable-Bc9kUtu_.js} +4 -4
- package/dist/{DialogContent-DDE6pQBU.js → DialogContent-6JtTB5x2.js} +11 -8
- package/dist/DialogFooter-9phqcRIS.js +80 -0
- package/dist/DialogScrollContent-TTuovQst.js +93 -0
- package/dist/{FadingScroll-DwNnvKMs.js → FadingScroll-DLRbH5Xr.js} +1 -1
- package/dist/HoverCardContent-Bel1gdLZ.js +88 -0
- package/dist/{HoverPopover-Dpzwvc4t.js → HoverPopover-BcIxvyqZ.js} +2 -2
- package/dist/{IconChip-BDw1j5mu.js → IconChip-DhbdGdFQ.js} +2 -1
- package/dist/{IconTooltip-DSjasZIt.js → IconTooltip-B0zimd2H.js} +1 -1
- package/dist/Input-Cg9DF62r.js +57 -0
- package/dist/{MetricBadge-BpC0R_Ec.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-CphK7AAm.js +43 -0
- package/dist/NumberFieldContent-D8cXeyO4.js +140 -0
- package/dist/PagerDots-Cjx96la-.js +98 -0
- package/dist/{PopoverContent-BTorlp--.js → PopoverContent-DL7E6vJP.js} +4 -4
- package/dist/{Progress-hAT4gqGH.js → Progress-CnqB7gLm.js} +4 -4
- package/dist/{ScrollingText-CUVFTWk2.js → ScrollingText-CTZbA_cG.js} +2 -2
- package/dist/{SelectScrollDownButton-C1jb3b3K.js → SelectScrollDownButton-DAKCBEdW.js} +65 -61
- package/dist/{SelectSeparator-DK2y1Bun.js → SelectSeparator-C2UGOkXF.js} +1 -1
- package/dist/Separator-DQcwC2TR.js +44 -0
- package/dist/Switch-B8RscmRu.js +49 -0
- package/dist/Toaster-D9qIHjBI.js +274 -0
- package/dist/ToggleGroupItem-BLtr3TJq.js +170 -0
- package/dist/TooltipProvider-BJ_Y5EGX.js +109 -0
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +21 -33
- package/dist/api/types-extra.d.ts +37 -0
- package/dist/api.js +1 -1
- package/dist/aurora.js +1231 -260
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +98 -0
- package/dist/button-5dY1Dvhd.js +125 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -3
- package/dist/card.js +2 -2
- package/dist/carousel.js +93 -110
- package/dist/collapsible.js +1 -1
- package/dist/color-Cs0-oxYL.js +116 -0
- package/dist/color.js +2 -2
- package/dist/command.js +1 -1
- package/dist/compile-nZ1xVYTp.js +19 -0
- package/dist/completion-seal.d.ts +1 -0
- package/dist/completion-seal.js +89 -0
- package/dist/components/custom/aurora/Aurora.vue.d.ts +10 -5
- package/dist/components/custom/aurora/composables/atoms-fields.d.ts +39 -0
- package/dist/components/custom/aurora/composables/auroraFallbackGround.d.ts +108 -0
- package/dist/components/custom/aurora/composables/color.d.ts +13 -0
- package/dist/components/custom/aurora/composables/frameLoop.d.ts +9 -0
- package/dist/components/custom/aurora/composables/runtime.d.ts +31 -0
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +5 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +60 -0
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +37 -0
- package/dist/components/custom/aurora/constants/budget.d.ts +21 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +20 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +77 -18
- package/dist/components/custom/aurora/constants/shaders/aurora-mediums.wgsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/oil-modes.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/procedural-color.wgsl.d.ts +4 -0
- package/dist/components/custom/aurora/index.d.ts +2 -1
- package/dist/components/custom/border-progress/BorderProgress.vue.d.ts +46 -0
- package/dist/components/custom/border-progress/composables/spectrum-walk.d.ts +25 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +18 -0
- package/dist/components/custom/border-progress/constants.d.ts +59 -0
- package/dist/components/custom/border-progress/index.d.ts +4 -0
- package/dist/components/custom/completion-seal/CompletionSeal.vue.d.ts +21 -0
- package/dist/components/custom/completion-seal/composables/useCompletionSeal.d.ts +37 -0
- package/dist/components/custom/completion-seal/constants.d.ts +46 -0
- package/dist/components/custom/completion-seal/index.d.ts +4 -0
- package/dist/components/custom/concentric/Concentric.vue.d.ts +39 -0
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +18 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +22 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +85 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +14 -0
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +35 -0
- package/dist/components/custom/concentric/constants.d.ts +67 -0
- package/dist/components/custom/concentric/index.d.ts +5 -0
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +4 -0
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -0
- package/dist/components/custom/confirm-dialog/ConfirmDialog.vue.d.ts +3 -3
- package/dist/components/custom/constellation/Constellation.vue.d.ts +5 -4
- package/dist/components/custom/constellation/composables/constellationGLSetup.d.ts +10 -0
- package/dist/components/custom/constellation/composables/constellationWGPUSetup.d.ts +19 -0
- package/dist/components/custom/constellation/composables/uniformBridgeWGPU.d.ts +66 -0
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +3 -10
- package/dist/components/custom/constellation/constants.d.ts +33 -0
- package/dist/components/custom/constellation/constellationField.d.ts +31 -1
- package/dist/components/custom/constellation/constellationInteraction.d.ts +23 -14
- package/dist/components/custom/constellation/constellationRender.d.ts +25 -0
- package/dist/components/custom/constellation/constellationTypes.d.ts +38 -0
- package/dist/components/custom/constellation/constellationWell.d.ts +15 -0
- package/dist/components/custom/constellation/index.d.ts +5 -5
- package/dist/components/custom/constellation/shaders/constellation-lines.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-lines.wgsl.d.ts +1 -0
- package/dist/components/custom/constellation/shaders/constellation-points.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-points.wgsl.d.ts +1 -0
- package/dist/components/custom/deck/DeckPager.vue.d.ts +29 -0
- package/dist/components/custom/deck/composables/useDeck.d.ts +27 -0
- package/dist/components/custom/deck/composables/useDeckKeyboard.d.ts +25 -0
- package/dist/components/custom/deck/composables/useDeckSpring.d.ts +22 -0
- package/dist/components/custom/deck/constants.d.ts +14 -0
- package/dist/components/custom/deck/index.d.ts +8 -0
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +25 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- package/dist/components/custom/dock/DockStack.vue.d.ts +65 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +4 -2
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +155 -0
- package/dist/components/custom/dock/composables/index.d.ts +2 -0
- package/dist/components/custom/dock/composables/useDockSearch.d.ts +85 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +11 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -0
- package/dist/components/custom/dock/constants.d.ts +18 -14
- package/dist/components/custom/dock/index.d.ts +5 -2
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +42 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +83 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +39 -0
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +35 -0
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +31 -0
- package/dist/components/custom/dot-flow-field/constants.d.ts +69 -0
- package/dist/components/custom/dot-flow-field/index.d.ts +5 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +4 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/dot-matrix/DotMatrix.vue.d.ts +43 -0
- package/dist/components/custom/dot-matrix/composables/dotMatrixField.d.ts +89 -0
- package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +52 -0
- package/dist/components/custom/dot-matrix/composables/useDotMatrix.d.ts +34 -0
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +27 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +58 -0
- package/dist/components/custom/dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +4 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -0
- package/dist/components/custom/easing/EasingConfigurator.vue.d.ts +33 -0
- package/dist/components/custom/easing/EasingPicker.vue.d.ts +49 -0
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +80 -0
- package/dist/components/custom/easing/constants.d.ts +28 -0
- package/dist/components/custom/easing/index.d.ts +3 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +11 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +43 -40
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +15 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +20 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +41 -0
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +42 -0
- package/dist/components/custom/fourier-field/constants.d.ts +64 -0
- package/dist/components/custom/fourier-field/index.d.ts +23 -18
- package/dist/components/custom/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +4 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +1 -1
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +13 -3
- package/dist/components/custom/goo-blob/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +18 -11
- package/dist/components/custom/goo-blob/composables/wgpuSetup.d.ts +23 -0
- package/dist/components/custom/goo-blob/constants.d.ts +1 -1
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball-noise.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-palette.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/types.d.ts +36 -0
- package/dist/components/custom/goo-dot-matrix/GooDotMatrix.vue.d.ts +49 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotLattice.d.ts +24 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +50 -0
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +35 -0
- package/dist/components/custom/goo-dot-matrix/composables/useGooDotMatrix.d.ts +31 -0
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +76 -0
- package/dist/components/custom/goo-dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +11 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +3 -0
- package/dist/components/custom/handmark/HandMark.vue.d.ts +1 -1
- package/dist/components/custom/icon-chip/types.d.ts +11 -1
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +3 -1
- package/dist/components/custom/labeled-field/LabeledField.vue.d.ts +21 -2
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +15 -0
- package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +9 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/pager-dots/pagerWindow.d.ts +9 -0
- package/dist/components/custom/paper-grid/PaperGrid.vue.d.ts +42 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +90 -0
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +16 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +19 -0
- package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +16 -0
- package/dist/components/custom/paper-grid/composables/usePaperGrid.d.ts +31 -0
- package/dist/components/custom/paper-grid/constants.d.ts +57 -0
- package/dist/components/custom/paper-grid/index.d.ts +5 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +4 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -0
- package/dist/components/custom/search/FuzzySearch.vue.d.ts +8 -2
- package/dist/components/custom/search/SearchBar.vue.d.ts +8 -0
- package/dist/components/custom/search/index.d.ts +2 -0
- package/dist/components/custom/search/searchVariants.d.ts +19 -0
- package/dist/components/custom/selectable-chip/SelectableChip.vue.d.ts +50 -0
- package/dist/components/custom/selectable-chip/index.d.ts +2 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +23 -0
- package/dist/components/custom/spa-view/SpaView.vue.d.ts +50 -0
- package/dist/components/custom/spa-view/index.d.ts +2 -0
- package/dist/components/custom/split-chars/SplitChars.vue.d.ts +39 -0
- package/dist/components/custom/split-chars/index.d.ts +1 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +12 -0
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/tabs/constants.d.ts +20 -2
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +30 -17
- package/dist/components/custom/watercolor-dot/useWatercolorBlob.d.ts +10 -5
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +1 -1
- package/dist/components/ui/_shared/useControlSize.d.ts +46 -0
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/button/Button.vue.d.ts +5 -2
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/card/Card.vue.d.ts +79 -4
- package/dist/components/ui/card/CardHeader.vue.d.ts +42 -16
- package/dist/components/ui/card/ScrollCard.vue.d.ts +33 -0
- package/dist/components/ui/card/ScrollCardHeader.vue.d.ts +17 -0
- package/dist/components/ui/card/index.d.ts +3 -1
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +2 -2
- package/dist/components/ui/command/Command.vue.d.ts +1 -1
- package/dist/components/ui/command/CommandDialog.vue.d.ts +9 -3
- package/dist/components/ui/command/CommandList.vue.d.ts +3 -0
- package/dist/components/ui/context-menu/ContextMenuContent.vue.d.ts +5 -1
- package/dist/components/ui/drawer/Drawer.vue.d.ts +46 -33
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +7 -8
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +2 -2
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +1 -1
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +2 -2
- package/dist/components/ui/drawer/composables/drawerSnapContext.d.ts +26 -0
- package/dist/components/ui/drawer/composables/useDrawerSnap.d.ts +17 -0
- package/dist/components/ui/drawer/constants.d.ts +45 -0
- package/dist/components/ui/drawer/index.d.ts +23 -15
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +4 -0
- package/dist/components/ui/focus-scope/FocusScope.vue.d.ts +20 -0
- package/dist/components/ui/focus-scope/index.d.ts +2 -0
- package/dist/components/ui/hover-card/HoverCardContent.vue.d.ts +3 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/input/Input.vue.d.ts +3 -0
- package/dist/components/ui/number-field/NumberFieldInput.vue.d.ts +6 -1
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/select/SelectContent.vue.d.ts +4 -1
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/switch/Switch.vue.d.ts +2 -0
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/ui/textarea/Textarea.vue.d.ts +3 -0
- package/dist/components/ui/toast/Toast.vue.d.ts +5 -2
- package/dist/components/ui/toast/use-toast.d.ts +14 -0
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +3 -0
- package/dist/composables/color/index.d.ts +2 -0
- package/dist/composables/color/useAccentTone.d.ts +34 -0
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +13 -6
- package/dist/composables/glass/index.d.ts +5 -2
- package/dist/composables/glass/useSpecularPointer.d.ts +33 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +20 -0
- package/dist/composables/glass/useVizChoreography.d.ts +123 -0
- package/dist/composables/glass/vSpecular.d.ts +2 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +10 -0
- package/dist/composables/glass/webgl/shaders/flow.glsl.d.ts +1 -0
- package/dist/composables/glass/webgl/shaders/flow.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +16 -0
- package/dist/composables/glass/webgpu/index.d.ts +2 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +75 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +85 -0
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
- package/dist/composables/motion/core/index.d.ts +4 -0
- package/dist/composables/motion/index.d.ts +4 -0
- package/dist/composables/motion/scrollReader.d.ts +25 -0
- package/dist/composables/motion/springPresets.d.ts +20 -1
- package/dist/composables/motion/useCharStagger.d.ts +44 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +84 -0
- package/dist/composables/motion/useDragMorph.d.ts +77 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +11 -0
- package/dist/composables/motion/useLiquidPress.d.ts +71 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +51 -0
- package/dist/composables/motion/useNumericTransition.d.ts +3 -3
- package/dist/composables/motion/usePointerVelocityField.d.ts +98 -0
- package/dist/composables/motion/useScrollChrome.d.ts +58 -0
- package/dist/composables/motion/useScrollTrigger.d.ts +67 -0
- package/dist/composables/motion/useSpringPress.d.ts +5 -5
- package/dist/composables/motion/useStaggerReveal.d.ts +24 -0
- package/dist/composables/sidebar/index.d.ts +4 -1
- package/dist/composables/sidebar/types.d.ts +68 -3
- package/dist/composables/sidebar/useClickDelegate.d.ts +4 -0
- package/dist/composables/sidebar/useLazyLoader.d.ts +5 -0
- package/dist/composables/sidebar/useScrollTo.d.ts +5 -0
- package/dist/composables/virtual/index.d.ts +4 -0
- package/dist/composables/virtual/useVirtualSectionWindow.d.ts +72 -0
- package/dist/composables/virtual/useWindowedStore.d.ts +43 -0
- package/dist/composables/virtual/virtualSectionLayout.d.ts +103 -0
- package/dist/concentric.d.ts +1 -0
- package/dist/concentric.js +836 -0
- package/dist/configurator.js +3 -2
- package/dist/confirm-dialog.js +62 -49
- package/dist/constellation.js +635 -235
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +2 -2
- package/dist/createCanvasLifecycle-Gh45Ce-p.js +93 -0
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck.d.ts +1 -0
- package/dist/deck.js +105 -0
- package/dist/dialog.js +4 -3
- package/dist/dock.js +819 -568
- package/dist/{dockContext-Bu1Avy-a.js → dockContext-BNfyPLe9.js} +1 -1
- package/dist/dom.js +5 -5
- package/dist/dot-flow-field.d.ts +1 -0
- package/dist/dot-flow-field.js +894 -0
- package/dist/dot-matrix.d.ts +1 -0
- package/dist/dot-matrix.js +630 -0
- package/dist/dotMatrixField-D_x9_1qq.js +48 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +380 -0
- package/dist/{dropdown-menu-BJ7E9js_.js → dropdown-menu-aJmV5SqE.js} +82 -79
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.d.ts +1 -0
- package/dist/easing.js +475 -0
- package/dist/expandable-container.js +46 -21
- package/dist/fading-scroll.js +1 -1
- package/dist/flow.glsl-B2P7e0MT.js +4 -0
- package/dist/focus-scope.d.ts +1 -0
- package/dist/focus-scope.js +23 -0
- package/dist/forms.js +65 -63
- package/dist/fourier-field.js +831 -172
- 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 +187 -338
- package/dist/goo-blob.js +241 -692
- package/dist/goo-dot-matrix.d.ts +1 -0
- package/dist/goo-dot-matrix.js +591 -0
- package/dist/handmark.js +2 -2
- 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 -1
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +70 -60
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +14 -9
- package/dist/motion-core.js +58 -36
- package/dist/motion-curves.js +11 -1
- package/dist/motion.js +90 -53
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +2 -91
- package/dist/paper-backdrop.js +1 -1
- package/dist/paper-grid.d.ts +1 -0
- package/dist/paper-grid.js +788 -0
- package/dist/popover.js +1 -1
- package/dist/{presets-BW2b-fr1.js → presets-CvOUqtdY.js} +3 -3
- package/dist/{compile-EXXzEr1q.js → procedural-color.wgsl-m7Zgv35j.js} +2 -156
- package/dist/progress.js +1 -1
- package/dist/pulse.js +2 -2
- package/dist/reactive.js +1 -1
- package/dist/resolveCanvasColor-yPyIpJt9.js +93 -0
- package/dist/scrollReader-DI1NWxUw.js +42 -0
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +162 -308
- package/dist/select.js +3 -3
- package/dist/selectable-chip.d.ts +1 -0
- package/dist/selectable-chip.js +65 -0
- package/dist/separator.js +1 -1
- package/dist/{sheet-CquRYOAw.js → sheet-B2flBfLH.js} +5 -5
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +216 -114
- package/dist/{slider-DQ95MET2.js → slider-2A0rPn79.js} +3 -3
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/spa-view.d.ts +1 -0
- package/dist/spa-view.js +46 -0
- package/dist/spectrum-walk-BVzA7Biz.js +33 -0
- package/dist/{springPresets-WXaLbu8u.js → springPresets-Ce7OYCm9.js} +12 -6
- package/dist/styles/animations.css +46 -12
- package/dist/styles/border-progress.css +109 -0
- package/dist/styles/cards.css +145 -0
- package/dist/styles/completion-seal.css +131 -0
- package/dist/styles/components.css +2 -3
- package/dist/styles/configurator.css +55 -0
- package/dist/styles/critical-partition.mjs +162 -0
- package/dist/styles/critical.css +12 -0
- package/dist/styles/deferred.css +33 -0
- package/dist/styles/dock/cta-seat.css +87 -0
- package/dist/styles/dock/density.css +198 -0
- package/dist/styles/dock/layers.css +101 -29
- package/dist/styles/dock/morph-bridge.css +54 -18
- package/dist/styles/dock/morph.css +132 -7
- package/dist/styles/dock/overflow.css +28 -2
- package/dist/styles/dock/search.css +68 -0
- package/dist/styles/dock/shape.css +124 -0
- package/dist/styles/dock/shell.css +77 -21
- package/dist/styles/dock/stack-rail.css +264 -0
- package/dist/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/dist/styles/dock-controls/icon-button.css +14 -0
- package/dist/styles/dock.css +43 -1
- package/dist/styles/drawer.css +81 -35
- package/dist/styles/glass/accent-tone.css +66 -0
- package/dist/styles/glass/control-surfaces.css +167 -0
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +147 -41
- package/dist/styles/glass/material.css +78 -15
- package/dist/styles/glass/reveal.css +136 -0
- package/dist/styles/glass/rim.css +110 -0
- package/dist/styles/glass/surfaces.css +148 -129
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +13 -0
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +77 -15
- package/dist/styles/index.css +36 -9
- package/dist/styles/instrument-chassis.css +66 -3
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/scroll-chrome.css +123 -0
- package/dist/styles/scroll-driven.css +38 -0
- package/dist/styles/segmented-tabs.css +81 -14
- package/dist/styles/theme/bridges.css +33 -0
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +24 -2
- package/dist/styles/tokens/color-radius.css +13 -3
- package/dist/styles/tokens/dark-arm.css +137 -32
- package/dist/styles/tokens/glass-deep.css +100 -0
- package/dist/styles/tokens/glass-fx.css +376 -0
- package/dist/styles/tokens/glass.css +131 -351
- package/dist/styles/tokens/light-dark.css +16 -3
- package/dist/styles/tokens/offsets.css +143 -0
- package/dist/styles/tokens/on-glass-fg.css +39 -0
- package/dist/styles/tokens/property-regs.css +260 -0
- package/dist/styles/tokens/scale-paper.css +168 -96
- package/dist/styles/tokens/scheme-motion.css +114 -38
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/sizing-config.css +110 -0
- package/{src/styles/tokens/offsets-sizing.css → dist/styles/tokens/sizing.css} +92 -204
- package/dist/styles/tokens.css +14 -3
- package/dist/styles/typography/semantic.css +26 -13
- package/dist/styles/typography/utilities.css +22 -7
- package/dist/styles/utilities/a11y-overrides.css +20 -5
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +307 -0
- package/dist/styles/utilities/base.css +47 -261
- package/dist/styles/utilities/btn.css +17 -4
- package/dist/styles/utilities/components.css +31 -6
- package/dist/styles/utilities/metal.css +215 -0
- package/dist/styles/utilities.css +14 -7
- package/dist/switch.js +1 -1
- package/dist/tabs.js +220 -107
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +10 -10
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +2 -2
- package/dist/uniformBridgeWGPU-CtAKl45L.js +1204 -0
- package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-CLrxicG9.js} +1 -1
- package/dist/useConfiguratorState-4xblKfwd.js +162 -0
- package/dist/useControlSize-SH1UmJCi.js +9 -0
- package/dist/useDockCtaReceive-DfFkmgL1.js +82 -0
- package/dist/useDragMorph-BUgAC-zK.js +102 -0
- package/dist/useFuzzySearch-DIhcYtcw.js +177 -0
- package/dist/useGpuSubstrate-4pTcp6mX.js +294 -0
- package/dist/useLiquidPress-BooG97RY.js +39 -0
- package/dist/usePointerVelocityField-QLsy3_kv.js +91 -0
- package/dist/useScrollChrome-D66AVP7C.js +258 -0
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-BWDnKIwh.js +71 -0
- package/dist/useSpringPress-B1-Czp-V.js +36 -0
- package/dist/{useTouchGate-28Tk2-t2.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/useViewTransition-CUI1nAgn.js +95 -0
- package/dist/vSpecular-EX7loENl.js +68 -0
- package/dist/vendor-B2qOlYY3.js +239 -0
- package/dist/virtual.d.ts +1 -0
- package/dist/virtual.js +225 -0
- package/dist/watercolor-dot.js +117 -74
- package/package.json +252 -28
- package/src/styles/animations.css +46 -12
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +145 -0
- package/src/styles/completion-seal.css +131 -0
- package/src/styles/configurator.css +55 -0
- package/src/styles/critical-partition.mjs +162 -0
- package/src/styles/dock/cta-seat.css +87 -0
- package/src/styles/dock/density.css +198 -0
- package/src/styles/dock/layers.css +101 -29
- package/src/styles/dock/morph-bridge.css +54 -18
- package/src/styles/dock/morph.css +132 -7
- package/src/styles/dock/overflow.css +28 -2
- package/src/styles/dock/search.css +68 -0
- package/src/styles/dock/shape.css +124 -0
- package/src/styles/dock/shell.css +77 -21
- package/src/styles/dock/stack-rail.css +264 -0
- package/src/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/src/styles/dock-controls/icon-button.css +14 -0
- package/src/styles/dock.css +43 -1
- package/src/styles/drawer.css +81 -35
- package/src/styles/glass/accent-tone.css +66 -0
- package/src/styles/glass/control-surfaces.css +167 -0
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +147 -41
- package/src/styles/glass/material.css +78 -15
- package/src/styles/glass/reveal.css +136 -0
- package/src/styles/glass/rim.css +110 -0
- package/src/styles/glass/surfaces.css +148 -129
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +13 -0
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +77 -15
- package/src/styles/index.css +27 -0
- package/src/styles/instrument-chassis.css +66 -3
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/scroll-chrome.css +123 -0
- package/src/styles/scroll-driven.css +38 -0
- package/src/styles/segmented-tabs.css +81 -14
- package/src/styles/theme/bridges.css +33 -0
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +24 -2
- package/src/styles/tokens/color-radius.css +13 -3
- package/src/styles/tokens/dark-arm.css +137 -32
- package/src/styles/tokens/glass-deep.css +100 -0
- package/src/styles/tokens/glass-fx.css +376 -0
- package/src/styles/tokens/glass.css +131 -351
- package/src/styles/tokens/light-dark.css +16 -3
- package/src/styles/tokens/offsets.css +143 -0
- package/src/styles/tokens/on-glass-fg.css +39 -0
- package/src/styles/tokens/property-regs.css +260 -0
- package/src/styles/tokens/scale-paper.css +168 -96
- package/src/styles/tokens/scheme-motion.css +114 -38
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/sizing-config.css +110 -0
- package/{dist/styles/tokens/offsets-sizing.css → src/styles/tokens/sizing.css} +92 -204
- package/src/styles/tokens.css +14 -3
- package/src/styles/typography/semantic.css +26 -13
- package/src/styles/typography/utilities.css +22 -7
- package/src/styles/utilities/a11y-overrides.css +20 -5
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +307 -0
- package/src/styles/utilities/base.css +47 -261
- package/src/styles/utilities/btn.css +17 -4
- package/src/styles/utilities/components.css +31 -6
- package/src/styles/utilities/metal.css +215 -0
- package/src/styles/utilities.css +14 -7
- package/dist/CardAction-XH4YBVEK.js +0 -158
- package/dist/ContextMenuContent-ON3x7cuk.js +0 -85
- package/dist/DialogFooter-8eZbdmPc.js +0 -165
- package/dist/HoverCardContent-DkMaQzH5.js +0 -83
- package/dist/Input-DVG_J0ne.js +0 -55
- package/dist/Notification-DKjKsQq8.js +0 -100
- package/dist/NumberFieldContent-1VtwDSgf.js +0 -145
- package/dist/Separator-BArl4OaB.js +0 -37
- package/dist/Switch-Dr--uLGH.js +0 -47
- package/dist/Toaster-Bm_HQSpc.js +0 -263
- package/dist/ToggleGroupItem-Dzk9hWsF.js +0 -157
- package/dist/TooltipProvider-B3MkB_8P.js +0 -104
- package/dist/button-BNDWhAZb.js +0 -81
- package/dist/check-njhk-vfu.js +0 -7
- package/dist/chevron-down-DKkxb4VV.js +0 -7
- package/dist/chevron-right-CPXbqQQz.js +0 -7
- package/dist/chevron-up-n_24SqI-.js +0 -7
- package/dist/color-DweYl7pE.js +0 -86
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +0 -35
- package/dist/components/custom/constellation/constellationDraw.d.ts +0 -30
- package/dist/components/custom/dock/DockRail.vue.d.ts +0 -89
- package/dist/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/resolveCanvasColor-BBiYfp8g.js +0 -11
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/styles/dock/rail-extend.css +0 -397
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-kiIlun8I.js +0 -303
- package/dist/useRAFLoop-CdwJ7284.js +0 -109
- package/dist/useSpecularTracking-Bo5su68i.js +0 -32
- package/dist/useSpringMount-CvopqiFr.js +0 -108
- package/dist/useViewTransition-COsPjQVZ.js +0 -47
- package/dist/x-BUwTKe50.js +0 -10
- package/src/styles/dock/rail-extend.css +0 -397
- /package/dist/{CollapsibleContent-C_s6fG7r.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-CxsHSyMj.js} +0 -0
- /package/dist/{Label-Ck9SWEKM.js → Label-C2ejNWeC.js} +0 -0
- /package/dist/{ModalOverlay-CkPRRgl_.js → ModalOverlay-D1VrWyoi.js} +0 -0
- /package/dist/{PaperBackdrop-nBKe0vkB.js → PaperBackdrop-CqwjnfLv.js} +0 -0
- /package/dist/{SelectGroup-Dcczq44n.js → SelectGroup-BFiod7X2.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-CBt_VvXa.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-UILT_3pZ.js → badge-D9XWW4GT.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants--C2DkLW8.js} +0 -0
- /package/dist/{createContext-B2RaZ-b8.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{math-DeuJwLFx.js → math-Eb0w3LqU.js} +0 -0
- /package/dist/{menuItemVariants-DWRQXBxJ.js → menuItemVariants-D8VNHq22.js} +0 -0
- /package/dist/{prng-Cg22zv8g.js → prng-B-d9eYX8.js} +0 -0
- /package/dist/{useGlobalDark-C28t0VWJ.js → useGlobalDark-CmjB9E32.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Dbozzjgm.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BPRp33Im.js} +0 -0
- /package/dist/{useLiquidFlex-C12hXwOZ.js → useLiquidFlex-UmA6LMZu.js} +0 -0
- /package/dist/{useResizeObserver-V6nq5gJb.js → useResizeObserver-Bpoi7tRE.js} +0 -0
- /package/dist/{useResolveTokenColor-NUG2zYAW.js → useResolveTokenColor-vAylyR0x.js} +0 -0
- /package/dist/{useScrollProgress-D7bYU2RK.js → useScrollProgress-c3yxmH6a.js} +0 -0
- /package/dist/{useSurfaceAxis-CMnF2zHb.js → useSurfaceAxis-g0NloYEF.js} +0 -0
- /package/dist/{useTimer-B_PAasDL.js → useTimer-BHJOKr35.js} +0 -0
- /package/dist/{useUserInvalidAria-CDfJuakL.js → useUserInvalidAria-y5namzeE.js} +0 -0
- /package/dist/{useViewportReady-CvBcCYDf.js → useViewportReady-anbac3m6.js} +0 -0
package/dist/goo-blob.js
CHANGED
|
@@ -1,586 +1,21 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import { t } from "./useResolveTokenColor-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
var O = {
|
|
11
|
-
geometry: {
|
|
12
|
-
canvasSize: 200,
|
|
13
|
-
bodyRadius: .22,
|
|
14
|
-
satelliteCount: 3,
|
|
15
|
-
satelliteRadius: .082,
|
|
16
|
-
orbitRadius: .17,
|
|
17
|
-
eccentricity: .05
|
|
18
|
-
},
|
|
19
|
-
satellites: {
|
|
20
|
-
mergeDuration: 1800,
|
|
21
|
-
absorbedDuration: [2e3, 4e3],
|
|
22
|
-
emergeDuration: 2200,
|
|
23
|
-
orbitDuration: [8e3, 14e3]
|
|
24
|
-
},
|
|
25
|
-
membrane: {
|
|
26
|
-
smoothK: .05,
|
|
27
|
-
merge: "circular",
|
|
28
|
-
noiseAmp: .038,
|
|
29
|
-
noiseFreq: 3.5,
|
|
30
|
-
noiseSpeed: .08,
|
|
31
|
-
warpAmp: .35,
|
|
32
|
-
pulseFreq: .3,
|
|
33
|
-
pulseAmp: .008
|
|
34
|
-
},
|
|
35
|
-
color: {
|
|
36
|
-
paletteStops: [
|
|
37
|
-
"#b5947f",
|
|
38
|
-
"#d4b27d",
|
|
39
|
-
"#dad6b1"
|
|
40
|
-
],
|
|
41
|
-
hueRange: 5,
|
|
42
|
-
satShift: 0,
|
|
43
|
-
brightnessShift: 0,
|
|
44
|
-
colorNoiseFreq: 2,
|
|
45
|
-
colorNoiseSpeed: .05
|
|
46
|
-
},
|
|
47
|
-
surface: {
|
|
48
|
-
lit: !0,
|
|
49
|
-
rimColor: "#8c694e",
|
|
50
|
-
lightDir: [
|
|
51
|
-
.4,
|
|
52
|
-
.7,
|
|
53
|
-
.6
|
|
54
|
-
],
|
|
55
|
-
specStrength: .16,
|
|
56
|
-
specShininess: 20,
|
|
57
|
-
rimPower: 2.5,
|
|
58
|
-
rimStrength: .32,
|
|
59
|
-
iridescence: .09,
|
|
60
|
-
iridHue: 85,
|
|
61
|
-
iridSpeed: .06,
|
|
62
|
-
sssScale: .1,
|
|
63
|
-
sssPower: 2,
|
|
64
|
-
coreGlow: .06
|
|
65
|
-
},
|
|
66
|
-
interaction: {
|
|
67
|
-
pointerAttraction: .35,
|
|
68
|
-
pointerStrength: .1,
|
|
69
|
-
stretch: .5,
|
|
70
|
-
clickImpulse: .5
|
|
71
|
-
},
|
|
72
|
-
quality: "full",
|
|
73
|
-
tempo: 1
|
|
74
|
-
}, k = Symbol("blobConfig"), A = 1 / 1.6, j = {
|
|
75
|
-
idle: {
|
|
76
|
-
valence: 0,
|
|
77
|
-
arousal: .35
|
|
78
|
-
},
|
|
79
|
-
happy: {
|
|
80
|
-
valence: .8,
|
|
81
|
-
arousal: .6
|
|
82
|
-
},
|
|
83
|
-
curious: {
|
|
84
|
-
valence: .3,
|
|
85
|
-
arousal: .5
|
|
86
|
-
},
|
|
87
|
-
sleepy: {
|
|
88
|
-
valence: -.1,
|
|
89
|
-
arousal: .1
|
|
90
|
-
},
|
|
91
|
-
excited: {
|
|
92
|
-
valence: .7,
|
|
93
|
-
arousal: 1
|
|
94
|
-
}
|
|
95
|
-
}, M = (e, t, n) => e + (t - e) * n;
|
|
96
|
-
function N({ valence: e, arousal: t }) {
|
|
97
|
-
return {
|
|
98
|
-
orbitSpeedScale: M(.4, 2.2, t),
|
|
99
|
-
wobbleScale: M(.5, 2, t),
|
|
100
|
-
pulseFreq: M(.15, 1.5, t),
|
|
101
|
-
pulseAmp: M(.008, .05, t),
|
|
102
|
-
noiseAmp: M(.015, .045, t),
|
|
103
|
-
hueRange: M(3, 25, t * .6 + (e * .5 + .5) * .4),
|
|
104
|
-
satShift: M(-.05, .1, e * .5 + .5),
|
|
105
|
-
brightnessShift: M(-.03, .08, e * .5 + .5),
|
|
106
|
-
smoothK: M(.85, 1.35, t),
|
|
107
|
-
pointerAttraction: M(-.2, .6, e * .5 + .5) * (.7 + .15 * t),
|
|
108
|
-
mergeRate: M(2, .3, t),
|
|
109
|
-
iridScale: M(.55, 1.35, t)
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
var P = {
|
|
113
|
-
idle: N(j.idle),
|
|
114
|
-
happy: N(j.happy),
|
|
115
|
-
curious: N(j.curious),
|
|
116
|
-
sleepy: N(j.sleepy),
|
|
117
|
-
excited: N(j.excited)
|
|
118
|
-
}, F = {
|
|
119
|
-
idle: 1500,
|
|
120
|
-
happy: 1200,
|
|
121
|
-
curious: 800,
|
|
122
|
-
sleepy: 2500,
|
|
123
|
-
excited: 600
|
|
124
|
-
}, I = 6e3, L = .35, R = .85, z = .2, B = .015, V = .02, H = .01, U = .015, W = .75, ee = 2e3, te = /* @__PURE__ */ "uResolution.uTime.uBaseColor.uPointer.uPointerActive.uPointerAttraction.uPointerStrength.uBodyRadius.uPulsePhase.uPulseAmp.uNoiseAmp.uNoiseFreq.uNoiseSpeed.uWarpAmp.uSmoothK.uMerge.uMaxReach.uLit.uRimColor.uLightDir.uSpecStrength.uSpecShininess.uRimPower.uRimStrength.uIridescence.uIridHue.uIridSpeed.uSssScale.uSssPower.uCoreGlow.uHueRange.uSatShift.uBrightnessShift.uColorNoiseFreq.uColorNoiseSpeed.uStopCount.uSatCount.uTrailCount.uVelocity.uStretch".split(".");
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/components/custom/goo-blob/composables/easing.ts
|
|
127
|
-
function ne(e) {
|
|
128
|
-
return e < .5 ? 2 * e * e : 1 - 2 * (1 - e) * (1 - e);
|
|
129
|
-
}
|
|
130
|
-
function re(e) {
|
|
131
|
-
return e * e;
|
|
132
|
-
}
|
|
133
|
-
function ie(e) {
|
|
134
|
-
return 1 - (1 - e) * (1 - e);
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/components/custom/goo-blob/composables/useBlobMood.ts
|
|
138
|
-
function ae(e, t, n) {
|
|
139
|
-
let r = (e, t) => e + (t - e) * n;
|
|
140
|
-
return {
|
|
141
|
-
orbitSpeedScale: r(e.orbitSpeedScale, t.orbitSpeedScale),
|
|
142
|
-
wobbleScale: r(e.wobbleScale, t.wobbleScale),
|
|
143
|
-
pulseFreq: r(e.pulseFreq, t.pulseFreq),
|
|
144
|
-
pulseAmp: r(e.pulseAmp, t.pulseAmp),
|
|
145
|
-
noiseAmp: r(e.noiseAmp, t.noiseAmp),
|
|
146
|
-
hueRange: r(e.hueRange, t.hueRange),
|
|
147
|
-
satShift: r(e.satShift, t.satShift),
|
|
148
|
-
brightnessShift: r(e.brightnessShift, t.brightnessShift),
|
|
149
|
-
smoothK: r(e.smoothK, t.smoothK),
|
|
150
|
-
pointerAttraction: r(e.pointerAttraction, t.pointerAttraction),
|
|
151
|
-
mergeRate: r(e.mergeRate, t.mergeRate),
|
|
152
|
-
iridScale: r(e.iridScale, t.iridScale)
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
function G() {
|
|
156
|
-
let e = w("idle"), t = w({ ...P.idle }), n = { ...P.idle }, r = { ...P.idle }, i = 0, a = 0, o = !1, s = 0, c = !1, l = !1, u = 0;
|
|
157
|
-
function d(s, l = {}) {
|
|
158
|
-
(l.source ?? "manual") === "manual" && (c = !0), !(s === e.value && !o) && (e.value = s, n = { ...t.value }, r = P[s], a = F[s], i = 0, o = !0);
|
|
159
|
-
}
|
|
160
|
-
function f(e) {
|
|
161
|
-
u = e.idleMs;
|
|
162
|
-
let t = e.pointerActive && !l;
|
|
163
|
-
if (l = e.pointerActive, c && (e.clicked || t) && (c = !1), !c) {
|
|
164
|
-
if (e.clicked) {
|
|
165
|
-
s = 900, d("excited", { source: "auto" });
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
s > 0 || (e.pointerActive ? d("curious", { source: "auto" }) : e.idleMs > 6e3 ? d("sleepy", { source: "auto" }) : d("idle", { source: "auto" }));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
function p() {
|
|
172
|
-
return o || s > 0 || c && e.value !== "idle" ? !1 : !(!c && e.value !== "sleepy" && u < 6e3);
|
|
173
|
-
}
|
|
174
|
-
function m() {
|
|
175
|
-
return o || s > 0 || c || e.value === "sleepy" ? Infinity : Math.max(0, I - u);
|
|
176
|
-
}
|
|
177
|
-
function h(e) {
|
|
178
|
-
if (s > 0 && (s = Math.max(0, s - e)), !o) return;
|
|
179
|
-
i += e;
|
|
180
|
-
let c = Math.min(i / a, 1), l = ne(c);
|
|
181
|
-
t.value = ae(n, r, l), c >= 1 && (o = !1);
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
currentMood: C(e),
|
|
185
|
-
params: C(t),
|
|
186
|
-
setMood: d,
|
|
187
|
-
update: f,
|
|
188
|
-
tick: h,
|
|
189
|
-
isSettled: p,
|
|
190
|
-
nextAutoMoodMs: m
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/components/custom/goo-blob/composables/useBlobPointer.ts
|
|
195
|
-
function K(e) {
|
|
196
|
-
let t = w({
|
|
197
|
-
x: 0,
|
|
198
|
-
y: 0
|
|
199
|
-
}), n = w({
|
|
200
|
-
x: 0,
|
|
201
|
-
y: 0
|
|
202
|
-
}), r = w(!1), i = w(0), a = 0, o = 0, s = {
|
|
203
|
-
response: .18,
|
|
204
|
-
dampingFraction: 1
|
|
205
|
-
}, c = new D(s), l = new D(s), u = Array.from({ length: 15 }, () => ({
|
|
206
|
-
x: 0,
|
|
207
|
-
y: 0,
|
|
208
|
-
radius: 0
|
|
209
|
-
})), d = 0, f = 0, p = 0, m = 0;
|
|
210
|
-
function h(t) {
|
|
211
|
-
let n = e.value;
|
|
212
|
-
if (!n) return;
|
|
213
|
-
let i = n.getBoundingClientRect();
|
|
214
|
-
a = (t.clientX - i.left) / i.width * 2 - 1, o = (t.clientY - i.top) / i.height * 2 - 1, r.value = !0;
|
|
215
|
-
}
|
|
216
|
-
function g() {
|
|
217
|
-
r.value = !1;
|
|
218
|
-
}
|
|
219
|
-
let _ = null;
|
|
220
|
-
E(e, (e) => {
|
|
221
|
-
_ &&= (_(), null), e && (e.addEventListener("pointermove", h), e.addEventListener("pointerleave", g), _ = () => {
|
|
222
|
-
e.removeEventListener("pointermove", h), e.removeEventListener("pointerleave", g);
|
|
223
|
-
});
|
|
224
|
-
}, { immediate: !0 }), x(() => _?.());
|
|
225
|
-
function v(e = 16) {
|
|
226
|
-
let s = Math.min(e, 50), h = s / 1e3;
|
|
227
|
-
r.value ? O = 0 : O += Math.min(e, 50);
|
|
228
|
-
let g = r.value ? a : 0, _ = r.value ? o : 0;
|
|
229
|
-
if (c.target = g, l.target = _, c.tickDt(s), l.tickDt(s), t.value = {
|
|
230
|
-
x: c.value,
|
|
231
|
-
y: l.value
|
|
232
|
-
}, n.value = {
|
|
233
|
-
x: c.velocity,
|
|
234
|
-
y: l.velocity
|
|
235
|
-
}, p !== 0 || m !== 0) {
|
|
236
|
-
let e = -324 * p - 2 * L * 18 * m;
|
|
237
|
-
m += e * h, p += m * h, p < -.9 && (p = -.9), Math.abs(p) < 1e-4 && Math.abs(m) < 1e-4 && (p = 0, m = 0);
|
|
238
|
-
}
|
|
239
|
-
i.value = p;
|
|
240
|
-
let v = Math.hypot(c.velocity, l.velocity);
|
|
241
|
-
r.value || v > .05 ? (d = (d + 1) % 15, u[d].x = c.value, u[d].y = l.value, f = Math.min(f + 1, 15)) : f > 0 && (f = Math.max(0, f - 1));
|
|
242
|
-
}
|
|
243
|
-
function y(e) {
|
|
244
|
-
let t = [];
|
|
245
|
-
for (let n = 0; n < f; n++) {
|
|
246
|
-
let r = u[(d - n + 30) % 15];
|
|
247
|
-
t.push({
|
|
248
|
-
x: r.x,
|
|
249
|
-
y: r.y,
|
|
250
|
-
radius: e * (1 - n / 15)
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
return {
|
|
254
|
-
sources: t,
|
|
255
|
-
count: f
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
let b = !1;
|
|
259
|
-
function S(e) {
|
|
260
|
-
m += e * 18, b = !0;
|
|
261
|
-
}
|
|
262
|
-
function T() {
|
|
263
|
-
let e = b;
|
|
264
|
-
return b = !1, e;
|
|
265
|
-
}
|
|
266
|
-
let O = 0;
|
|
267
|
-
function k() {
|
|
268
|
-
c.reset(0, 0), l.reset(0, 0), c.target = 0, l.target = 0, t.value = {
|
|
269
|
-
x: 0,
|
|
270
|
-
y: 0
|
|
271
|
-
}, n.value = {
|
|
272
|
-
x: 0,
|
|
273
|
-
y: 0
|
|
274
|
-
}, p = 0, m = 0, i.value = 0, f = 0;
|
|
275
|
-
}
|
|
276
|
-
function A() {
|
|
277
|
-
return !(r.value || Math.hypot(c.velocity, l.velocity) > .001 || Math.abs(c.value) > .001 || Math.abs(l.value) > .001 || f > 0 || p !== 0 || m !== 0);
|
|
278
|
-
}
|
|
279
|
-
return {
|
|
280
|
-
pointer: C(t),
|
|
281
|
-
velocity: C(n),
|
|
282
|
-
active: C(r),
|
|
283
|
-
pulse: C(i),
|
|
284
|
-
idleMs: () => O,
|
|
285
|
-
tick: v,
|
|
286
|
-
trailSources: y,
|
|
287
|
-
click: S,
|
|
288
|
-
consumeClick: T,
|
|
289
|
-
rest: k,
|
|
290
|
-
isAtRest: A
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
//#endregion
|
|
294
|
-
//#region src/components/custom/goo-blob/composables/useBlobSatellites.ts
|
|
295
|
-
function q(e, t, n) {
|
|
296
|
-
return t + e() * (n - t);
|
|
297
|
-
}
|
|
298
|
-
function J(e) {
|
|
299
|
-
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
300
|
-
}
|
|
301
|
-
function Y(e, t, n) {
|
|
302
|
-
return e + (t - e) * n;
|
|
303
|
-
}
|
|
304
|
-
function oe(e, t, n, r, i) {
|
|
305
|
-
let a = t / 4 * Math.PI * 2 + (e() - .5) * Math.PI, o = n * (R + e() * z), s = r * (.3 + e() * .7);
|
|
306
|
-
return {
|
|
307
|
-
phase: "orbiting",
|
|
308
|
-
phaseStart: i,
|
|
309
|
-
phaseDuration: 6e3 + e() * 1e4,
|
|
310
|
-
timeOrigin: i,
|
|
311
|
-
angularSpeed: .08 + e() * .16,
|
|
312
|
-
phaseOffset: a,
|
|
313
|
-
baseRadiusX: o * (1 - s),
|
|
314
|
-
baseRadiusY: o * (1 + s),
|
|
315
|
-
wobbleAmp1: B + e() * V,
|
|
316
|
-
wobbleFreq1: .08 + e() * .22,
|
|
317
|
-
wobbleAmp2: H + e() * U,
|
|
318
|
-
wobbleFreq2: .18 + e() * .32,
|
|
319
|
-
pertXAmp: .03 + e() * .05,
|
|
320
|
-
pertXFreq: .06 + e() * .18,
|
|
321
|
-
pertXPhase: e() * Math.PI * 2,
|
|
322
|
-
pertYAmp: .03 + e() * .05,
|
|
323
|
-
pertYFreq: .07 + e() * .17,
|
|
324
|
-
pertYPhase: e() * Math.PI * 2,
|
|
325
|
-
startX: 0,
|
|
326
|
-
startY: 0,
|
|
327
|
-
endX: 0,
|
|
328
|
-
endY: 0
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
function X(e, t, n, r) {
|
|
332
|
-
e.phase = t, e.phaseStart = n, e.phaseDuration = r;
|
|
333
|
-
}
|
|
334
|
-
function Z(e, t, n, r) {
|
|
335
|
-
let i = (t - e.timeOrigin) / 1e3, a = e.angularSpeed * n * i + e.phaseOffset, o = r * (e.wobbleAmp1 * Math.sin(e.wobbleFreq1 * i) + e.wobbleAmp2 * Math.sin(e.wobbleFreq2 * i + 1.3));
|
|
336
|
-
return {
|
|
337
|
-
x: (e.baseRadiusX + o) * Math.cos(a) + e.pertXAmp * Math.sin(e.pertXFreq * i + e.pertXPhase),
|
|
338
|
-
y: (e.baseRadiusY + o) * Math.sin(a) + e.pertYAmp * Math.cos(e.pertYFreq * i + e.pertYPhase)
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
function se(e, t, n, r, i) {
|
|
342
|
-
e.timeOrigin = i, e.angularSpeed = .08 + t() * .16, e.phaseOffset = t() * Math.PI * 2;
|
|
343
|
-
let a = n * (R + t() * z), o = r * (.3 + t() * .7);
|
|
344
|
-
e.baseRadiusX = a * (1 - o), e.baseRadiusY = a * (1 + o), e.wobbleAmp1 = B + t() * V, e.wobbleFreq1 = .08 + t() * .22, e.wobbleAmp2 = H + t() * U, e.wobbleFreq2 = .18 + t() * .32, e.pertXAmp = .03 + t() * .05, e.pertXFreq = .06 + t() * .18, e.pertXPhase = t() * Math.PI * 2, e.pertYAmp = .03 + t() * .05, e.pertYFreq = .07 + t() * .17, e.pertYPhase = t() * Math.PI * 2;
|
|
345
|
-
}
|
|
346
|
-
function ce(e, t) {
|
|
347
|
-
let n = f(p(t + "goo")), r = [], i = [], a = [], o = -Infinity, s = e.geometry.orbitRadius;
|
|
348
|
-
function c() {
|
|
349
|
-
let t = e.geometry.orbitRadius;
|
|
350
|
-
if (t !== s && s > 0) {
|
|
351
|
-
let e = t / s;
|
|
352
|
-
for (let t of r) t.baseRadiusX *= e, t.baseRadiusY *= e;
|
|
353
|
-
s = t;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
function l(t) {
|
|
357
|
-
let o = e.geometry.satelliteCount;
|
|
358
|
-
for (; r.length < o;) r.push(oe(n, r.length, e.geometry.orbitRadius, e.geometry.eccentricity, t)), i.push({
|
|
359
|
-
x: 0,
|
|
360
|
-
y: 0,
|
|
361
|
-
radius: e.geometry.satelliteRadius,
|
|
362
|
-
opacity: 0
|
|
363
|
-
}), a.push({
|
|
364
|
-
x: 0,
|
|
365
|
-
y: 0,
|
|
366
|
-
start: 0
|
|
367
|
-
});
|
|
368
|
-
r.length > o && (r.length = o, i.length = o, a.length = o);
|
|
369
|
-
}
|
|
370
|
-
function u(t, s) {
|
|
371
|
-
l(t), c();
|
|
372
|
-
let u = r.length, d = s.mergeRate, f = e.geometry.satelliteRadius, p = e.satellites.mergeDuration, m = e.satellites.emergeDuration, h = e.satellites.orbitDuration, g = e.satellites.absorbedDuration;
|
|
373
|
-
for (let c = 0; c < u; c++) {
|
|
374
|
-
let l = r[c], u = t - l.phaseStart, _ = J(l.phaseDuration > 0 ? u / l.phaseDuration : 1);
|
|
375
|
-
switch (l.phase) {
|
|
376
|
-
case "orbiting":
|
|
377
|
-
if (_ >= 1) if (t - o < 3e3 * d) l.phaseStart = t, l.phaseDuration = q(n, h[0], h[1]);
|
|
378
|
-
else {
|
|
379
|
-
let e = Z(l, t, s.orbitSpeedScale, s.wobbleScale);
|
|
380
|
-
l.startX = e.x, l.startY = e.y;
|
|
381
|
-
let n = Math.hypot(e.x, e.y), r = n > .01 ? .08 / n : 0;
|
|
382
|
-
l.endX = e.x * r, l.endY = e.y * r, X(l, "merging", t, p), o = t;
|
|
383
|
-
}
|
|
384
|
-
break;
|
|
385
|
-
case "merging":
|
|
386
|
-
_ >= 1 && X(l, "absorbed", t, q(n, g[0], g[1]));
|
|
387
|
-
break;
|
|
388
|
-
case "absorbed":
|
|
389
|
-
if (_ >= 1) {
|
|
390
|
-
se(l, n, e.geometry.orbitRadius, e.geometry.eccentricity, t);
|
|
391
|
-
let r = Z(l, t + 3e3, s.orbitSpeedScale, s.wobbleScale);
|
|
392
|
-
l.endX = r.x, l.endY = r.y;
|
|
393
|
-
let i = Math.hypot(r.x, r.y), a = i > .01 ? .08 / i : 0;
|
|
394
|
-
l.startX = r.x * a, l.startY = r.y * a, X(l, "emerging", t, m);
|
|
395
|
-
}
|
|
396
|
-
break;
|
|
397
|
-
case "emerging":
|
|
398
|
-
if (_ >= 1) {
|
|
399
|
-
let e = a[c];
|
|
400
|
-
e.x = l.endX, e.y = l.endY, e.start = t, l.timeOrigin = t, l.phaseOffset = Math.atan2(l.endY, l.endX), X(l, "orbiting", t, q(n, h[0], h[1]));
|
|
401
|
-
}
|
|
402
|
-
break;
|
|
403
|
-
}
|
|
404
|
-
let v, y, b, x;
|
|
405
|
-
switch (l.phase) {
|
|
406
|
-
case "orbiting": {
|
|
407
|
-
let e = Z(l, t, s.orbitSpeedScale, s.wobbleScale), n = a[c], r = t - n.start;
|
|
408
|
-
if (n.start > 0 && r < 2e3) {
|
|
409
|
-
let t = J(r / ee), i = t * t * (3 - 2 * t);
|
|
410
|
-
v = Y(n.x, e.x, i), y = Y(n.y, e.y, i);
|
|
411
|
-
} else v = e.x, y = e.y;
|
|
412
|
-
b = W, x = 1;
|
|
413
|
-
break;
|
|
414
|
-
}
|
|
415
|
-
case "merging": {
|
|
416
|
-
let e = re(J((t - l.phaseStart) / l.phaseDuration));
|
|
417
|
-
v = Y(l.startX, l.endX, e), y = Y(l.startY, l.endY, e);
|
|
418
|
-
let n = J((t - l.phaseStart) / l.phaseDuration);
|
|
419
|
-
b = n > .85 ? Y(W, 0, (n - .85) / .15) : W, x = Y(1, .65, e);
|
|
420
|
-
break;
|
|
421
|
-
}
|
|
422
|
-
case "absorbed":
|
|
423
|
-
v = 0, y = 0, b = 0, x = .5;
|
|
424
|
-
break;
|
|
425
|
-
case "emerging": {
|
|
426
|
-
let e = ie(J((t - l.phaseStart) / l.phaseDuration));
|
|
427
|
-
v = Y(l.startX, l.endX, e), y = Y(l.startY, l.endY, e);
|
|
428
|
-
let n = J((t - l.phaseStart) / l.phaseDuration);
|
|
429
|
-
b = n < .1 ? Y(0, W, n / .1) : W, x = Y(.65, 1, e);
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
let S = i[c];
|
|
434
|
-
S.x = v, S.y = y, S.radius = f * x, S.opacity = b;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
function d() {
|
|
438
|
-
for (let e of r) e.phaseOffset += (n() - .5) * .6, e.pertXPhase += n() * Math.PI, e.pertYPhase += n() * Math.PI;
|
|
439
|
-
}
|
|
440
|
-
function m(e) {
|
|
441
|
-
n = f(p(e + "goo"));
|
|
442
|
-
}
|
|
443
|
-
function h() {
|
|
444
|
-
for (let e of r) if (e.phase !== "orbiting") return !1;
|
|
445
|
-
return !0;
|
|
446
|
-
}
|
|
447
|
-
function g(e) {
|
|
448
|
-
let t = Infinity;
|
|
449
|
-
for (let e of r) {
|
|
450
|
-
let n = e.phaseStart + e.phaseDuration;
|
|
451
|
-
n < t && (t = n);
|
|
452
|
-
}
|
|
453
|
-
return t === Infinity ? e + 3e4 : t;
|
|
454
|
-
}
|
|
455
|
-
return {
|
|
456
|
-
sources: i,
|
|
457
|
-
tick: u,
|
|
458
|
-
nudge: d,
|
|
459
|
-
reseed: m,
|
|
460
|
-
isQuiescent: h,
|
|
461
|
-
nextEventMs: g
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
//#endregion
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
2
|
+
import { t } from "./useResolveTokenColor-vAylyR0x.js";
|
|
3
|
+
import { t as n } from "./usePointerVelocityField-QLsy3_kv.js";
|
|
4
|
+
import { a as r, t as i } from "./useGpuSubstrate-4pTcp6mX.js";
|
|
5
|
+
import { n as a, t as o } from "./compile-nZ1xVYTp.js";
|
|
6
|
+
import { s, t as c } from "./color-Cs0-oxYL.js";
|
|
7
|
+
import { t as l } from "./useIntersectionPause-Dbozzjgm.js";
|
|
8
|
+
import { a as u, c as d, d as f, f as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./uniformBridgeWGPU-CtAKl45L.js";
|
|
9
|
+
import { computed as S, createElementBlock as C, createElementVNode as w, defineComponent as T, inject as E, normalizeStyle as D, onScopeDispose as O, onUnmounted as k, openBlock as A, ref as j, useTemplateRef as M, watch as N } from "vue";
|
|
465
10
|
//#region src/components/custom/goo-blob/shaders/metaball.vert.ts
|
|
466
|
-
var
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
float freq = 1.0;
|
|
470
|
-
for (int i = 0; i < 4; i++) {
|
|
471
|
-
if (i >= octaves) break;
|
|
472
|
-
value += amp * noised(p * freq).x;
|
|
473
|
-
p = FBM_ROT * p;
|
|
474
|
-
freq *= ${fe.toFixed(1)};
|
|
475
|
-
amp *= ${pe.toFixed(2)};
|
|
476
|
-
}
|
|
477
|
-
return value;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
// AX.W15 — FBM with ANALYTIC GRADIENT. Returns vec3(value, ∂/∂x, ∂/∂y). The
|
|
481
|
-
// gradient accumulates noised()'s analytic gradient per octave, chain-ruled
|
|
482
|
-
// through the per-octave frequency scale AND the FBM_ROT rotation: octave i samples
|
|
483
|
-
// at R^i · (freq·p), so the gradient w.r.t. the ORIGINAL p picks up freq and
|
|
484
|
-
// the accumulated rotation transpose (R^T)^i. The keystone feed for the
|
|
485
|
-
// analytic surface normal — it DELETES the per-pixel 4-tap finite difference.
|
|
486
|
-
vec3 fbmG(vec2 p, int octaves) {
|
|
487
|
-
float value = 0.0;
|
|
488
|
-
vec2 grad = vec2(0.0);
|
|
489
|
-
float amp = 0.5;
|
|
490
|
-
float freq = 1.0;
|
|
491
|
-
// The accumulated octave rotation R^i — its transpose maps the i-th octave's
|
|
492
|
-
// local gradient back into the ORIGINAL p frame. Seeded at identity (octave 0).
|
|
493
|
-
mat2 rotAccum = mat2(1.0, 0.0, 0.0, 1.0);
|
|
494
|
-
vec2 pp = p;
|
|
495
|
-
for (int i = 0; i < 4; i++) {
|
|
496
|
-
if (i >= octaves) break;
|
|
497
|
-
vec3 n = noised(pp * freq);
|
|
498
|
-
value += amp * n.x;
|
|
499
|
-
// d(value)/dp = amp · freq · (R^i)^T · noised.yz (the rotated chain rule).
|
|
500
|
-
grad += amp * freq * (transpose(rotAccum) * n.yz);
|
|
501
|
-
pp = FBM_ROT * pp;
|
|
502
|
-
freq *= ${fe.toFixed(1)};
|
|
503
|
-
amp *= ${pe.toFixed(2)};
|
|
504
|
-
rotAccum = FBM_ROT * rotAccum;
|
|
505
|
-
}
|
|
506
|
-
return vec3(value, grad);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
// One domain-warp pass with the ANALYTIC GRADIENT carried (warp-Jacobian
|
|
510
|
-
// APPROXIMATION per the SOTA deepening [2]: the warp is low-frequency, so the
|
|
511
|
-
// gradient of the OUTER fbm dominates and the warp-offset Jacobian is dropped —
|
|
512
|
-
// the error is sub-perceptible and full autodiff is overfit for one blob).
|
|
513
|
-
vec3 fbmWarpedG(vec2 p, int octaves, float warpAmp) {
|
|
514
|
-
if (warpAmp <= 0.0) return fbmG(p, octaves);
|
|
515
|
-
vec2 q = vec2(fbm(p + vec2(0.0, 0.0), octaves), fbm(p + vec2(5.2, 1.3), octaves));
|
|
516
|
-
return fbmG(p + warpAmp * (q - 0.5), octaves);
|
|
517
|
-
}
|
|
518
|
-
`, he = "// Edit #4's gamut step — hue-preserving inward chroma clamp. If the linear result\n// is out of [0,1], bisect chroma toward 0 (L + h fixed) until in gamut. Preserves\n// hue exactly (only C shrinks). 16 steps resolve C to < 2^-16 of its span.\nbool inGamut(vec3 lin) {\n return all(greaterThanEqual(lin, vec3(0.0))) && all(lessThanEqual(lin, vec3(1.0)));\n}\nvec3 gamutClampOklch(vec3 lch) {\n vec3 lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) return lch;\n float lo = 0.0;\n float hi = lch.y;\n for (int i = 0; i < 16; i++) {\n float mid = 0.5 * (lo + hi);\n vec3 test = vec3(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n return vec3(lch.x, lo, lch.z);\n}", ge = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform vec2 uResolution;\nuniform float uTime;\nuniform vec3 uBaseColor;\n\n// Multi-stop palette (W11.b) — 2-4 in-family OKLCh stops (uploaded GAMMA sRGB, like\n// uBaseColor). uStopCount <= 1 falls back to uBaseColor (the single-color default,\n// zero regression). MAX_BLOB_STOPS is a compile-time #define.\n#define MAX_BLOB_STOPS 4\nuniform int uStopCount;\nuniform vec3 uPalette[MAX_BLOB_STOPS];\n\n// Pointer\nuniform vec2 uPointer;\nuniform float uPointerActive;\nuniform float uPointerAttraction;\nuniform float uPointerStrength;\n\n// Main body\nuniform float uBodyRadius;\n\n// Pulsation\nuniform float uPulsePhase;\nuniform float uPulseAmp;\n\n// Surface noise\nuniform float uNoiseAmp;\nuniform float uNoiseFreq;\nuniform float uNoiseSpeed;\n\n// Gooey\nuniform float uSmoothK;\nuniform float uMerge; // 0 = quadratic smin, 1 = circular smin (rounder menisci)\n\n// AX.W16 (arm 5) — the PRE-FBM bounding-discard radius (UV space). main() early-outs\n// to a transparent write for any fragment OUTSIDE this radius BEFORE the two 3-octave\n// FBM calls + the OKLCh round-trip. The renderer uploads it PADDED by every\n// outward-expanding term (body + eccentric orbit + sat radius + smin band + FBM edge\n// amplitude + click-pulse + a lean/squash safety pad) so it NEVER clips the wet\n// meniscus (IQ: inflate the bound to match any outward op).\nuniform float uMaxReach;\n\n// Membrane — domain-warp strength on the FBM edge displacement (0 = plain fbm).\nuniform float uWarpAmp;\n\n// Lit glass surface (W9.b) — gated behind uLit so the flat fill stays default.\nuniform float uLit; // 0 = flat fill (default), 1 = lit droplet\nuniform vec3 uRimColor; // Fresnel rim tint (GAMMA sRGB, via the /color leaf)\nuniform vec3 uLightDir; // normalized light direction (x, y, z)\nuniform float uSpecStrength; // Blinn-Phong specular weight\nuniform float uSpecShininess; // specular exponent (16-64, tight glint)\nuniform float uRimPower; // Fresnel/Schlick exponent (~2-3)\nuniform float uRimStrength; // Fresnel rim weight\n\n// Iridescence + fake subsurface (W11.a) — translucent-gel read.\nuniform float uIridescence; // warm-pearl rim sheen weight (0 = off)\nuniform float uIridHue; // base hue (radians) the cosine palette biases toward (warm)\nuniform float uIridSpeed; // animated-thickness scroll for the iridescent t\nuniform float uSssScale; // fast-SSS back-light weight\nuniform float uSssPower; // fast-SSS exponent\nuniform float uCoreGlow; // thickness-driven inner-luminosity lift\n\n// Color perturbation (perceptually uniform — OKLCh L/C/h)\nuniform float uHueRange; // degrees of hue swing (converted to radians)\nuniform float uSatShift; // OKLCh chroma swing\nuniform float uBrightnessShift; // OKLCh lightness bias\nuniform float uColorNoiseFreq;\nuniform float uColorNoiseSpeed;\n\n// Satellites (max 4)\n#define MAX_SATS 4\nuniform int uSatCount;\nuniform vec2 uSatPos[MAX_SATS];\nuniform float uSatRadius[MAX_SATS];\nuniform float uSatOpacity[MAX_SATS];\n\n// Pointer trail (W10) — a decaying-radius pseudopod toward the cursor. uTrail is a\n// COMPILE-TIME-SIZED array (GLSL ES 3.00 forbids a uniform-sized array) with a\n// DYNAMIC break on uTrailCount, mirroring the satellite loop. Later samples paint\n// smaller metaballs (r *= 1 - i/N) so the trail tapers into a tail.\n#define TRAIL_N 15\nuniform int uTrailCount;\nuniform vec2 uTrailPos[TRAIL_N];\nuniform float uTrailRadius[TRAIL_N];\n\n// Velocity-driven volume-preserving squash-and-stretch (W10).\nuniform vec2 uVelocity; // smoothed pointer velocity (motion direction + speed)\nuniform float uStretch; // squash-stretch magnitude (0 = off)\n\nconst float PI = 3.141592653589793;\n", Q = "\n", _e = ge + Q + de + Q + `${a}
|
|
519
|
-
|
|
520
|
-
` + me + Q + ue + Q + `
|
|
521
|
-
// --- Color (Ottosson OKLab/OKLCh — value.js EXACT constants, transposed) ---
|
|
522
|
-
//
|
|
523
|
-
// The OETF (srgbToLinear/linearToSrgb) + the four Ottosson matrices + their space
|
|
524
|
-
// conversions are SPLICED from the shared chunk (AV.W2 —
|
|
525
|
-
// src/composables/glass/webgl/shaders/procedural-color.glsl.ts). They live there
|
|
526
|
-
// ONCE so the OETF can never diverge from aurora's; the line-for-line TS port
|
|
527
|
-
// (__tests__/metaball-color.glsl-port.ts) mirrors that chunk. The gamut-clamp
|
|
528
|
-
// below stays blob-local (aurora has no in-shader OKLCh path).
|
|
529
|
-
${s}
|
|
530
|
-
${r}
|
|
531
|
-
|
|
532
|
-
` + he + Q + "\n// AX.W15 — de-synced breath. The body throb was a single sin(uPulsePhase) — a\n// mechanical pulse that re-syncs every cycle. Three DETUNED sines at IRRATIONAL\n// frequency ratios (1, 0.13/0.09 ≈ 1.444, 0.31) never re-phase, so the membrane\n// breathes like a living creature (an asymmetric slower-exhale calm band) rather\n// than a metronome. Normalized so the composite stays in ~[-1, 1].\nfloat breath(float phase) {\n return (sin(phase)\n + 0.5 * sin(phase * 1.4444 + 1.7)\n + 0.28 * sin(phase * 0.31 + 4.1)) / 1.78;\n}\n\n// AX.W15 — the composite SDF field WITH its ANALYTIC GRADIENT, returned as\n// vec3(dist, ∂d/∂x, ∂d/∂y). The domain-warped body membrane smin-merged with the\n// satellites + trail; the gradient propagates through sminG's mix(a.yz, b.yz, h)\n// so the surface normal reads the field gradient DIRECTLY (the 4-tap finite\n// difference is DELETED — its 4 full evals per lit pixel are gone).\n//\n// The ANISOTROPIC SQUASH (W10 volume-preserving stretch) is a linear map\n// bodyUv = D·R·uv (R rotates world→(motion-axis, perp); D = diag(1/sa, sa)). The\n// body field's gradient is computed in bodyUv space, so it MUST be transformed back\n// to uv space by M^T = R^T·D (the inverse-transpose handling the SOTA-deepening [2]\n// warns the 4-tap did implicitly by sampling in screen space).\nvec3 sceneDistG(vec2 uv) {\n // De-synced pulsing body radius.\n float bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Velocity-driven VOLUME-PRESERVING squash-and-stretch (W10), SATURATED (AX.W46\n // D5). sa is the stretch along motion, EXACTLY 1/sa perpendicular (area-preserving).\n // The basis (ax, perp) is captured so the gradient can be transformed back below.\n //\n // The W10 form sa = 1 + speed*uStretch rode an UNBOUNDED critically-damped spring\n // velocity (O(5-8)/s on a fast flick) -> sa ~ 1.78-2.25x elongation, a violent\n // taffy-pull. A tanh saturation sa = 1 + tanh(speed*k)*uStretch caps the elongation\n // at 1 + uStretch (~1.5x at the default stretch 0.5) no matter how fast the flick —\n // the fastest flick reads as a lively bounce, never a rubber-band snap (the standard\n // volume-preserving squash-and-stretch restraint). k = 1.6 keeps the tanh in its\n // near-linear regime for a slow drag (the gentle squash still reads) and saturates\n // only the fast flick.\n vec2 bodyUv = uv;\n vec2 ax = vec2(1.0, 0.0);\n vec2 perp = vec2(0.0, 1.0);\n float sa = 1.0;\n float speed = length(uVelocity);\n bool squashed = uStretch > 0.0 && speed > 1e-4;\n if (squashed) {\n ax = uVelocity / speed;\n perp = vec2(-ax.y, ax.x);\n sa = 1.0 + tanh(speed * 1.6) * uStretch;\n bodyUv = vec2(dot(uv, ax) / sa, dot(uv, perp) * sa);\n }\n\n // Domain-warped FBM displacement WITH its analytic gradient (the warp-Jacobian\n // approximation per [2]). disp = (noiseVal - 0.5) · uNoiseAmp; its gradient in\n // bodyUv space is uNoiseAmp · uNoiseFreq · fbmGrad (the uNoiseFreq chain factor\n // from the bodyUv·uNoiseFreq argument).\n vec3 fbmv = fbmWarpedG(bodyUv * uNoiseFreq + uTime * uNoiseSpeed, 3, uWarpAmp);\n float bodyDisplacement = (fbmv.x - 0.5) * uNoiseAmp;\n vec2 dispGradBody = uNoiseAmp * uNoiseFreq * fbmv.yz;\n\n // Body circle WITH gradient (in bodyUv space). The displaced radius subtracts\n // the displacement, so the body gradient is circleGrad - dispGrad (sign per\n // [2]: d = circleDist - displacement ⇒ grad = circleGrad - dispGrad).\n vec3 bodyG = sdgCircle(bodyUv, vec2(0.0), bodyR + bodyDisplacement);\n vec2 bodyGradBody = bodyG.yz - dispGradBody;\n\n // Transform the body gradient back to uv space: g_uv = R^T · D · g_body, i.e.\n // scale by D = diag(1/sa, sa) in the (ax, perp) frame then reconstruct in world.\n vec2 bodyGradUv;\n if (squashed) {\n vec2 scaled = vec2(bodyGradBody.x / sa, bodyGradBody.y * sa);\n bodyGradUv = scaled.x * ax + scaled.y * perp;\n } else {\n bodyGradUv = bodyGradBody;\n }\n vec3 d = vec3(bodyG.x, bodyGradUv);\n\n // Satellites — smin-merged into the body (uMerge selects quadratic/circular).\n for (int i = 0; i < MAX_SATS; i++) {\n if (i >= uSatCount) break;\n vec3 satG = sdgCircle(uv, uSatPos[i], uSatRadius[i]);\n satG.x += (1.0 - uSatOpacity[i]) * 0.3;\n d = sminG(d, satG, uSmoothK);\n }\n\n // Pointer trail — a decaying-radius pseudopod reaching toward the cursor,\n // smin-merged so it stretches an elastic limb and snaps back.\n for (int i = 0; i < TRAIL_N; i++) {\n if (i >= uTrailCount) break;\n vec3 trailG = sdgCircle(uv, uTrailPos[i], uTrailRadius[i]);\n d = sminG(d, trailG, uSmoothK);\n }\n return d;\n}\n\n// AX.W15 — the analytic surface normal. The field gradient grad2d arrives\n// DIRECTLY from sceneDistG (no 4-tap). The smin field is sub-unit (the CD family\n// |grad| ≤ 1) so the gradient is NOT unit-length — normalize() before the dome\n// lift (the unit contract is on the FINAL lifted normal N, not the raw field\n// gradient). The Z dome: 'interior' is the normalized depth inward from the rim\n// (-d/bodyR); z = sqrt(1 - (1 - interior)^2) is the unit half-sphere profile (flat\n// centre, steep rim). N tilts outward along the field gradient near the rim and\n// points at the viewer deep inside.\nvec3 surfaceNormalFromGrad(vec2 grad2d, float d, float bodyR) {\n vec2 g = normalize(grad2d + vec2(1e-6));\n float interior = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);\n float z = sqrt(max(0.0, 1.0 - (1.0 - interior) * (1.0 - interior)));\n return normalize(vec3(g * (1.0 - z), z) + vec3(0.0, 0.0, 1e-6));\n}\n\n// W11.b — sample the multi-stop palette at t in [0,1], interpolating adjacent\n// stops in OKLab with a MIDPOINT CHROMA-BUMP (a linear OKLab mix of a vivid pair\n// dips chroma through grey; the bump lifts it back). Falls back to uBaseColor when\n// uStopCount <= 1. Returns an OKLCh stop [L, C, h(rad)].\nvec3 samplePaletteOklch(float t) {\n if (uStopCount <= 1) return oklabToOklch(srgbToOklab(uBaseColor));\n float n = float(uStopCount);\n float ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n int i0 = int(floor(ft));\n int i1 = min(i0 + 1, uStopCount - 1);\n float f = ft - float(i0);\n // Fetch adjacent stops (uPalette is gamma sRGB) → OKLab.\n vec3 labA = srgbToOklab(uPalette[i0]);\n vec3 labB = srgbToOklab(uPalette[i1]);\n vec3 lab = mix(labA, labB, f);\n vec3 lch = oklabToOklch(lab);\n // Midpoint chroma-bump: a bell (peaks at f=0.5) lifts C off the grey midpoint.\n lch.y += 0.03 * sin(PI * f);\n return lch;\n}\n\nvoid main() {\n vec2 uv = vUv - 0.5;\n\n // AX.W16 (arm 5) — PRE-FBM bounding early-out. The oversized canvas (1.6x the\n // wrapper) runs the full fragment ALU — two 3-octave FBM evals + the OKLCh\n // round-trip + the lit/iridescence/SSS block — on a large transparent border\n // otherwise (~60% of the canvas is outside the droplet reach). Any fragment beyond\n // uMaxReach (the PADDED worst-case painted reach, uploaded so it never clips the\n // wet meniscus) writes transparent and returns BEFORE any of that work. This is a\n // transparent WRITE, NOT a GLSL discard: the pass is a pure premultiplied blend\n // with no depth, and discard disables the tiled-renderer fast path on mobile GPUs.\n // No fwidth is computed before the return, so there is no\n // derivative-in-non-uniform-control-flow hazard (the kept pixels compute their own\n // fwidth normally below). The pad covers the pointer-lean uv shift, so testing the\n // pre-deform uv is safe.\n if (dot(uv, uv) > uMaxReach * uMaxReach) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Pointer deformation — honor the SIGN of uPointerAttraction (W10): a positive\n // attraction leans the body IN toward the cursor, a negative shies it AWAY. The\n // signed influence flows straight into the UV shift (no hardcoded repulsion).\n //\n // AY.W-BLOB-CONFIG D2 — the SIGN was INVERTED in the rendered result. The\n // sample-shift sign here was uv -= dir*influence; the live readback (an attraction\n // sweep over a HELD pointer) measured the body shifting MORE toward the cursor as\n // attraction went MORE NEGATIVE (a=-1 -> +0.081, a=0 -> +0.063, a=+1 -> +0.042) —\n // exactly inverted: a shy-away -1 LUNGED at the cursor, a lean-in +1 pulled back.\n // pointerDir = uPointer - uv is the toward-pointer direction in SAMPLE space; to\n // MOVE the rendered body TOWARD the pointer the sample must shift ALONG pointerDir\n // (sample the field from where the pointer is), so the sign is uv += dir*influence.\n // A positive attraction now shifts the body toward the cursor (leans in), a negative\n // shifts it away (shies) — the sign the comment + the demo slider always promised,\n // now true in the render.\n //\n // AX.W46 D5 — the falloff radius NARROWS 0.65 → 0.5 (the calm-lean reconciliation).\n // The W15 REDRESS widened it to 0.65 to clear a synthetic floor; the live π-lane\n // read the result as a LUNGE. The drama lives in the STRENGTH (pointerStrength,\n // dropped to 0.18 in types.ts), NOT the falloff — the falloff's job is purely to keep\n // the lean COHERENT across the creature so the body, satellites and trail all tilt\n // toward the cursor as ONE. At 0.5 the body (sitting ≈0.2 uv from the cursor on a\n // hover-flick) is still well inside the cutoff, so the whole creature tilts as one —\n // a gentle, coherent \"it notices you\" lean rather than the body lunging a body-width.\n if (uPointerActive > 0.5) {\n vec2 pointerDir = uPointer - uv;\n float pointerDist = length(pointerDir);\n float influence = smoothstep(0.5, 0.0, pointerDist) * uPointerAttraction * uPointerStrength;\n uv += normalize(pointerDir + 1e-6) * influence;\n }\n\n // The de-synced pulsing body radius — also reused below for the inner-glow scale.\n float bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Composite domain-warped membrane field WITH its analytic gradient (AX.W15).\n vec3 scene = sceneDistG(uv);\n float d = scene.x;\n vec2 fieldGrad = scene.yz;\n\n // Edit #1 — fwidth-based anti-aliased edge: derive the smoothstep half-width\n // from the SDF screen-space gradient so the edge stays ~1px regardless of zoom.\n float aa = max(fwidth(d), 1e-6);\n float alpha = 1.0 - smoothstep(-aa, aa, d);\n\n if (alpha < 0.001) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Edit #4 — perceptually-uniform OKLCh variation. Gamma base → linear → OKLab\n // → OKLCh; perturb L/C/h; OKLCh → OKLab → linear; hue-preserving gamut clamp.\n // The base is the multi-stop palette sample (W11.b) — distributed across the\n // body/satellites by the color noise field — or uBaseColor when single-stop.\n float colorNoise = fbm(uv * uColorNoiseFreq + uTime * uColorNoiseSpeed, 3);\n vec3 oklch = samplePaletteOklch(colorNoise);\n\n oklch.z += (colorNoise - 0.5) * uHueRange * (PI / 180.0); // hue swing, radians\n oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0); // chroma swing\n oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0); // lightness bias\n\n // Surface normal — from the ANALYTIC field gradient (AX.W15: the 4-tap is\n // deleted). Computed ONCE here and reused by the iridescence (W11.a), the\n // fake-SSS (W11.a), and the lit glass block (W9.b).\n vec3 N = surfaceNormalFromGrad(fieldGrad, d, bodyR);\n vec3 V = vec3(0.0, 0.0, 1.0);\n float thickness = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0); // 0 at rim, ~1 deep in\n float fres = pow(1.0 - max(dot(N, V), 0.0), 2.5); // rim-weighted angle\n\n // ── W11.a iridescence — warm-biased IQ cosine palette driving OKLCh HUE ──\n //\n // A thin-film-like sheen on the RIM (fres-weighted), NOT the cold-blue default:\n // an IQ cosine palette (a + b*cos(2pi(c*t + d))) maps the Fresnel/edge angle +\n // the FBM color field + an animated thickness onto a HUE OFFSET biased to the\n // warm arc (uIridHue), with the chroma clamped to a warm-pearl band so the rim\n // reads cream/gold (congruent with the warm-cream-glass identity). Mixed into\n // OKLCh BEFORE the gamut clamp. Default LOW.\n if (uIridescence > 0.0) {\n float t = fres + 0.3 * colorNoise + uTime * uIridSpeed;\n // Cosine palette in HUE space, centred on the warm uIridHue (~0.18 turn of\n // warm sweep so the sheen shimmers gold→peach, never swinging to cold blue).\n float iridHue = uIridHue + 0.18 * PI * cos(2.0 * PI * t);\n float w = fres * uIridescence; // rim-weighted blend\n oklch.z = mix(oklch.z, iridHue, w);\n // Warm-pearl chroma cap: lift chroma toward a pale-pearl band, clamped.\n oklch.y = min(oklch.y + 0.04 * w, oklch.y + 0.08);\n oklch.x = min(oklch.x + 0.05 * w, 1.0); // a touch brighter at the sheen\n }\n\n // ── W11.a fake subsurface translucency — thickness inner-glow + back-light ──\n //\n // A bright translucent CORE fading to a light-leaking EDGE (the -d ramp) plus\n // the fast-SSS back-light (light wrapping through the thin rim). Both lift OKLCh\n // L and warm the hue, consuming the W9 normal. In OKLCh before the gamut clamp.\n if (uCoreGlow > 0.0 || uSssScale > 0.0) {\n // Beer-Lambert inner luminosity (AX.W15): a SATURATING 1 - exp(-k·thickness)\n // curve — a flat thick core with a fast warm rim falloff — NOT the linear\n // coreGlow·thickness ramp (which over-brightens deep interiors). k ≈ 3 reads\n // as glass depth.\n oklch.x = min(oklch.x + uCoreGlow * (1.0 - exp(-3.0 * thickness)), 1.0);\n // Fast-SSS back-light: light wrapping through the thin (low-thickness) rim.\n vec3 L = normalize(uLightDir + vec3(1e-6));\n float back = pow(clamp(dot(V, -(L + N * thickness)), 0.0, 1.0), uSssPower);\n float sss = back * uSssScale * (1.0 - thickness);\n oklch.x = min(oklch.x + sss, 1.0);\n // Warm the THIN leaking rim only (scale by 1 - thickness): the SSS hue-warm\n // shift rides the rim, not the core (AX.W15 — only the thin rim warms).\n oklch.z += sss * 0.1 * (1.0 - thickness);\n }\n\n oklch = gamutClampOklch(oklch);\n\n vec3 lin = oklabToLinearSrgb(oklchToOklab(oklch));\n\n // ── W9.b lit glass surface — Blinn-Phong glint + Fresnel rim, in LINEAR ──\n //\n // The lit terms enter lin in LINEAR space BEFORE the OETF (linearToSrgb)\n // and BEFORE the * alpha premultiply — a post-OETF apply double-gammas the\n // highlight and fringes the premultiplied edge (the named A5/A2 trap). The\n // prior flat inner-glow lift is SUBSUMED by the Fresnel rim (the curvature\n // read now comes from the surface normal, not a flat smoothstep). Gated behind\n // uLit so the flat fill stays the default (zero regression).\n if (uLit > 0.5) {\n // N, V, thickness are already computed in main() (reused by iridescence/SSS).\n vec3 L = normalize(uLightDir + vec3(1e-6)); // light direction\n vec3 H = normalize(L + V); // Blinn-Phong half-vector\n\n // Warm-cream specular glint — a near-white OKLCh TINT (L~0.97, C~0.03,\n // hue~85°) routed through the SAME spliced OKLCh matrices, NOT hardcoded\n // sRGB white (pure white reads cheap-CG). Linearized for the linear add.\n vec3 warmCream = oklabToLinearSrgb(oklchToOklab(vec3(0.97, 0.03, radians(85.0))));\n\n // ENERGY-CONSERVING Blinn-Phong (AX.W15 [9]): the (shininess+2)/8 factor\n // DECOUPLES shininess from strength (without it, raising shininess dims the\n // glint, so the two knobs fight). SPECULAR ANTIALIASING: the FBM membrane\n // makes the normal vary fast, so a tight glint (16-64) STROBES on small\n // dock-grid blobs. Widen the effective lobe where the normal varies\n // (Toksvig-style fwidth clamp) — drop shininess, NOT raise it. nVar reads\n // the screen-space normal derivative; a high-variance pixel softens the\n // exponent so the glint stays stable.\n float nVar = length(fwidth(N));\n float shininess = uSpecShininess / (1.0 + 24.0 * nVar);\n float energyNorm = (shininess + 2.0) / 8.0;\n float spec = pow(max(dot(N, H), 0.0), shininess) * uSpecStrength * energyNorm;\n\n // Fresnel/Schlick rim — fed uRimColor (the --foreground warm rim via the\n // /color leaf). FOREGROUND-AWARE MIN-CONTRAST GUARD (AX.W15 [10]):\n // a var(--primary) blob in dark mode resolves a rim near the BODY color, so\n // the rim washes out (no contrast). When the rim's luminance sits too close\n // to the body's, the guard CHROMA-REDUCES and L-LIFTS the rim stop (a\n // perceptual move, NOT a re-tint) so the curved rim always reads. Computed in\n // OKLCh so the lift is perceptual.\n vec3 rimOkl = oklabToOklch(srgbToOklab(uRimColor));\n float bodyL = oklch.x; // the post-perturb body lightness\n float dL = abs(rimOkl.x - bodyL);\n // If the rim is within 0.22 L of the body, push it AWAY (lift if the body is\n // dark, the dark-mode primary case; the chroma-reduce keeps it neutral-warm).\n float lack = clamp((0.22 - dL) / 0.22, 0.0, 1.0);\n rimOkl.x = clamp(mix(rimOkl.x, (bodyL < 0.5 ? 0.92 : 0.18), lack), 0.0, 1.0);\n rimOkl.y *= mix(1.0, 0.5, lack); // chroma-reduce toward a pale pearl\n vec3 rimLin = oklabToLinearSrgb(oklchToOklab(rimOkl));\n\n float rimFres = pow(1.0 - max(dot(N, V), 0.0), uRimPower);\n float rim = rimFres * uRimStrength * (1.0 - 0.6 * thickness);\n\n // Combine the two warm highlights and add in LINEAR. max(spec, rim*scale)\n // keeps the glint from stacking on the rim into a blown hotspot.\n //\n // AX.W46 D4 — CLAMP the linear highlight below unity before the add (the\n // belt-and-braces guard the re-derived specStrength makes rarely-binding but\n // never lets a worst-case normal blow to a hard white spot). The energy-\n // conserving Blinn-Phong CAN still spike on a grazing normal where the Toksvig\n // widen has not kicked in; capping the highlight magnitude at 0.85 (a contained\n // warm gleam, sub-unity) means the OETF clamp below can never crush a\n // pure-white pixel over the dome. The cap is on the highlight ALONE (not the\n // composited lin), so the body color underneath is untouched — it caps only\n // the additive catch-light's energy.\n vec3 highlight = max(warmCream * spec, rimLin * rim);\n highlight = min(highlight, vec3(0.85));\n lin += highlight;\n }\n\n vec3 rgb = clamp(linearToSrgb(lin), 0.0, 1.0); // MANDATORY OETF — closes the seam\n\n // IGN dither (AX.W15 [2][9]) — the low-chroma warm-cream dome BANDS on 8-bit\n // panels (visible Mach steps in the smooth L roll). Interleaved-gradient noise at\n // 1/255, applied AFTER linearToSrgb and BEFORE the *alpha premultiply (aurora\n // ships the same splice). A triangular ±0.5 LSB dither decorrelates the steps.\n float ign = fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));\n rgb = clamp(rgb + (ign - 0.5) / 255.0, 0.0, 1.0);\n\n // Edit #8 — premultiply AFTER the OETF: straight-alpha gamma → premultiplied.\n fragColor = vec4(rgb * alpha, alpha);\n}";
|
|
533
|
-
//#endregion
|
|
534
|
-
//#region src/components/custom/goo-blob/composables/uploadBlobUniforms.ts
|
|
535
|
-
function ve(e, t, n, r, i, a, o, s, c) {
|
|
536
|
-
let { U: l, satPosLocs: u, satRadLocs: d, satOpLocs: f, trailPosLocs: p, trailRadLocs: m, paletteLocs: h } = r, { params: g, rgb: _, simTimeMs: v, timeSec: y, resolveColor: b, rimColor: x, paletteStops: S } = c, { geometry: C, membrane: w, color: T, surface: E, interaction: D } = a;
|
|
537
|
-
e.useProgram(t), e.bindVertexArray(n), e.uniform2f(l.uResolution, i.width, i.height), e.uniform1f(l.uTime, v / 1e3), e.uniform3f(l.uBaseColor, _[0], _[1], _[2]);
|
|
538
|
-
let O = S, k = Math.min(O.length, 4);
|
|
539
|
-
e.uniform1i(l.uStopCount, k);
|
|
540
|
-
for (let t = 0; t < 4; t++) {
|
|
541
|
-
let n = h[t] ?? null, r = O[t];
|
|
542
|
-
if (r) {
|
|
543
|
-
let t = b(r);
|
|
544
|
-
e.uniform3f(n, t[0], t[1], t[2]);
|
|
545
|
-
} else e.uniform3f(n, _[0], _[1], _[2]);
|
|
546
|
-
}
|
|
547
|
-
let j = o.pointer.value, M = D.pointerAttraction + g.pointerAttraction;
|
|
548
|
-
e.uniform2f(l.uPointer, j.x * .5 * A, j.y * .5 * A), e.uniform1f(l.uPointerActive, +!!o.active.value), e.uniform1f(l.uPointerAttraction, M), e.uniform1f(l.uPointerStrength, D.pointerStrength * A);
|
|
549
|
-
let N = Math.max(0, Math.min(1, M)), P = o.velocity.value;
|
|
550
|
-
e.uniform2f(l.uVelocity, P.x * .5 * A, P.y * .5 * A), e.uniform1f(l.uStretch, D.stretch);
|
|
551
|
-
let F = o.trailSources(C.satelliteRadius * .7 * N);
|
|
552
|
-
e.uniform1i(l.uTrailCount, F.count);
|
|
553
|
-
for (let t = 0; t < 15; t++) {
|
|
554
|
-
let n = p[t] ?? null, r = m[t] ?? null, i = F.sources[t];
|
|
555
|
-
i ? (e.uniform2f(n, i.x * .5 * A, i.y * .5 * A), e.uniform1f(r, i.radius * A)) : (e.uniform2f(n, 0, 0), e.uniform1f(r, 0));
|
|
556
|
-
}
|
|
557
|
-
e.uniform1f(l.uBodyRadius, C.bodyRadius * A), e.uniform1f(l.uPulsePhase, y * w.pulseFreq * g.pulseFreq * Math.PI * 2);
|
|
558
|
-
let I = o.pulse.value * D.clickImpulse;
|
|
559
|
-
e.uniform1f(l.uPulseAmp, (w.pulseAmp * g.pulseAmp / .015 + I) * A), e.uniform1f(l.uNoiseAmp, w.noiseAmp * g.noiseAmp / .025 * A), e.uniform1f(l.uNoiseFreq, w.noiseFreq), e.uniform1f(l.uNoiseSpeed, w.noiseSpeed), e.uniform1f(l.uWarpAmp, w.warpAmp);
|
|
560
|
-
let L = C.orbitRadius * 1.2 * (1 + C.eccentricity), R = w.smoothK * g.smoothK, z = Math.max(0, L - C.satelliteRadius - C.bodyRadius), B = R > 0 ? Math.min(1.25, 1 + z / R) : 1;
|
|
561
|
-
e.uniform1f(l.uSmoothK, R * B * A), e.uniform1f(l.uMerge, +(w.merge === "circular"));
|
|
562
|
-
let V = L + C.satelliteRadius, H = (Math.max(C.bodyRadius, V) + R * B + w.noiseAmp * g.noiseAmp / .025 + Math.abs(o.pulse.value) * D.clickImpulse) * A + .1;
|
|
563
|
-
e.uniform1f(l.uMaxReach, H), e.uniform1f(l.uHueRange, T.hueRange + g.hueRange), e.uniform1f(l.uSatShift, T.satShift + g.satShift), e.uniform1f(l.uBrightnessShift, T.brightnessShift + g.brightnessShift), e.uniform1f(l.uColorNoiseFreq, T.colorNoiseFreq), e.uniform1f(l.uColorNoiseSpeed, T.colorNoiseSpeed), e.uniform1f(l.uLit, +!!E.lit);
|
|
564
|
-
let U = b(x);
|
|
565
|
-
e.uniform3f(l.uRimColor, U[0], U[1], U[2]), e.uniform3f(l.uLightDir, E.lightDir[0], E.lightDir[1], E.lightDir[2]), e.uniform1f(l.uSpecStrength, E.specStrength), e.uniform1f(l.uSpecShininess, E.specShininess), e.uniform1f(l.uRimPower, E.rimPower), e.uniform1f(l.uRimStrength, E.rimStrength), e.uniform1f(l.uIridescence, E.iridescence * g.iridScale), e.uniform1f(l.uIridHue, E.iridHue * (Math.PI / 180)), e.uniform1f(l.uIridSpeed, E.iridSpeed), e.uniform1f(l.uSssScale, E.sssScale * g.iridScale), e.uniform1f(l.uSssPower, E.sssPower), e.uniform1f(l.uCoreGlow, E.coreGlow);
|
|
566
|
-
let W = s.sources;
|
|
567
|
-
e.uniform1i(l.uSatCount, W.length);
|
|
568
|
-
for (let t = 0; t < 4; t++) {
|
|
569
|
-
let n = u[t] ?? null, r = d[t] ?? null, i = f[t] ?? null, a = W[t];
|
|
570
|
-
a ? (e.uniform2f(n, a.x * A, a.y * A), e.uniform1f(r, a.radius * A), e.uniform1f(i, a.opacity)) : (e.uniform2f(n, 0, 0), e.uniform1f(r, 0), e.uniform1f(i, 0));
|
|
571
|
-
}
|
|
572
|
-
e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.drawArrays(e.TRIANGLES, 0, 6), e.bindVertexArray(null);
|
|
573
|
-
}
|
|
574
|
-
//#endregion
|
|
575
|
-
//#region src/components/custom/goo-blob/composables/buildMetaballProgram.ts
|
|
576
|
-
var $ = "[GooBlob]";
|
|
577
|
-
function ye(e) {
|
|
578
|
-
let t = c(e, e.VERTEX_SHADER, le, $), n = c(e, e.FRAGMENT_SHADER, _e, $), r = i(e, t, n, $);
|
|
11
|
+
var P = "#version 300 es\n\nin vec2 aPosition;\nout vec2 vUv;\n\nvoid main() {\n vUv = 0.5 * (aPosition + 1.0);\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", F = "[GooBlob]";
|
|
12
|
+
function I(e) {
|
|
13
|
+
let t = o(e, e.VERTEX_SHADER, P, F), n = o(e, e.FRAGMENT_SHADER, _, F), r = a(e, t, n, F);
|
|
579
14
|
e.useProgram(r);
|
|
580
|
-
let
|
|
581
|
-
e.bindVertexArray(
|
|
582
|
-
let
|
|
583
|
-
e.bindBuffer(e.ARRAY_BUFFER,
|
|
15
|
+
let i = e.createVertexArray();
|
|
16
|
+
e.bindVertexArray(i);
|
|
17
|
+
let s = e.createBuffer();
|
|
18
|
+
e.bindBuffer(e.ARRAY_BUFFER, s), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
584
19
|
-1,
|
|
585
20
|
-1,
|
|
586
21
|
1,
|
|
@@ -594,10 +29,10 @@ function ye(e) {
|
|
|
594
29
|
1,
|
|
595
30
|
1
|
|
596
31
|
]), e.STATIC_DRAW);
|
|
597
|
-
let
|
|
598
|
-
e.enableVertexAttribArray(
|
|
32
|
+
let c = e.getAttribLocation(r, "aPosition");
|
|
33
|
+
e.enableVertexAttribArray(c), e.vertexAttribPointer(c, 2, e.FLOAT, !1, 0, 0);
|
|
599
34
|
let l = {};
|
|
600
|
-
for (let t of
|
|
35
|
+
for (let t of x) l[t] = e.getUniformLocation(r, t);
|
|
601
36
|
let u = [], d = [], f = [];
|
|
602
37
|
for (let t = 0; t < 4; t++) u.push(e.getUniformLocation(r, `uSatPos[${t}]`)), d.push(e.getUniformLocation(r, `uSatRadius[${t}]`)), f.push(e.getUniformLocation(r, `uSatOpacity[${t}]`));
|
|
603
38
|
let p = [], m = [];
|
|
@@ -608,8 +43,8 @@ function ye(e) {
|
|
|
608
43
|
prog: r,
|
|
609
44
|
vs: t,
|
|
610
45
|
fs: n,
|
|
611
|
-
vao:
|
|
612
|
-
buf:
|
|
46
|
+
vao: i,
|
|
47
|
+
buf: s,
|
|
613
48
|
locs: {
|
|
614
49
|
U: l,
|
|
615
50
|
satPosLocs: u,
|
|
@@ -622,103 +57,215 @@ function ye(e) {
|
|
|
622
57
|
};
|
|
623
58
|
}
|
|
624
59
|
//#endregion
|
|
60
|
+
//#region src/components/custom/goo-blob/composables/wgpuSetup.ts
|
|
61
|
+
var L = 64, R = 8, z = 2;
|
|
62
|
+
function B(e) {
|
|
63
|
+
let { canvas: t, config: n, pointer: i, satellites: a, resolveFrame: o, shouldContinue: s } = e;
|
|
64
|
+
return function(e, c, l) {
|
|
65
|
+
let u = e.createShaderModule({
|
|
66
|
+
label: "[GooBlob] metaball.wgsl",
|
|
67
|
+
code: m
|
|
68
|
+
}), d = e.createBuffer({
|
|
69
|
+
label: "[GooBlob] uniforms",
|
|
70
|
+
size: b,
|
|
71
|
+
usage: L | R
|
|
72
|
+
}), f = e.createBindGroupLayout({
|
|
73
|
+
label: "[GooBlob] bind-group-0",
|
|
74
|
+
entries: [{
|
|
75
|
+
binding: 0,
|
|
76
|
+
visibility: z,
|
|
77
|
+
buffer: { type: "uniform" }
|
|
78
|
+
}]
|
|
79
|
+
}), p = e.createRenderPipeline({
|
|
80
|
+
label: "[GooBlob] pipeline",
|
|
81
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [f] }),
|
|
82
|
+
vertex: {
|
|
83
|
+
module: u,
|
|
84
|
+
entryPoint: "vs_main"
|
|
85
|
+
},
|
|
86
|
+
fragment: {
|
|
87
|
+
module: u,
|
|
88
|
+
entryPoint: "fs_main",
|
|
89
|
+
targets: [{
|
|
90
|
+
format: l,
|
|
91
|
+
blend: {
|
|
92
|
+
color: {
|
|
93
|
+
srcFactor: "one",
|
|
94
|
+
dstFactor: "one-minus-src-alpha",
|
|
95
|
+
operation: "add"
|
|
96
|
+
},
|
|
97
|
+
alpha: {
|
|
98
|
+
srcFactor: "one",
|
|
99
|
+
dstFactor: "one-minus-src-alpha",
|
|
100
|
+
operation: "add"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}]
|
|
104
|
+
},
|
|
105
|
+
primitive: { topology: "triangle-list" }
|
|
106
|
+
}), h = e.createBindGroup({
|
|
107
|
+
label: "[GooBlob] bind-group",
|
|
108
|
+
layout: f,
|
|
109
|
+
entries: [{
|
|
110
|
+
binding: 0,
|
|
111
|
+
resource: { buffer: d }
|
|
112
|
+
}]
|
|
113
|
+
}), _ = g();
|
|
114
|
+
function y() {
|
|
115
|
+
let e = r(), i = n.quality === "half" ? .5 : 1, a = t.clientWidth || n.geometry.canvasSize, o = t.clientHeight || n.geometry.canvasSize, s = Math.max(1, Math.round(a * e * i)), c = Math.max(1, Math.round(o * e * i));
|
|
116
|
+
(t.width !== s || t.height !== c) && (t.width = s, t.height = c);
|
|
117
|
+
}
|
|
118
|
+
function x(r) {
|
|
119
|
+
let s = o(r);
|
|
120
|
+
if (!s) return;
|
|
121
|
+
v(_, t, n, i, a, s), e.queue.writeBuffer(d, 0, _.buffer);
|
|
122
|
+
let l = c.getCurrentTexture().createView(), u = e.createCommandEncoder({ label: "[GooBlob] frame" }), f = u.beginRenderPass({ colorAttachments: [{
|
|
123
|
+
view: l,
|
|
124
|
+
clearValue: {
|
|
125
|
+
r: 0,
|
|
126
|
+
g: 0,
|
|
127
|
+
b: 0,
|
|
128
|
+
a: 0
|
|
129
|
+
},
|
|
130
|
+
loadOp: "clear",
|
|
131
|
+
storeOp: "store"
|
|
132
|
+
}] });
|
|
133
|
+
f.setPipeline(p), f.setBindGroup(0, h), f.draw(3, 1, 0, 0), f.end(), e.queue.submit([u.finish()]);
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
frame: x,
|
|
137
|
+
shouldContinue: s,
|
|
138
|
+
resize: y,
|
|
139
|
+
teardown: () => {
|
|
140
|
+
d.destroy();
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//#endregion
|
|
625
146
|
//#region src/components/custom/goo-blob/composables/useMetaballRenderer.ts
|
|
626
|
-
function
|
|
627
|
-
let { canvasRef: t, color:
|
|
628
|
-
function
|
|
629
|
-
let t =
|
|
147
|
+
function V(e) {
|
|
148
|
+
let { canvasRef: t, color: a, rimColor: o, paletteStops: d, mood: f, pointer: p, satellites: m, config: h } = e, g = 0, _ = 0, v = n(), y = /* @__PURE__ */ new Map();
|
|
149
|
+
function b(e) {
|
|
150
|
+
let t = y.get(e);
|
|
630
151
|
if (t) return t;
|
|
631
|
-
let n =
|
|
632
|
-
return
|
|
152
|
+
let n = s(c(e));
|
|
153
|
+
return y.size > 256 && y.clear(), y.set(e, n), n;
|
|
633
154
|
}
|
|
634
|
-
let
|
|
635
|
-
function
|
|
636
|
-
|
|
155
|
+
let x = null, S = !1, C = null;
|
|
156
|
+
function w() {
|
|
157
|
+
C !== null && (clearTimeout(C), C = null);
|
|
637
158
|
}
|
|
638
|
-
function
|
|
639
|
-
if (
|
|
640
|
-
let t = Math.min(Math.max(e -
|
|
641
|
-
|
|
642
|
-
|
|
159
|
+
function T(e) {
|
|
160
|
+
if (w(), typeof setTimeout > "u") return;
|
|
161
|
+
let t = Math.min(Math.max(e - _, 16), 3e4);
|
|
162
|
+
C = setTimeout(() => {
|
|
163
|
+
C = null, x?.wake();
|
|
643
164
|
}, t);
|
|
644
165
|
}
|
|
645
|
-
|
|
646
|
-
pause: () =>
|
|
647
|
-
resume: () =>
|
|
166
|
+
l(t, {
|
|
167
|
+
pause: () => x?.suspend("off-screen-io"),
|
|
168
|
+
resume: () => x?.resume("off-screen-io")
|
|
648
169
|
}, {
|
|
649
170
|
rootMargin: "200px",
|
|
650
171
|
pauseWhenHidden: !1
|
|
651
172
|
});
|
|
652
|
-
function
|
|
653
|
-
|
|
173
|
+
function E(e) {
|
|
174
|
+
let t = g ? (e - g) * 1e3 : 16;
|
|
175
|
+
g = e;
|
|
176
|
+
let n = Math.max(0, Math.min(t, 50)), r = x?.reducedMotion ?? !1, i = r || S ? 0 : h.tempo, s = i * n;
|
|
177
|
+
if (_ += s, i > 0 && p.active.value) {
|
|
178
|
+
let e = p.pointer.value;
|
|
179
|
+
v.setPointer(e.x * .5 + .5, e.y * .5 + .5);
|
|
180
|
+
}
|
|
181
|
+
v.tick(i === 0 ? 0 : n);
|
|
182
|
+
let c = v.acceleration.value, l = v.velocity.value, u = -(c.x * l.x + c.y * l.y);
|
|
183
|
+
return u > 0 && i > 0 && p.click(Math.min(.5, u * 4 + v.burst.value * .2)), r || f.update({
|
|
184
|
+
pointerActive: p.active.value,
|
|
185
|
+
clicked: p.consumeClick(),
|
|
186
|
+
idleMs: p.idleMs()
|
|
187
|
+
}), f.tick(s), r ? p.rest() : p.tick(s), m.tick(_, f.params.value), {
|
|
188
|
+
params: f.params.value,
|
|
189
|
+
rgb: b(a.value),
|
|
190
|
+
simTimeMs: _,
|
|
191
|
+
timeSec: e,
|
|
192
|
+
resolveColor: b,
|
|
193
|
+
rimColor: o.value,
|
|
194
|
+
paletteStops: d.value
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function D() {
|
|
198
|
+
if (S) return !1;
|
|
199
|
+
if (!f.isSettled() || !p.isAtRest() || !m.isQuiescent()) return w(), !0;
|
|
200
|
+
let e = m.nextEventMs(_), t = f.nextAutoMoodMs(), n = Number.isFinite(t) ? _ + t : Infinity;
|
|
201
|
+
return T(Math.min(e, n)), !1;
|
|
202
|
+
}
|
|
203
|
+
function O(e) {
|
|
204
|
+
let t = r(), n = h.quality === "half" ? .5 : 1, i = e.clientWidth || h.geometry.canvasSize, a = e.clientHeight || h.geometry.canvasSize, o = Math.max(1, Math.round(i * t * n)), s = Math.max(1, Math.round(a * t * n));
|
|
205
|
+
return (e.width !== o || e.height !== s) && (e.width = o, e.height = s), {
|
|
206
|
+
w: o,
|
|
207
|
+
h: s
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
function A(e) {
|
|
211
|
+
x = i(e, {
|
|
654
212
|
contextAttrs: {
|
|
655
213
|
alpha: !0,
|
|
656
214
|
premultipliedAlpha: !0,
|
|
657
215
|
antialias: !1,
|
|
658
216
|
preserveDrawingBuffer: !1
|
|
659
217
|
},
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
218
|
+
setupWGPU: B({
|
|
219
|
+
canvas: e,
|
|
220
|
+
config: h,
|
|
221
|
+
pointer: p,
|
|
222
|
+
satellites: m,
|
|
223
|
+
resolveFrame: E,
|
|
224
|
+
shouldContinue: D,
|
|
225
|
+
getReducedMotion: () => x?.reducedMotion ?? !1
|
|
226
|
+
}),
|
|
227
|
+
setupGL: (t) => {
|
|
228
|
+
let { prog: n, vs: r, fs: i, vao: a, buf: o, locs: s } = I(t);
|
|
229
|
+
function c() {
|
|
230
|
+
let { w: n, h: r } = O(e);
|
|
231
|
+
t.viewport(0, 0, n, r);
|
|
665
232
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
668
|
-
m = n;
|
|
669
|
-
let u = Math.max(0, Math.min(l, 50)), g = v?.reducedMotion ?? !1, x = (g || y ? 0 : p.tempo) * u;
|
|
670
|
-
h += x, g || s.update({
|
|
671
|
-
pointerActive: c.active.value,
|
|
672
|
-
clicked: c.consumeClick(),
|
|
673
|
-
idleMs: c.idleMs()
|
|
674
|
-
}), s.tick(x), g ? c.rest() : c.tick(x), f.tick(h, s.params.value), ve(t, o, d, b, e, p, c, f, {
|
|
675
|
-
params: s.params.value,
|
|
676
|
-
rgb: _(r.value),
|
|
677
|
-
simTimeMs: h,
|
|
678
|
-
timeSec: n,
|
|
679
|
-
resolveColor: _,
|
|
680
|
-
rimColor: i.value,
|
|
681
|
-
paletteStops: a.value
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
function T() {
|
|
685
|
-
if (y) return !1;
|
|
686
|
-
if (!s.isSettled() || !c.isAtRest() || !f.isQuiescent()) return S(), !0;
|
|
687
|
-
let e = f.nextEventMs(h), t = s.nextAutoMoodMs(), n = Number.isFinite(t) ? h + t : Infinity;
|
|
688
|
-
return C(Math.min(e, n)), !1;
|
|
233
|
+
function l(r) {
|
|
234
|
+
u(t, n, a, s, e, h, p, m, E(r));
|
|
689
235
|
}
|
|
690
236
|
return {
|
|
691
|
-
frame:
|
|
692
|
-
shouldContinue:
|
|
693
|
-
resize:
|
|
237
|
+
frame: l,
|
|
238
|
+
shouldContinue: D,
|
|
239
|
+
resize: c,
|
|
694
240
|
teardown: () => {
|
|
695
|
-
t.deleteProgram(
|
|
241
|
+
t.deleteProgram(n), t.deleteShader(r), t.deleteShader(i), t.deleteBuffer(o), t.deleteVertexArray(a);
|
|
696
242
|
}
|
|
697
243
|
};
|
|
698
244
|
}
|
|
699
|
-
}),
|
|
245
|
+
}), x.armAsync();
|
|
700
246
|
}
|
|
701
|
-
return
|
|
702
|
-
e && !
|
|
703
|
-
}, { immediate: !0 }),
|
|
704
|
-
|
|
247
|
+
return N(t, (e) => {
|
|
248
|
+
e && !x && A(e);
|
|
249
|
+
}, { immediate: !0 }), N(a, () => x?.wake()), N(d, () => x?.wake(), { deep: !0 }), k(() => {
|
|
250
|
+
w(), x?.dispose(), x = null;
|
|
705
251
|
}), {
|
|
706
252
|
pause: () => {
|
|
707
|
-
|
|
253
|
+
S = !0, x?.suspend("manual");
|
|
708
254
|
},
|
|
709
255
|
resume: () => {
|
|
710
|
-
|
|
256
|
+
S = !1, x?.resume("manual");
|
|
711
257
|
},
|
|
712
|
-
wake: () =>
|
|
258
|
+
wake: () => x?.wake()
|
|
713
259
|
};
|
|
714
260
|
}
|
|
715
261
|
//#endregion
|
|
716
262
|
//#region src/components/custom/goo-blob/GooBlob.vue
|
|
717
|
-
var
|
|
263
|
+
var H = /* @__PURE__ */ e(/* @__PURE__ */ T({
|
|
718
264
|
__name: "GooBlob",
|
|
719
265
|
props: {
|
|
720
266
|
color: {},
|
|
721
267
|
config: {},
|
|
268
|
+
variant: {},
|
|
722
269
|
seed: { default: "" },
|
|
723
270
|
paused: {
|
|
724
271
|
type: Boolean,
|
|
@@ -727,71 +274,73 @@ var xe = /* @__PURE__ */ e(/* @__PURE__ */ _({
|
|
|
727
274
|
},
|
|
728
275
|
emits: ["click", "update:paused"],
|
|
729
276
|
setup(e, { expose: n, emit: r }) {
|
|
730
|
-
let i = r, a =
|
|
277
|
+
let i = r, a = E(p, null), o = e.config ?? a;
|
|
731
278
|
if (!o) throw Error("[glass-ui] GooBlob: no blob config. Pass an explicit `config` prop (e.g. BLOB_CONFIG_DEFAULTS) or provide(BLOB_CONFIG_KEY, cfg) from an ancestor. There is no silent defaults synthesis.");
|
|
732
|
-
let s = () => e.config ?? a ?? o, c =
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
279
|
+
let s = () => e.config ?? a ?? o, c = new Proxy(o, { get(t, n, r) {
|
|
280
|
+
return n === "variant" && e.variant != null ? e.variant : Reflect.get(t, n, r);
|
|
281
|
+
} }), l = M("canvasRef"), u = M("wrapperRef"), f = h(), m = d(u), g = y(o, e.color + e.seed), _ = t(), v = j(e.color), b = j(o.surface.rimColor), x = j([...o.color.paletteStops]);
|
|
282
|
+
function T() {
|
|
283
|
+
let t = u.value, n = s();
|
|
284
|
+
_.invalidate(), v.value = _.resolve(e.color, t), b.value = _.resolve(n.surface.rimColor, t), x.value = n.color.paletteStops.map((e) => _.resolve(e, t));
|
|
736
285
|
}
|
|
737
|
-
let
|
|
738
|
-
canvasRef:
|
|
739
|
-
color:
|
|
740
|
-
rimColor:
|
|
741
|
-
paletteStops:
|
|
742
|
-
mood:
|
|
743
|
-
pointer:
|
|
744
|
-
satellites:
|
|
745
|
-
config:
|
|
286
|
+
let k = V({
|
|
287
|
+
canvasRef: l,
|
|
288
|
+
color: v,
|
|
289
|
+
rimColor: b,
|
|
290
|
+
paletteStops: x,
|
|
291
|
+
mood: f,
|
|
292
|
+
pointer: m,
|
|
293
|
+
satellites: g,
|
|
294
|
+
config: c
|
|
746
295
|
});
|
|
747
|
-
|
|
748
|
-
let
|
|
749
|
-
typeof document < "u" && (
|
|
296
|
+
N(u, T, { immediate: !0 });
|
|
297
|
+
let P = null;
|
|
298
|
+
typeof document < "u" && (P = new MutationObserver(T), P.observe(document.documentElement, {
|
|
750
299
|
attributes: !0,
|
|
751
300
|
attributeFilter: ["class"]
|
|
752
|
-
})),
|
|
753
|
-
|
|
754
|
-
}),
|
|
301
|
+
})), N(S(() => e.color), (t) => {
|
|
302
|
+
T(), g.reseed(t + e.seed);
|
|
303
|
+
}), N(() => {
|
|
755
304
|
let e = s();
|
|
756
305
|
return [e.color.paletteStops.join("|"), e.surface.rimColor];
|
|
757
|
-
}, () =>
|
|
758
|
-
e &&
|
|
759
|
-
}),
|
|
760
|
-
|
|
306
|
+
}, () => T(), { deep: !0 }), N(() => m.active.value, (e) => {
|
|
307
|
+
e && k.wake();
|
|
308
|
+
}), N(() => e.paused, (e) => e ? k.pause() : k.resume(), { immediate: !0 }), O(() => {
|
|
309
|
+
P?.disconnect(), P = null;
|
|
761
310
|
});
|
|
762
|
-
function
|
|
763
|
-
|
|
311
|
+
function F() {
|
|
312
|
+
g.nudge();
|
|
764
313
|
}
|
|
765
|
-
function
|
|
766
|
-
|
|
314
|
+
function I(e) {
|
|
315
|
+
f.setMood(e, { source: "manual" });
|
|
767
316
|
}
|
|
768
|
-
function
|
|
769
|
-
|
|
317
|
+
function L() {
|
|
318
|
+
m.click(o.interaction.clickImpulse);
|
|
770
319
|
}
|
|
771
|
-
function
|
|
772
|
-
|
|
320
|
+
function R() {
|
|
321
|
+
L(), i("click");
|
|
773
322
|
}
|
|
774
323
|
return n({
|
|
775
|
-
nudge:
|
|
776
|
-
setMood:
|
|
777
|
-
pulse:
|
|
778
|
-
currentMood:
|
|
779
|
-
pause:
|
|
780
|
-
resume:
|
|
781
|
-
}), (t, n) => (
|
|
324
|
+
nudge: F,
|
|
325
|
+
setMood: I,
|
|
326
|
+
pulse: L,
|
|
327
|
+
currentMood: f.currentMood,
|
|
328
|
+
pause: k.pause,
|
|
329
|
+
resume: k.resume
|
|
330
|
+
}), (t, n) => (A(), C("div", {
|
|
782
331
|
ref_key: "wrapperRef",
|
|
783
|
-
ref:
|
|
332
|
+
ref: u,
|
|
784
333
|
class: "goo-blob-wrapper",
|
|
785
|
-
style:
|
|
786
|
-
onClick:
|
|
787
|
-
}, [
|
|
334
|
+
style: D({ "--blob-color": e.color }),
|
|
335
|
+
onClick: R
|
|
336
|
+
}, [w("canvas", {
|
|
788
337
|
ref_key: "canvasRef",
|
|
789
|
-
ref:
|
|
338
|
+
ref: l,
|
|
790
339
|
class: "goo-blob-canvas",
|
|
791
340
|
"aria-hidden": "true",
|
|
792
341
|
"data-testid": "goo-blob-canvas"
|
|
793
342
|
}, null, 512)], 4));
|
|
794
343
|
}
|
|
795
|
-
}), [["__scopeId", "data-v-
|
|
344
|
+
}), [["__scopeId", "data-v-2906dd32"]]);
|
|
796
345
|
//#endregion
|
|
797
|
-
export {
|
|
346
|
+
export { f as BLOB_CONFIG_DEFAULTS, p as BLOB_CONFIG_KEY, H as GooBlob, h as useBlobMood, d as useBlobPointer, y as useBlobSatellites, V as useMetaballRenderer };
|