@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
|
@@ -40,18 +40,25 @@ export interface UseMetaballRendererReturn {
|
|
|
40
40
|
wake: () => void;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* The GooBlob
|
|
43
|
+
* The GooBlob renderer — composes the `createGpuSubstrate` picker (BB.W-VIZ-SUITE /
|
|
44
|
+
* W-GOOBLOB-WGPU): the WebGPU-first `metaball.wgsl` primary OR the WebGL2
|
|
45
|
+
* `metaball.frag.ts` fallback, selected ONCE by `navigator.gpu` feature-detect. Both
|
|
46
|
+
* backends compose the SAME `createCanvasLifecycle` leaf (AU.W6), so the demand-driven
|
|
47
|
+
* scheduling + offscreen-park + live-PRM-freeze are byte-identical across backends.
|
|
44
48
|
*
|
|
45
|
-
* This module owns ONLY the metaball-specific concerns: compiling the shader,
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
49
|
+
* This module owns ONLY the metaball-specific concerns: compiling the shader, building
|
|
50
|
+
* the quad + uniform cache (the WebGL2 `buildMetaballProgram` leaf) OR the WGSL pipeline
|
|
51
|
+
* + the typed-struct uniform buffer (the WGSL `createBlobWGPUSetup` leaf), and the
|
|
52
|
+
* per-frame SIMULATION advance + uniform upload derived from the mood / pointer /
|
|
53
|
+
* satellite systems and the resolved base color. The simulation advance is SHARED — the
|
|
54
|
+
* `resolveFrame(timeSec)` closure advances the systems and returns the settled
|
|
55
|
+
* `BlobFrameState`; the WebGL2 `drawFrame` and the WGSL `frame` both call it, so the
|
|
56
|
+
* physics is substrate-agnostic and only the upload+draw leg differs. The generic
|
|
57
|
+
* lifecycle (context creation, the suspend/resume model, the demand-driven rAF loop, the
|
|
58
|
+
* tab-visibility owner, the ResizeObserver, and the context-loss self-heal) lives in the
|
|
59
|
+
* substrate; this renderer threads its behaviour through the substrate's
|
|
60
|
+
* `setupGL`/`setupWGPU`/`frame`/`shouldContinue`/`resize`/`teardown` callbacks. It does
|
|
61
|
+
* NOT call `getContext("webgl2")`/`navigator.gpu` itself (the single-bootstrap contract).
|
|
55
62
|
*
|
|
56
63
|
* Color is resolved INTERNALLY through the `/color` leaf (`cssToOklch →
|
|
57
64
|
* oklchToGammaRgb`) — the GAMMA-sRGB triple fed straight into the base-color uniform
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
2
|
+
import type { BlobConfig } from "../types";
|
|
3
|
+
import type { BlobPointer } from "./useBlobPointer";
|
|
4
|
+
import type { BlobSatelliteSystem } from "./useBlobSatellites";
|
|
5
|
+
import type { BlobFrameState } from "./uploadBlobUniforms";
|
|
6
|
+
export interface BlobWGPUSetupDeps {
|
|
7
|
+
canvas: HTMLCanvasElement;
|
|
8
|
+
config: BlobConfig;
|
|
9
|
+
pointer: BlobPointer;
|
|
10
|
+
satellites: BlobSatelliteSystem;
|
|
11
|
+
/** Resolve the per-frame state (advances the sim, returns the settled values). */
|
|
12
|
+
resolveFrame: (timeSec: number) => BlobFrameState | null;
|
|
13
|
+
/** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
|
|
14
|
+
shouldContinue: () => boolean;
|
|
15
|
+
/** Reduced-motion read (the substrate owns the query; the renderer drives tempo). */
|
|
16
|
+
getReducedMotion: () => boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Build the goo-blob `setupWGPU(device, context, format)` callback. Closes over the
|
|
20
|
+
* blob-specific state (config/pointer/satellites + the renderer's resolveFrame) — the
|
|
21
|
+
* same closures the WebGL2 `setup` threads.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createBlobWGPUSetup(deps: BlobWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -53,5 +53,5 @@ export declare const BASE_OPACITY = 0.75;
|
|
|
53
53
|
export declare const ORBIT_BLEND_MS = 2000;
|
|
54
54
|
/** Minimum spacing (ms) between satellite merge events. */
|
|
55
55
|
export declare const MERGE_STAGGER_MS = 3000;
|
|
56
|
-
export declare const UNIFORM_NAMES: readonly ["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"];
|
|
56
|
+
export declare const UNIFORM_NAMES: readonly ["uResolution", "uTime", "uBaseColor", "uPointer", "uPointerActive", "uPointerAttraction", "uPointerStrength", "uBodyRadius", "uPulsePhase", "uPulseAmp", "uNoiseAmp", "uNoiseFreq", "uNoiseSpeed", "uWarpAmp", "uSmoothK", "uMerge", "uStage", "uMaxReach", "uLit", "uRimColor", "uLightDir", "uSpecStrength", "uSpecShininess", "uRimPower", "uRimStrength", "uShadow", "uShadowSoftness", "uIridescence", "uIridHue", "uIridSpeed", "uSssScale", "uSssPower", "uCoreGlow", "uHueRange", "uSatShift", "uBrightnessShift", "uColorNoiseFreq", "uColorNoiseSpeed", "uStopCount", "uSatCount", "uTrailCount", "uVelocity", "uStretch"];
|
|
57
57
|
export type UniformName = (typeof UNIFORM_NAMES)[number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as GooBlob } from "./GooBlob.vue";
|
|
2
|
-
export type { BlobMood, BlobMerge, BlobQuality, MoodParams, MetaballSource, BlobConfig, BlobGeometry, BlobSatelliteTiming, BlobMembrane, BlobColor, BlobSurface, BlobInteraction, SatellitePhase, SatelliteInternal, } from "./types";
|
|
2
|
+
export type { BlobMood, BlobMerge, BlobVariant, BlobQuality, MoodParams, MetaballSource, BlobConfig, BlobGeometry, BlobSatelliteTiming, BlobMembrane, BlobColor, BlobSurface, BlobInteraction, SatellitePhase, SatelliteInternal, } from "./types";
|
|
3
3
|
export { BLOB_CONFIG_DEFAULTS, BLOB_CONFIG_KEY } from "./types";
|
|
4
4
|
export { useBlobMood, type BlobMoodSystem } from "./composables/useBlobMood";
|
|
5
5
|
export { useBlobPointer, type BlobPointer } from "./composables/useBlobPointer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const METABALL_NOISE_WGSL = "\nconst FBM_LACUNARITY: f32 = 1.8;\nconst FBM_GAIN: f32 = 0.42;\n\n// \u2500\u2500 Noise (blob-LOCAL 3D-p3 hash + IQ analytic-derivative gradient noise) \u2500\u2500\nfn hash21(p: vec2<f32>) -> f32 {\n var p3 = fract(vec3<f32>(p.x, p.y, p.x) * 0.1031);\n p3 = p3 + dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// IQ analytic-derivative gradient noise \u2014 value in .x, ANALYTIC gradient (d/dx, d/dy) in\n// .yz, from one eval. The quintic fade has a continuous 2nd derivative.\nfn noised(p: vec2<f32>) -> vec3<f32> {\n let i = floor(p);\n let f = fract(p);\n let uu = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n let du = 30.0 * f * f * (f * (f - 2.0) + 1.0);\n\n let ga = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(0.0, 0.0)), hash21(i + vec2<f32>(7.3, 0.0)));\n let gb = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(1.0, 0.0)), hash21(i + vec2<f32>(8.3, 0.0)));\n let gc = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(0.0, 1.0)), hash21(i + vec2<f32>(7.3, 1.0)));\n let gd = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(1.0, 1.0)), hash21(i + vec2<f32>(8.3, 1.0)));\n\n let va = dot(ga, f - vec2<f32>(0.0, 0.0));\n let vb = dot(gb, f - vec2<f32>(1.0, 0.0));\n let vc = dot(gc, f - vec2<f32>(0.0, 1.0));\n let vd = dot(gd, f - vec2<f32>(1.0, 1.0));\n\n let n = va + uu.x * (vb - va) + uu.y * (vc - va) + uu.x * uu.y * (va - vb - vc + vd);\n let value = 0.5 + 0.5 * n;\n\n let grad =\n ga + uu.x * (gb - ga) + uu.y * (gc - ga) + uu.x * uu.y * (ga - gb - gc + gd) +\n du * (vec2<f32>(uu.y, uu.x) * (va - vb - vc + vd) + vec2<f32>(vb, vc) - va);\n return vec3<f32>(value, 0.5 * grad);\n}\n\nfn fbm(p0: vec2<f32>, octaves: i32) -> f32 {\n var value = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var p = p0;\n for (var i = 0; i < 4; i = i + 1) {\n if (i >= octaves) { break; }\n value = value + amp * noised(p * freq).x;\n p = FBM_ROT * p;\n freq = freq * FBM_LACUNARITY;\n amp = amp * FBM_GAIN;\n }\n return value;\n}\n\n// FBM with ANALYTIC GRADIENT \u2014 value in .x, \u2202/\u2202x, \u2202/\u2202y in .yz. The gradient accumulates\n// noised()'s analytic gradient per octave, chain-ruled through the per-octave frequency\n// scale AND the FBM_ROT rotation (the keystone feed for the analytic surface normal).\nfn fbmG(p: vec2<f32>, octaves: i32) -> vec3<f32> {\n var value = 0.0;\n var grad = vec2<f32>(0.0, 0.0);\n var amp = 0.5;\n var freq = 1.0;\n var rotAccum = mat2x2<f32>(1.0, 0.0, 0.0, 1.0);\n var pp = p;\n for (var i = 0; i < 4; i = i + 1) {\n if (i >= octaves) { break; }\n let n = noised(pp * freq);\n value = value + amp * n.x;\n grad = grad + amp * freq * (transpose(rotAccum) * n.yz);\n pp = FBM_ROT * pp;\n freq = freq * FBM_LACUNARITY;\n amp = amp * FBM_GAIN;\n rotAccum = FBM_ROT * rotAccum;\n }\n return vec3<f32>(value, grad);\n}\n\n// One domain-warp pass with the ANALYTIC GRADIENT carried (warp-Jacobian approximation).\nfn fbmWarpedG(p: vec2<f32>, octaves: i32, warpAmp: f32) -> vec3<f32> {\n if (warpAmp <= 0.0) { return fbmG(p, octaves); }\n let q = vec2<f32>(fbm(p + vec2<f32>(0.0, 0.0), octaves),\n fbm(p + vec2<f32>(5.2, 1.3), octaves));\n return fbmG(p + warpAmp * (q - 0.5), octaves);\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const METABALL_PALETTE_WGSL = "\n// \u2500\u2500 OKLCh gamut clamp (hue-preserving inward chroma clamp \u2014 blob-local) \u2500\u2500\nfn inGamut(lin: vec3<f32>) -> bool {\n return all(lin >= vec3<f32>(0.0)) && all(lin <= vec3<f32>(1.0));\n}\nfn gamutClampOklch(lch: vec3<f32>) -> vec3<f32> {\n let lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) { return lch; }\n var lo = 0.0;\n var hi = lch.y;\n for (var i = 0; i < 16; i = i + 1) {\n let mid = 0.5 * (lo + hi);\n let test = vec3<f32>(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) { lo = mid; } else { hi = mid; }\n }\n return vec3<f32>(lch.x, lo, lch.z);\n}\n\n// W11.b \u2014 sample the multi-stop palette at t, OKLab mix + midpoint chroma-bump. Returns\n// an OKLCh stop [L, C, h(rad)]. Falls back to uBaseColor when uStopCount <= 1.\nfn samplePaletteOklch(t: f32) -> vec3<f32> {\n let uStopCount = u.ints.x;\n if (uStopCount <= 1) { return oklabToOklch(srgbToOklab(u.base.rgb)); }\n let n = f32(uStopCount);\n let ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n let i0 = i32(floor(ft));\n let i1 = min(i0 + 1, uStopCount - 1);\n let f = ft - f32(i0);\n let labA = srgbToOklab(u.palette[i0].rgb);\n let labB = srgbToOklab(u.palette[i1].rgb);\n let lab = mix(labA, labB, f);\n var lch = oklabToOklch(lab);\n lch.y = lch.y + 0.03 * sin(PI * f);\n return lch;\n}\n\n// AX.W15 \u2014 de-synced breath (three DETUNED sines at irrational ratios).\nfn breath(phase: f32) -> f32 {\n return (sin(phase) + 0.5 * sin(phase * 1.4444 + 1.7) + 0.28 * sin(phase * 0.31 + 4.1)) / 1.78;\n}\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const METABALL_UNIFORMS_GLSL = "#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) \u2014 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) \u2014 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 \u2014 domain-warp strength on the FBM edge displacement (0 = plain fbm).\nuniform float uWarpAmp;\n\n// Lit glass surface (W9.b) \u2014 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) \u2014 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 \u2014 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) \u2014 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";
|
|
1
|
+
export declare const METABALL_UNIFORMS_GLSL = "#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) \u2014 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// BC.W-GOOBLOB-PLAIN \u2014 the STAGE-1 gate. 1.0 = the plain shadowless lightless\n// fill-only floor (variant=\"blob\"); 0.0 = the full lit pipeline (variant=\"meatball\" /\n// STAGE 2). The WebGL2 fallback transcribes the SAME stripped branch the WGSL primary\n// gates (research/viz/goo-blob.md \u00A75 \u2014 the GLSL twin).\nuniform float uStage;\n\n// AX.W16 (arm 5) \u2014 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 \u2014 domain-warp strength on the FBM edge displacement (0 = plain fbm).\nuniform float uWarpAmp;\n\n// Lit glass surface (W9.b) \u2014 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// BC.W-GOOBLOB-MEATBALL \u2014 the procedural 2D SDF soft-shadow march (T2, the GLSL twin of\n// the WGSL res.z/res.w lanes). uShadow gates the IQ rmshadows soft contact shadow that\n// FOLLOWS the irregular silhouette; uShadowSoftness is the penumbra hardness (4-48).\nuniform float uShadow; // 0 = no shadow, 1 = the soft contact shadow ON\nuniform float uShadowSoftness; // penumbra hardness (inverse light-source size, 4-48)\n\n// Iridescence + fake subsurface (W11.a) \u2014 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 \u2014 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) \u2014 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";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const METABALL_WGSL = "\nconst MAX_SATS: i32 = 4;\nconst TRAIL_N: i32 = 15;\nconst MAX_BLOB_STOPS: i32 = 4;\nconst PI: f32 = 3.141592653589793;\n\n// \u2500\u2500 Uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\n// Scalars packed into vec4 lanes; per-satellite / per-trail / per-palette rows packed\n// into a vec4 so the array stride is the natural 16 bytes (no std140 stride trap \u2014 the\n// parity-blowout suspect the wave's \u00A7Triumvirate names).\nstruct Uniforms {\n // s0: (uTime, uBodyRadius, uPulsePhase, uPulseAmp)\n s0: vec4<f32>,\n // s1: (uNoiseAmp, uNoiseFreq, uNoiseSpeed, uWarpAmp)\n s1: vec4<f32>,\n // s2: (uSmoothK, uMerge, uMaxReach, uLit)\n s2: vec4<f32>,\n // s3: (uSpecStrength, uSpecShininess, uRimPower, uRimStrength)\n s3: vec4<f32>,\n // s4: (uIridescence, uIridHue, uIridSpeed, uSssScale)\n s4: vec4<f32>,\n // s5: (uSssPower, uCoreGlow, uHueRange, uSatShift)\n s5: vec4<f32>,\n // s6: (uBrightnessShift, uColorNoiseFreq, uColorNoiseSpeed, uStretch)\n s6: vec4<f32>,\n // s7: (uPointerActive, uPointerAttraction, uPointerStrength, uStage)\n // BC.W-GOOBLOB-PLAIN \u2014 uStage gates the STAGE-1 stripped floor: 1.0 = the plain\n // shadowless lightless fill-only floor (variant=\"blob\"); 0.0 = the full lit\n // pipeline (variant=\"meatball\" / STAGE 2). It rides the spare s7.w lane the typed-\n // struct SoT (uniformBridgeWGPU.ts) reserved.\n s7: vec4<f32>,\n // ptr: (uPointer.x, uPointer.y, uVelocity.x, uVelocity.y)\n ptr: vec4<f32>,\n // base: (uBaseColor.rgb, _pad)\n base: vec4<f32>,\n // rim: (uRimColor.rgb, _pad)\n rim: vec4<f32>,\n // light: (uLightDir.xyz, _pad)\n light: vec4<f32>,\n // res: (uResolution.x, uResolution.y, uShadow, uShadowSoftness)\n // BC.W-GOOBLOB-MEATBALL \u2014 the soft-shadow march rides the spare res.z/res.w lanes the\n // typed-struct SoT (uniformBridgeWGPU.ts) reserved (the EXTEND, never a re-fork): res.z\n // = uShadow (1.0 = the variant=meatball shadow ON), res.w = uShadowSoftness (the\n // penumbra hardness, inverse light-source size \u2192 4-48).\n res: vec4<f32>,\n // ints: (uStopCount, uSatCount, uTrailCount, _pad)\n ints: vec4<i32>,\n palette: array<vec4<f32>, 4>,\n satPos: array<vec4<f32>, 4>, // (pos.x, pos.y, radius, opacity)\n trailPos: array<vec4<f32>, 15>, // (pos.x, pos.y, radius, _pad)\n};\n\n@group(0) @binding(0) var<uniform> u: Uniforms;\n\n// Noise + FBM (BC.W-CARVE6 \u2192 metaball-noise.wgsl) \u2014 spliced AFTER const FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);.\nconst FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);\n\nconst FBM_LACUNARITY: f32 = 1.8;\nconst FBM_GAIN: f32 = 0.42;\n\n// \u2500\u2500 Noise (blob-LOCAL 3D-p3 hash + IQ analytic-derivative gradient noise) \u2500\u2500\nfn hash21(p: vec2<f32>) -> f32 {\n var p3 = fract(vec3<f32>(p.x, p.y, p.x) * 0.1031);\n p3 = p3 + dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// IQ analytic-derivative gradient noise \u2014 value in .x, ANALYTIC gradient (d/dx, d/dy) in\n// .yz, from one eval. The quintic fade has a continuous 2nd derivative.\nfn noised(p: vec2<f32>) -> vec3<f32> {\n let i = floor(p);\n let f = fract(p);\n let uu = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n let du = 30.0 * f * f * (f * (f - 2.0) + 1.0);\n\n let ga = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(0.0, 0.0)), hash21(i + vec2<f32>(7.3, 0.0)));\n let gb = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(1.0, 0.0)), hash21(i + vec2<f32>(8.3, 0.0)));\n let gc = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(0.0, 1.0)), hash21(i + vec2<f32>(7.3, 1.0)));\n let gd = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(1.0, 1.0)), hash21(i + vec2<f32>(8.3, 1.0)));\n\n let va = dot(ga, f - vec2<f32>(0.0, 0.0));\n let vb = dot(gb, f - vec2<f32>(1.0, 0.0));\n let vc = dot(gc, f - vec2<f32>(0.0, 1.0));\n let vd = dot(gd, f - vec2<f32>(1.0, 1.0));\n\n let n = va + uu.x * (vb - va) + uu.y * (vc - va) + uu.x * uu.y * (va - vb - vc + vd);\n let value = 0.5 + 0.5 * n;\n\n let grad =\n ga + uu.x * (gb - ga) + uu.y * (gc - ga) + uu.x * uu.y * (ga - gb - gc + gd) +\n du * (vec2<f32>(uu.y, uu.x) * (va - vb - vc + vd) + vec2<f32>(vb, vc) - va);\n return vec3<f32>(value, 0.5 * grad);\n}\n\nfn fbm(p0: vec2<f32>, octaves: i32) -> f32 {\n var value = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var p = p0;\n for (var i = 0; i < 4; i = i + 1) {\n if (i >= octaves) { break; }\n value = value + amp * noised(p * freq).x;\n p = FBM_ROT * p;\n freq = freq * FBM_LACUNARITY;\n amp = amp * FBM_GAIN;\n }\n return value;\n}\n\n// FBM with ANALYTIC GRADIENT \u2014 value in .x, \u2202/\u2202x, \u2202/\u2202y in .yz. The gradient accumulates\n// noised()'s analytic gradient per octave, chain-ruled through the per-octave frequency\n// scale AND the FBM_ROT rotation (the keystone feed for the analytic surface normal).\nfn fbmG(p: vec2<f32>, octaves: i32) -> vec3<f32> {\n var value = 0.0;\n var grad = vec2<f32>(0.0, 0.0);\n var amp = 0.5;\n var freq = 1.0;\n var rotAccum = mat2x2<f32>(1.0, 0.0, 0.0, 1.0);\n var pp = p;\n for (var i = 0; i < 4; i = i + 1) {\n if (i >= octaves) { break; }\n let n = noised(pp * freq);\n value = value + amp * n.x;\n grad = grad + amp * freq * (transpose(rotAccum) * n.yz);\n pp = FBM_ROT * pp;\n freq = freq * FBM_LACUNARITY;\n amp = amp * FBM_GAIN;\n rotAccum = FBM_ROT * rotAccum;\n }\n return vec3<f32>(value, grad);\n}\n\n// One domain-warp pass with the ANALYTIC GRADIENT carried (warp-Jacobian approximation).\nfn fbmWarpedG(p: vec2<f32>, octaves: i32, warpAmp: f32) -> vec3<f32> {\n if (warpAmp <= 0.0) { return fbmG(p, octaves); }\n let q = vec2<f32>(fbm(p + vec2<f32>(0.0, 0.0), octaves),\n fbm(p + vec2<f32>(5.2, 1.3), octaves));\n return fbmG(p + warpAmp * (q - 0.5), octaves);\n}\n\n\n// \u2500\u2500 SDF body (value+gradient circle + the IQ normalized smin, value+gradient form) \u2500\u2500\nfn sdgCircle(p: vec2<f32>, center: vec2<f32>, radius: f32) -> vec3<f32> {\n let d = p - center;\n let len = length(d);\n var grad = vec2<f32>(0.0, 1.0);\n if (len > 1e-6) { grad = d / len; }\n return vec3<f32>(len - radius, grad);\n}\n\nfn sminQuadraticG(a: vec3<f32>, b: vec3<f32>, k0: f32) -> vec3<f32> {\n let k = k0 * 4.0;\n let h = max(k - abs(a.x - b.x), 0.0) / k;\n let m = h * h * k * 0.25;\n var w = 1.0 - 0.5 * h * h;\n if (a.x < b.x) { w = 0.5 * h * h; }\n let dist = min(a.x, b.x) - m;\n let grad = mix(a.yz, b.yz, w);\n return vec3<f32>(dist, grad);\n}\n\nfn sminCircularG(a: vec3<f32>, b: vec3<f32>, k0: f32) -> vec3<f32> {\n let k = k0 * (1.0 / (1.0 - sqrt(0.5)));\n let h = max(k - abs(a.x - b.x), 0.0) / k;\n let m = k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n var w = 1.0 - 0.5 * h;\n if (a.x < b.x) { w = 0.5 * h; }\n let dist = min(a.x, b.x) - m;\n let grad = mix(a.yz, b.yz, w);\n return vec3<f32>(dist, grad);\n}\n\nfn sminG(a: vec3<f32>, b: vec3<f32>, k: f32) -> vec3<f32> {\n if (u.s2.y > 0.5) { return sminCircularG(a, b, k); }\n return sminQuadraticG(a, b, k);\n}\n\n\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// value.js LINEAR_SRGB_TO_LMS, row-major \u2192 WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS\u2192OKLab coefficients, row-major \u2192 WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF, row-major \u2192 WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB, row-major \u2192 WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\n// OKLCh gamut clamp + palette sample + breath (BC.W-CARVE6 \u2192 metaball-palette.wgsl)\n// \u2014 spliced AFTER \n// value.js LINEAR_SRGB_TO_LMS, row-major \u2192 WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS\u2192OKLab coefficients, row-major \u2192 WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF, row-major \u2192 WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB, row-major \u2192 WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n} (its matrix source).\n\n// \u2500\u2500 OKLCh gamut clamp (hue-preserving inward chroma clamp \u2014 blob-local) \u2500\u2500\nfn inGamut(lin: vec3<f32>) -> bool {\n return all(lin >= vec3<f32>(0.0)) && all(lin <= vec3<f32>(1.0));\n}\nfn gamutClampOklch(lch: vec3<f32>) -> vec3<f32> {\n let lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) { return lch; }\n var lo = 0.0;\n var hi = lch.y;\n for (var i = 0; i < 16; i = i + 1) {\n let mid = 0.5 * (lo + hi);\n let test = vec3<f32>(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) { lo = mid; } else { hi = mid; }\n }\n return vec3<f32>(lch.x, lo, lch.z);\n}\n\n// W11.b \u2014 sample the multi-stop palette at t, OKLab mix + midpoint chroma-bump. Returns\n// an OKLCh stop [L, C, h(rad)]. Falls back to uBaseColor when uStopCount <= 1.\nfn samplePaletteOklch(t: f32) -> vec3<f32> {\n let uStopCount = u.ints.x;\n if (uStopCount <= 1) { return oklabToOklch(srgbToOklab(u.base.rgb)); }\n let n = f32(uStopCount);\n let ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n let i0 = i32(floor(ft));\n let i1 = min(i0 + 1, uStopCount - 1);\n let f = ft - f32(i0);\n let labA = srgbToOklab(u.palette[i0].rgb);\n let labB = srgbToOklab(u.palette[i1].rgb);\n let lab = mix(labA, labB, f);\n var lch = oklabToOklch(lab);\n lch.y = lch.y + 0.03 * sin(PI * f);\n return lch;\n}\n\n// AX.W15 \u2014 de-synced breath (three DETUNED sines at irrational ratios).\nfn breath(phase: f32) -> f32 {\n return (sin(phase) + 0.5 * sin(phase * 1.4444 + 1.7) + 0.28 * sin(phase * 0.31 + 4.1)) / 1.78;\n}\n\n\n// AX.W15 \u2014 the composite SDF field WITH its ANALYTIC GRADIENT vec3(dist, \u2202/\u2202x, \u2202/\u2202y).\nfn sceneDistG(uv: vec2<f32>) -> vec3<f32> {\n let uBodyRadius = u.s0.y;\n let uPulsePhase = u.s0.z;\n let uPulseAmp = u.s0.w;\n let uNoiseAmp = u.s1.x;\n let uNoiseFreq = u.s1.y;\n let uNoiseSpeed = u.s1.z;\n let uWarpAmp = u.s1.w;\n let uSmoothK = u.s2.x;\n let uTime = u.s0.x;\n let uVelocity = u.ptr.zw;\n let uStretch = u.s6.w;\n let uSatCount = u.ints.y;\n let uTrailCount = u.ints.z;\n\n let bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Velocity-driven VOLUME-PRESERVING squash-and-stretch (tanh-saturated).\n var bodyUv = uv;\n var ax = vec2<f32>(1.0, 0.0);\n var perp = vec2<f32>(0.0, 1.0);\n var sa = 1.0;\n let speed = length(uVelocity);\n let squashed = uStretch > 0.0 && speed > 1e-4;\n if (squashed) {\n ax = uVelocity / speed;\n perp = vec2<f32>(-ax.y, ax.x);\n sa = 1.0 + tanh(speed * 1.6) * uStretch;\n bodyUv = vec2<f32>(dot(uv, ax) / sa, dot(uv, perp) * sa);\n }\n\n // Domain-warped FBM displacement WITH its analytic gradient.\n let fbmv = fbmWarpedG(bodyUv * uNoiseFreq + uTime * uNoiseSpeed, 3, uWarpAmp);\n let bodyDisplacement = (fbmv.x - 0.5) * uNoiseAmp;\n let dispGradBody = uNoiseAmp * uNoiseFreq * fbmv.yz;\n\n let bodyG = sdgCircle(bodyUv, vec2<f32>(0.0), bodyR + bodyDisplacement);\n let bodyGradBody = bodyG.yz - dispGradBody;\n\n var bodyGradUv: vec2<f32>;\n if (squashed) {\n let scaled = vec2<f32>(bodyGradBody.x / sa, bodyGradBody.y * sa);\n bodyGradUv = scaled.x * ax + scaled.y * perp;\n } else {\n bodyGradUv = bodyGradBody;\n }\n var d = vec3<f32>(bodyG.x, bodyGradUv);\n\n // Satellites \u2014 smin-merged into the body.\n for (var i = 0; i < MAX_SATS; i = i + 1) {\n if (i >= uSatCount) { break; }\n let s = u.satPos[i];\n var satG = sdgCircle(uv, s.xy, s.z);\n satG.x = satG.x + (1.0 - s.w) * 0.3;\n d = sminG(d, satG, uSmoothK);\n }\n\n // Pointer trail \u2014 a decaying-radius pseudopod.\n for (var i = 0; i < TRAIL_N; i = i + 1) {\n if (i >= uTrailCount) { break; }\n let tp = u.trailPos[i];\n let trailG = sdgCircle(uv, tp.xy, tp.z);\n d = sminG(d, trailG, uSmoothK);\n }\n return d;\n}\n\n// AX.W15 \u2014 the analytic surface normal from the field gradient.\nfn surfaceNormalFromGrad(grad2d: vec2<f32>, d: f32, bodyR: f32) -> vec3<f32> {\n let g = normalize(grad2d + vec2<f32>(1e-6));\n let interior = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);\n let z = sqrt(max(0.0, 1.0 - (1.0 - interior) * (1.0 - interior)));\n return normalize(vec3<f32>(g * (1.0 - z), z) + vec3<f32>(0.0, 0.0, 1e-6));\n}\n\n// \u2500\u2500 BC.W-GOOBLOB-MEATBALL \u2014 the 2D SDF soft-shadow march (IQ rmshadows improved-penumbra,\n// research/viz/goo-blob.md \u00A72.3). A procedural soft contact shadow that FOLLOWS the\n// irregular metaball silhouette (NOT a hard disc / box shadow). Marches a ray from ro\n// along rd (the in-plane projection of uLightDir), accumulating the closest miss via\n// the Aaltonen penumbra (y = h*h/(2*ph) + d = sqrt(h*h - y*y)) that kills the\n// banding the naive res = min(res, h/(w*t)) shows. CHEAP: 24 steps, re-uses the SAME\n// sceneDistG().x field (NO separate field re-eval, NO FBO/multi-pass \u2014 the procedural\n// field needs none, \u00A72.3). w is the penumbra hardness (inverse light-source size \u2192\n// uShadowSoftness). It is derivative-FREE (no fwidth/dpdx/dpdy), so it is fragment-safe\n// here. Returns 1.0 (fully lit) \u2192 0.0 (fully occluded). \u2500\u2500\nfn softShadow2D(ro: vec2<f32>, rd: vec2<f32>, mint: f32, maxt: f32, w: f32) -> f32 {\n var res = 1.0;\n var ph = 1e20;\n var t = mint;\n for (var i = 0; i < 24; i = i + 1) {\n if (t >= maxt) { break; }\n let h = sceneDistG(ro + rd * t).x;\n if (h < 0.001) { return 0.0; }\n let y = h * h / (2.0 * ph);\n let dd = sqrt(max(h * h - y * y, 0.0));\n res = min(res, dd / (w * max(0.001, t - y)));\n ph = h;\n t = t + h;\n }\n return clamp(res, 0.0, 1.0);\n}\n\n// \u2500\u2500 Full-screen triangle vertex stage (the pilot idiom \u2014 no vertex buffer) \u2500\u2500\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) uv: vec2<f32>,\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n var p = vec2<f32>(-1.0, -1.0);\n if (vi == 1u) { p = vec2<f32>(3.0, -1.0); }\n else if (vi == 2u) { p = vec2<f32>(-1.0, 3.0); }\n var out: VSOut;\n out.pos = vec4<f32>(p, 0.0, 1.0);\n // vUv = aPos * 0.5 + 0.5 (the metaball.vert convention).\n out.uv = p * 0.5 + 0.5;\n return out;\n}\n\n// \u2500\u2500 Fragment stage (the main() transcription) \u2500\u2500\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n let uTime = u.s0.x;\n let uBodyRadius = u.s0.y;\n let uPulsePhase = u.s0.z;\n let uPulseAmp = u.s0.w;\n let uMaxReach = u.s2.z;\n let uLit = u.s2.w;\n let uPointerActive = u.s7.x;\n let uPointerAttraction = u.s7.y;\n let uPointerStrength = u.s7.z;\n // BC.W-GOOBLOB-PLAIN \u2014 the STAGE-1 gate (1.0 = the plain shadowless fill-only floor).\n let uStage = u.s7.w;\n let uPointer = u.ptr.xy;\n let uHueRange = u.s5.z;\n let uSatShift = u.s5.w;\n let uBrightnessShift = u.s6.x;\n let uColorNoiseFreq = u.s6.y;\n let uColorNoiseSpeed = u.s6.z;\n let uIridescence = u.s4.x;\n let uIridHue = u.s4.y;\n let uIridSpeed = u.s4.z;\n let uSssScale = u.s4.w;\n let uSssPower = u.s5.x;\n let uCoreGlow = u.s5.y;\n let uSpecStrength = u.s3.x;\n let uSpecShininess = u.s3.y;\n let uRimPower = u.s3.z;\n let uRimStrength = u.s3.w;\n let uLightDir = u.light.xyz;\n let uRimColor = u.rim.rgb;\n // BC.W-GOOBLOB-MEATBALL \u2014 the soft-shadow gate + penumbra hardness (res.z/res.w lanes).\n let uShadow = u.res.z;\n let uShadowSoftness = u.res.w;\n\n var uv = in.uv - 0.5;\n\n // PRE-FBM bounding early-out \u2014 transparent WRITE (not a discard).\n if (dot(uv, uv) > uMaxReach * uMaxReach) {\n return vec4<f32>(0.0);\n }\n\n // Pointer deformation \u2014 sign per AY.W-BLOB-CONFIG D2.\n if (uPointerActive > 0.5) {\n let pointerDir = uPointer - uv;\n let pointerDist = length(pointerDir);\n let influence = smoothstep(0.5, 0.0, pointerDist) * uPointerAttraction * uPointerStrength;\n uv = uv + normalize(pointerDir + vec2<f32>(1e-6)) * influence;\n }\n\n let bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Composite domain-warped membrane field WITH its analytic gradient.\n let scene = sceneDistG(uv);\n let d = scene.x;\n let fieldGrad = scene.yz;\n\n // \u2500\u2500 fwidth SITE #1 (metaball.frag.ts line 266) \u2014 AA-edge half-width from the SDF\n // screen-space gradient. The WGSL fragment-stage fwidth() transcription. \u2500\u2500\n let aa = max(fwidth(d), 1e-6);\n let alpha = 1.0 - smoothstep(-aa, aa, d);\n\n // \u2500\u2500 BC.W-GOOBLOB-MEATBALL \u2014 the WGSL uniformity STRUCTURAL fix (the meatball-armer).\n // The Toksvig screen-space derivative (fwidth SITE #2) is hoisted HERE, into the SAME\n // uniform control flow fwidth(d) above already arms in (top-level fs_main, before the\n // per-fragment alpha < 0.001 early-return and the uLit/uShadow non-uniform branches).\n // WGSL uniformity analysis rejects a fwidth() reached only through a return predicated\n // on a per-fragment value (the alpha < 0.001 early-out) nested under further branches\n // \u2014 exactly the BB residual that kept the normal-derivative inside the lit branch from\n // compiling, so the WGSL primary never armed and GooBlob fell to the WebGL2 net. Nh is\n // the uniform-flow surface normal computed for this derivative ONLY (byte-identical to\n // the lit block's own N = surfaceNormalFromGrad(...) below \u2014 the SAME inputs, so\n // nVar = length(fwidth(Nh)) IS the Toksvig clamp the lit block reads); the named lit-\n // block N stays AFTER the uStage early-return (the STAGE-1 floor reaches no lit work).\n // nVar is a pure uniform-flow value the lit block READS \u2014 no derivative in non-uniform\n // flow; the math is byte-identical to the GLSL fallback's Toksvig clamp, only its\n // EVALUATION POINT moved. The shadow march (T2) reuses d (the same sceneDistG().x).\n let Nh = surfaceNormalFromGrad(fieldGrad, d, bodyR);\n // \u2500\u2500 fwidth SITE #2 (metaball.frag.ts line 364) \u2014 Toksvig normal-variance specular\n // clamp, the WGSL fragment-stage fwidth() of the surface normal. NOW in uniform\n // control flow (the structural fix), so the WGSL primary ARMS + paints the full lit\n // creature instead of falling to the stripped WebGL2 fallback. \u2500\u2500\n let nVar = length(fwidth(Nh));\n\n if (alpha < 0.001) {\n return vec4<f32>(0.0);\n }\n\n // Edit #4 \u2014 perceptually-uniform OKLCh variation.\n let colorNoise = fbm(uv * uColorNoiseFreq + uTime * uColorNoiseSpeed, 3);\n var oklch = samplePaletteOklch(colorNoise);\n\n oklch.z = oklch.z + (colorNoise - 0.5) * uHueRange * (PI / 180.0);\n oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0);\n oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0);\n\n // \u2500\u2500 BC.W-GOOBLOB-PLAIN \u2014 the STAGE-1 stripped floor (variant=blob). \u2500\u2500\n // The minimal verifiable floor: SDF + smin (the meatball field, already in d/\n // alpha above) + fwidth-AA (the crisp alpha above) + warm-cream fill. NO surface\n // normal, NO Fresnel, NO lit glint, NO iridescence, NO fake-SSS, NO shadow \u2014\n // deliberately FLAT. It returns BEFORE any of the STAGE-2 dressing is reached. The\n // STAGE-1 path simply never READS the hoisted Nh/nVar or the lit/shadow blocks; the\n // normal-derivative is now in UNIFORM control flow above (BC.W-GOOBLOB-MEATBALL \u2014 the\n // structural armer), so BOTH the STAGE-1 floor AND the STAGE-2 lit path arm on Metal\n // (the BB residual that kept STAGE 2 falling to the WebGL2 net is CLOSED). The\n // teaching contrast: this is the \"it renders, it meatballs, it works on Safari\"\n // floor STAGE 2 layers the lit/shadow onto via the SAME uniforms.\n if (uStage > 0.5) {\n let okl1 = gamutClampOklch(oklch);\n var lin1 = oklabToLinearSrgb(oklchToOklab(okl1));\n var rgb1 = clamp(linearToSrgb(lin1), vec3<f32>(0.0), vec3<f32>(1.0));\n let fc1 = in.pos.xy;\n let ign1 = fract(52.9829189 * fract(dot(fc1, vec2<f32>(0.06711056, 0.00583715))));\n rgb1 = clamp(rgb1 + (ign1 - 0.5) / 255.0, vec3<f32>(0.0), vec3<f32>(1.0));\n return vec4<f32>(rgb1 * alpha, alpha);\n }\n\n // The named surface normal the lit/iridescence/SSS blocks read (byte-identical inputs to\n // the hoisted Nh above \u2014 the Toksvig nVar = length(fwidth(Nh)) IS this N's screen-space\n // variance). It sits AFTER the uStage early-return so the STAGE-1 floor reaches no lit work.\n let N = surfaceNormalFromGrad(fieldGrad, d, bodyR);\n let V = vec3<f32>(0.0, 0.0, 1.0);\n let thickness = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);\n let fres = pow(1.0 - max(dot(N, V), 0.0), 2.5);\n\n // \u2500\u2500 W11.a iridescence \u2014 warm-biased IQ cosine palette driving OKLCh HUE \u2500\u2500\n if (uIridescence > 0.0) {\n let t = fres + 0.3 * colorNoise + uTime * uIridSpeed;\n let iridHue = uIridHue + 0.18 * PI * cos(2.0 * PI * t);\n let w = fres * uIridescence;\n oklch.z = mix(oklch.z, iridHue, w);\n oklch.y = min(oklch.y + 0.04 * w, oklch.y + 0.08);\n oklch.x = min(oklch.x + 0.05 * w, 1.0);\n }\n\n // \u2500\u2500 W11.a fake subsurface translucency \u2014 thickness inner-glow + back-light \u2500\u2500\n if (uCoreGlow > 0.0 || uSssScale > 0.0) {\n oklch.x = min(oklch.x + uCoreGlow * (1.0 - exp(-3.0 * thickness)), 1.0);\n let L = normalize(uLightDir + vec3<f32>(1e-6));\n let back = pow(clamp(dot(V, -(L + N * thickness)), 0.0, 1.0), uSssPower);\n let sss = back * uSssScale * (1.0 - thickness);\n oklch.x = min(oklch.x + sss, 1.0);\n oklch.z = oklch.z + sss * 0.1 * (1.0 - thickness);\n }\n\n // \u2500\u2500 BC.W-GOOBLOB-MEATBALL \u2014 the soft contact shadow (T2). A procedural soft shadow that\n // FOLLOWS the irregular silhouette: march from this fragment's uv toward the in-plane\n // projection of uLightDir; where the metaball field occludes the light (the body\n // shadows itself opposite the light, a satellite shadows the body across the neck), the\n // march returns < 1 and DARKENS the OKLCh L \u2014 a soft grounded contact band UNDER the\n // dome, congruent with (but PROCEDURAL, silhouette-following, unlike) the CSS gel-dome\n // drop-shadow. Concentrated on the AWAY-facing lower rim (an away-facing weight \u00D7 a\n // thin-rim Gaussian band) so the deep-lit interior + the light-facing edge stay bright\n // and the grounded shadow reads at the lower silhouette edge \u2014 the warm-cream body mean\n // holds. Gated uShadow > 0.5; variant=blob (STAGE 1) ships shadowless. \u2500\u2500\n if (uShadow > 0.5) {\n let L2 = normalize(uLightDir.xy + vec2<f32>(1e-6));\n // w increases with the inverse light-source size \u2192 uShadowSoftness (a harder penumbra at a\n // higher value). Start the march just off the surface so a fragment never self-shadows\n // at t=0; cap the reach at the body span.\n let sh = softShadow2D(uv, L2, max(aa, 0.004), bodyR * 1.5, max(uShadowSoftness, 4.0));\n // The contact band sits on the LOWER rim (the side AWAY from the light) \u2014 gated by\n // dot(fieldGrad, L2) < 0 (the rim facing away from L2) AND the thin-rim weight\n // (a Gaussian band peaking at thickness \u2248 0.18 so the deep-lit interior + the\n // light-facing edge stay BRIGHT \u2014 the warm-cream body mean holds). The 0.20 cap keeps\n // it a soft GROUNDING whisper, never a gouge (the warm-cream identity + the\n // proof:blob-warm-default floor hold).\n let away = clamp(-dot(normalize(fieldGrad + vec2<f32>(1e-6)), L2), 0.0, 1.0);\n let band = exp(-pow((thickness - 0.18) / 0.16, 2.0));\n let shadowDarken = (1.0 - sh) * away * band * 0.20;\n oklch.x = max(oklch.x - shadowDarken, 0.0);\n }\n\n oklch = gamutClampOklch(oklch);\n\n var lin = oklabToLinearSrgb(oklchToOklab(oklch));\n\n // \u2500\u2500 W9.b lit glass surface \u2014 Blinn-Phong glint + Fresnel rim, in LINEAR \u2500\u2500\n if (uLit > 0.5) {\n let L = normalize(uLightDir + vec3<f32>(1e-6));\n let H = normalize(L + V);\n\n let warmCream = oklabToLinearSrgb(oklchToOklab(vec3<f32>(0.97, 0.03, radians(85.0))));\n\n // \u2500\u2500 fwidth SITE #2 \u2014 Toksvig normal-variance specular clamp. nVar is the HOISTED\n // length(fwidth(N)) (BC.W-GOOBLOB-MEATBALL \u2014 computed once at the top of fs_main\n // in uniform control flow, so the WGSL primary ARMS on Metal). The math is\n // byte-identical to the GLSL fallback (length(fwidth(N))); only its evaluation\n // point moved out of this non-uniform if (uLit > 0.5) branch. \u2500\u2500\n let shininess = uSpecShininess / (1.0 + 24.0 * nVar);\n let energyNorm = (shininess + 2.0) / 8.0;\n let spec = pow(max(dot(N, H), 0.0), shininess) * uSpecStrength * energyNorm;\n\n var rimOkl = oklabToOklch(srgbToOklab(uRimColor));\n let bodyL = oklch.x;\n let dL = abs(rimOkl.x - bodyL);\n let lack = clamp((0.22 - dL) / 0.22, 0.0, 1.0);\n // target is a WGSL RESERVED word (W3C WGSL 16.2) so a \"var target\" declaration is an\n // invalid identifier: the shader module fails to compile and the WGSL primary never\n // arms (the GooBlob reserved-keyword bug BC.W-WEBGPU-EVERYWHERE W7 catches). Renamed to\n // a valid identifier; the math + the value are byte-identical.\n var targetL = 0.18;\n if (bodyL < 0.5) { targetL = 0.92; }\n rimOkl.x = clamp(mix(rimOkl.x, targetL, lack), 0.0, 1.0);\n rimOkl.y = rimOkl.y * mix(1.0, 0.5, lack);\n let rimLin = oklabToLinearSrgb(oklchToOklab(rimOkl));\n\n let rimFres = pow(1.0 - max(dot(N, V), 0.0), uRimPower);\n let rim = rimFres * uRimStrength * (1.0 - 0.6 * thickness);\n\n var highlight = max(warmCream * spec, rimLin * rim);\n highlight = min(highlight, vec3<f32>(0.85));\n lin = lin + highlight;\n }\n\n var rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n\n // IGN dither \u2014 1-LSB triangular dither in DISPLAY space, AFTER linearToSrgb.\n let fragCoord = in.pos.xy;\n let ign = fract(52.9829189 * fract(dot(fragCoord, vec2<f32>(0.06711056, 0.00583715))));\n rgb = clamp(rgb + (ign - 0.5) / 255.0, vec3<f32>(0.0), vec3<f32>(1.0));\n\n // premultiply AFTER the OETF: straight-alpha gamma \u2192 premultiplied.\n return vec4<f32>(rgb * alpha, alpha);\n}\n";
|
|
@@ -2,6 +2,21 @@ import type { InjectionKey } from "vue";
|
|
|
2
2
|
export type BlobMood = "idle" | "happy" | "curious" | "sleepy" | "excited";
|
|
3
3
|
/** Smin merge variant — `quadratic` (cheap, creased) | `circular` (rounder menisci). */
|
|
4
4
|
export type BlobMerge = "quadratic" | "circular";
|
|
5
|
+
/**
|
|
6
|
+
* The render-variant axis (BC.W-GOOBLOB-PLAIN — STAGE 1 owns the first two members).
|
|
7
|
+
*
|
|
8
|
+
* - `"blob"` — the STAGE-1 first-principles floor: a plain shadowless lightless
|
|
9
|
+
* fill-only droplet (SDF + smin satellites + fwidth-AA + warm-cream fill). The
|
|
10
|
+
* minimal verifiable "it renders, it meatballs, it works on Safari" register the
|
|
11
|
+
* `uStage` gate strips the lit/shadow blocks for. NO specular, NO iridescence, NO
|
|
12
|
+
* SSS, NO shadow — deliberately minimal.
|
|
13
|
+
* - `"meatball"` — the full lit register (the default): STAGE 2 builds the lit-glass
|
|
14
|
+
* surface / Fresnel rim / iridescence / SSS / shadow ON the same field via the
|
|
15
|
+
* `uLit`/`uShadow` flags. Byte-identical to the pre-STAGE-1 default pipeline.
|
|
16
|
+
*
|
|
17
|
+
* `"dot-matrix"` / `"dot-sphere"` are the later-sub-wave siblings (not STAGE 1).
|
|
18
|
+
*/
|
|
19
|
+
export type BlobVariant = "blob" | "meatball";
|
|
5
20
|
/**
|
|
6
21
|
* Render-quality axis (AX.W16) — `full` (default) renders the metaball pass at the
|
|
7
22
|
* clamped DPR; `half` renders the backing store at HALF resolution and lets the
|
|
@@ -99,6 +114,19 @@ export interface BlobColor {
|
|
|
99
114
|
/** The lit-glass surface — Blinn-Phong glint + Fresnel rim + iridescence/SSS/core-glow. */
|
|
100
115
|
export interface BlobSurface {
|
|
101
116
|
lit: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* The procedural 2D SDF soft-shadow march (BC.W-GOOBLOB-MEATBALL T2). A soft contact
|
|
119
|
+
* shadow FOLLOWING the irregular silhouette (NOT a hard disc/box shadow), gated behind
|
|
120
|
+
* the shader `uShadow` flag. Default ON (the `meatball` register); the `blob` STAGE-1
|
|
121
|
+
* floor ships shadowless via the `uStage` gate.
|
|
122
|
+
*/
|
|
123
|
+
shadow: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Soft-shadow penumbra hardness (BC.W-GOOBLOB-MEATBALL T2) — the inverse light-source
|
|
126
|
+
* size fed to the IQ rmshadows march `w` term (a higher value = a harder penumbra).
|
|
127
|
+
* Range 4–48, default 16.
|
|
128
|
+
*/
|
|
129
|
+
shadowSoftness: number;
|
|
102
130
|
/** CSS color for the Fresnel rim tint (resolved through the `/color` leaf). */
|
|
103
131
|
rimColor: string;
|
|
104
132
|
/** Light direction [x, y, z] (normalized in-shader). */
|
|
@@ -152,6 +180,14 @@ export interface BlobConfig {
|
|
|
152
180
|
color: BlobColor;
|
|
153
181
|
surface: BlobSurface;
|
|
154
182
|
interaction: BlobInteraction;
|
|
183
|
+
/**
|
|
184
|
+
* The render variant (BC.W-GOOBLOB-PLAIN) — `"meatball"` (default, the full lit
|
|
185
|
+
* pipeline) | `"blob"` (the STAGE-1 plain shadowless fill-only floor). `"blob"`
|
|
186
|
+
* sets the shader `uStage` gate so the lit/shadow/iridescence/SSS blocks are NOT
|
|
187
|
+
* reached — the minimal verifiable floor. `"meatball"` is byte-identical to the
|
|
188
|
+
* pre-STAGE-1 default (the `surface.lit` flag still owns the lit-on/off within it).
|
|
189
|
+
*/
|
|
190
|
+
variant: BlobVariant;
|
|
155
191
|
quality: BlobQuality;
|
|
156
192
|
tempo: number;
|
|
157
193
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { GooDotConfig } from "./constants";
|
|
2
|
+
/**
|
|
3
|
+
* GooDotMatrix — the metaball SDF FIELD rendered as a DOT MATRIX (BC.W-VIZ-HYBRID — the
|
|
4
|
+
* hybrid of the goo blob and the dot matrix).
|
|
5
|
+
*
|
|
6
|
+
* The merging metaball reads as a FIELD OF DOTS that flow and merge: a regular grid of small
|
|
7
|
+
* warm-cream dots fills the card, and where the gooey blob is — its core, its satellites, the
|
|
8
|
+
* liquid neck stretching between them — the dots are DENSE, BIG, and BRIGHT; out at the rim
|
|
9
|
+
* and beyond they thin to small and dim, then vanish. As a satellite orbits in and meatballs
|
|
10
|
+
* into the body, the band of dots between them THICKENS into a connected bridge, then snaps
|
|
11
|
+
* back when it absorbs — the gooey form drawn entirely in dots.
|
|
12
|
+
*
|
|
13
|
+
* It re-uses two SOTA primitives the codebase already owns — the goo-blob SDF FIELD
|
|
14
|
+
* (byte-untouched `sceneDistG`) + the dot-matrix RENDER — joined by ONE new idea: the
|
|
15
|
+
* dot-grid OUTPUT stage (`v = thickness(sceneDistG(cellCenter))` drives the dot size +
|
|
16
|
+
* brightness, tixy.land applied to an SDF). Four registers, ONE field: `dot-field` (the
|
|
17
|
+
* §T4 default — the smooth field-driven dot), `dot-dither` (the Bayer8 halftone),
|
|
18
|
+
* `dot-lattice` / `dot-sphere` (the opt-in instanced flow/depth look).
|
|
19
|
+
*
|
|
20
|
+
* WebGPU-FIRST: the dot-stamp fragment over the spliced field; a WebGL2 dot-stamp fallback
|
|
21
|
+
* runs the SAME field + dot grid where WebGPU is absent (born-GPU — no Canvas2D). It composes
|
|
22
|
+
* `useGooDotMatrix` → the `createGpuSubstrate` picker over the ONE canvas lifecycle leaf
|
|
23
|
+
* (offscreen-pause, live-PRM freeze, the shared pointer field) — it never bootstraps its own
|
|
24
|
+
* context. The DEFAULT palette is the warm-cream library identity over a transparent ground;
|
|
25
|
+
* the near-dark + reference reproductions are DEMO presets (presets-in-consumers). The
|
|
26
|
+
* teal-on-navy is GONE entirely.
|
|
27
|
+
*/
|
|
28
|
+
type __VLS_Props = {
|
|
29
|
+
/** The full author schema (the studio's `useConfiguratorState` model). */
|
|
30
|
+
config?: GooDotConfig;
|
|
31
|
+
/**
|
|
32
|
+
* The declarative WCAG-2.2.2 pause seam. `v-model:paused` parks the render loop (the
|
|
33
|
+
* substrate's `manual` suspend) when `true`. Wire `<DockBackgroundToggle>`'s
|
|
34
|
+
* `@update:paused` to this `v-model`.
|
|
35
|
+
*/
|
|
36
|
+
paused?: boolean;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
39
|
+
pause: () => void;
|
|
40
|
+
resume: () => void;
|
|
41
|
+
wake: () => void;
|
|
42
|
+
renderAt: (timeSec: number) => void;
|
|
43
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
"update:paused": (value: boolean) => any;
|
|
45
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
46
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
47
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { fibonacciDot, type Vec3 } from "../../dot-matrix";
|
|
2
|
+
export { fibonacciDot, type Vec3 };
|
|
3
|
+
/** A 2-vector — the NDC lattice anchor. */
|
|
4
|
+
export interface Vec2 {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The §T3 deterministic SCREEN lattice anchor for instance `index` of a `cols`-wide row-major
|
|
10
|
+
* grid at `pitch` NDC spacing, centred on the origin. `rows` is derived so the grid is roughly
|
|
11
|
+
* square (the instance fan-out `cols × rows ≥ count`); the WGSL `gridOrigin(ii, uCols, uPitch)`
|
|
12
|
+
* transcribes this EXACTLY (the round-trip parity anchor):
|
|
13
|
+
*
|
|
14
|
+
* col = index % cols
|
|
15
|
+
* row = floor(index / cols)
|
|
16
|
+
* x = (col - (cols-1)/2) · pitch
|
|
17
|
+
* y = (row - (cols-1)/2) · pitch // a square grid centred on origin
|
|
18
|
+
*
|
|
19
|
+
* The anchors fill a centred `cols × cols` lattice in NDC; the field is sampled AT each anchor
|
|
20
|
+
* for the dot size+brightness, with an opt-in `-grad` flow displacement toward the merging core.
|
|
21
|
+
*/
|
|
22
|
+
export declare function gridOrigin(index: number, cols: number, pitch: number): Vec2;
|
|
23
|
+
/** The Register-B instance count for a `cols`-wide square lattice. */
|
|
24
|
+
export declare function latticeInstanceCount(cols: number): number;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type BlobWGPUUniformScratch } from "../../goo-blob/composables/uniformBridgeWGPU";
|
|
2
|
+
import { type MetaballUniformLocations } from "../../goo-blob/composables/uploadBlobUniforms";
|
|
3
|
+
import { type GooDotUniformScratch } from "./uniformBridgeWGPU";
|
|
4
|
+
export declare const GOO_DOT_LABEL = "[GooDotMatrix]";
|
|
5
|
+
/** The one-time WGPU resources the per-frame closure reads (pipeline + the two buffers + scratch). */
|
|
6
|
+
export interface GooDotWGPUResources {
|
|
7
|
+
pipeline: GPURenderPipeline;
|
|
8
|
+
bindGroup: GPUBindGroup;
|
|
9
|
+
fieldBuffer: GPUBuffer;
|
|
10
|
+
dotBuffer: GPUBuffer;
|
|
11
|
+
fieldScratch: BlobWGPUUniformScratch;
|
|
12
|
+
dotScratch: GooDotUniformScratch;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the WGPU dot-stamp pipeline + the field (binding0) / dot-grid (binding1) uniform
|
|
16
|
+
* buffers + bind group + the two scratch buffers — ONCE on `setupWGPU`. The composable's
|
|
17
|
+
* per-frame closure writes the scratch via the pack helpers then submits the draw.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createGooDotWGPUResources(device: GPUDevice, format: GPUTextureFormat): GooDotWGPUResources;
|
|
20
|
+
/** The dot-grid uniform locations (the dot extend, beside the field locations). */
|
|
21
|
+
export interface GooDotGLUniforms {
|
|
22
|
+
mode: WebGLUniformLocation | null;
|
|
23
|
+
pix: WebGLUniformLocation | null;
|
|
24
|
+
floor: WebGLUniformLocation | null;
|
|
25
|
+
bright: WebGLUniformLocation | null;
|
|
26
|
+
min: WebGLUniformLocation | null;
|
|
27
|
+
max: WebGLUniformLocation | null;
|
|
28
|
+
pr: WebGLUniformLocation | null;
|
|
29
|
+
pm: WebGLUniformLocation | null;
|
|
30
|
+
pa: WebGLUniformLocation | null;
|
|
31
|
+
cursor: WebGLUniformLocation | null;
|
|
32
|
+
bloom: WebGLUniformLocation | null;
|
|
33
|
+
}
|
|
34
|
+
/** The one-time GL resources the per-frame closure reads (program + VAO + the field + dot locations). */
|
|
35
|
+
export interface GooDotGLResources {
|
|
36
|
+
prog: WebGLProgram;
|
|
37
|
+
vs: WebGLShader;
|
|
38
|
+
fs: WebGLShader;
|
|
39
|
+
buf: WebGLBuffer;
|
|
40
|
+
vao: WebGLVertexArrayObject;
|
|
41
|
+
locs: MetaballUniformLocations;
|
|
42
|
+
dU: GooDotGLUniforms;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Build the WebGL2 dot-stamp program + the full-quad VAO + the field uniform-location cache
|
|
46
|
+
* (the SAME UNIFORM_NAMES the field GLSL declares) + the dot-grid uniform locations — ONCE on
|
|
47
|
+
* `setupGL`. The composable's per-frame closure sets the dot uniforms then calls the REUSED
|
|
48
|
+
* goo-blob `uploadBlobUniforms` (which writes the field + issues the draw).
|
|
49
|
+
*/
|
|
50
|
+
export declare function createGooDotGLResources(gl: WebGL2RenderingContext): GooDotGLResources;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { GooDotConfig } from "../constants";
|
|
2
|
+
/** The total dot-grid uniform-buffer byte size (16-aligned). */
|
|
3
|
+
export declare const GOO_DOT_UNIFORM_BYTES = 64;
|
|
4
|
+
/** The dot-mode int the shader branches on (0 = smooth field dot, 1 = Bayer dither). */
|
|
5
|
+
export declare function dotModeFor(variant: GooDotConfig["variant"]): number;
|
|
6
|
+
/** The repel/attract sign for a pointer mode (repel pushes out, attract pulls in). */
|
|
7
|
+
export declare function pointerModeSign(mode: GooDotConfig["pointerMode"]): number;
|
|
8
|
+
/** The transient dot-cursor state the interactive arm writes (closed over, never the config). */
|
|
9
|
+
export interface GooDotPointerState {
|
|
10
|
+
/** Field-uv cursor [-0.5, 0.5] (0,0 = canvas center). */
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
/** 1 while the pointer is over the host, 0 at rest (decays the influence). */
|
|
14
|
+
active: number;
|
|
15
|
+
/** The accel-burst brightness/scale bloom 0..1 (the flick term). */
|
|
16
|
+
bloom: number;
|
|
17
|
+
}
|
|
18
|
+
/** A fresh resting dot-cursor state. */
|
|
19
|
+
export declare function restingDotPointer(): GooDotPointerState;
|
|
20
|
+
export interface GooDotUniformScratch {
|
|
21
|
+
buffer: ArrayBuffer;
|
|
22
|
+
f32: Float32Array;
|
|
23
|
+
}
|
|
24
|
+
export declare function createGooDotScratch(): GooDotUniformScratch;
|
|
25
|
+
/**
|
|
26
|
+
* Pack the per-frame dot-grid uniforms in place. `resolutionPx` drives the cell grid;
|
|
27
|
+
* `pointer` carries the §T7 dot-cursor influence (parallax/swell/bloom). The field lanes are
|
|
28
|
+
* packed SEPARATELY by the goo-blob `packBlobWGPUUniforms` into binding0 — this module owns
|
|
29
|
+
* ONLY the dot-grid lanes (the extend).
|
|
30
|
+
*/
|
|
31
|
+
export declare function packGooDotUniforms(scratch: GooDotUniformScratch, config: GooDotConfig, resolutionPx: {
|
|
32
|
+
w: number;
|
|
33
|
+
h: number;
|
|
34
|
+
}, dpr: number, pointer: GooDotPointerState): GooDotUniformScratch;
|
|
35
|
+
export { restingDotPointer as restingPointer };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import { type GpuBackend } from "../../../../composables/glass/webgpu/useGpuSubstrate";
|
|
3
|
+
import type { GooDotConfig } from "../constants";
|
|
4
|
+
export interface UseGooDotMatrixOptions {
|
|
5
|
+
config: GooDotConfig;
|
|
6
|
+
/** `"capture"` → renderAt-only (the deterministic π capture path). Default `"live"`. */
|
|
7
|
+
mode?: "live" | "capture";
|
|
8
|
+
}
|
|
9
|
+
/** The uniform handle a consumer wires its lifecycle against (backend-agnostic). */
|
|
10
|
+
export interface GooDotMatrixHandle {
|
|
11
|
+
/** The resolved backend (`"webgpu"` where supported, else the WebGL2 fallback). */
|
|
12
|
+
readonly backend: GpuBackend;
|
|
13
|
+
/** Park the loop (the WCAG-2.2.2 pause seam — `DockBackgroundToggle` wires this). */
|
|
14
|
+
pause: () => void;
|
|
15
|
+
/** Re-arm the loop. */
|
|
16
|
+
resume: () => void;
|
|
17
|
+
/** Re-arm a parked loop on demand (a pointer/setter that re-introduced motion). */
|
|
18
|
+
wake: () => void;
|
|
19
|
+
/** Draw one frame out-of-loop (capture / thumbnail). */
|
|
20
|
+
renderAt: (timeSec: number) => void;
|
|
21
|
+
/** The live `prefers-reduced-motion: reduce` state. */
|
|
22
|
+
readonly reducedMotion: boolean;
|
|
23
|
+
/** Tear down the renderer + release GPU/GL resources. */
|
|
24
|
+
dispose: () => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Mount the goo-dot-matrix renderer on `canvasRef`. The WebGPU primary runs the dot-stamp
|
|
28
|
+
* fragment over the byte-untouched goo-blob field; the WebGL2 fallback runs the SAME dot-stamp
|
|
29
|
+
* (the ONE field, the ONE dot-grid output). Returns the uniform lifecycle handle.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useGooDotMatrix(canvasRef: Ref<HTMLCanvasElement | null>, options: UseGooDotMatrixOptions): GooDotMatrixHandle;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { OklchStop } from "../../../composables/color";
|
|
2
|
+
import { type BlobConfig } from "../goo-blob";
|
|
3
|
+
/** The four render registers — the §T4 `variant` axis (default `dot-field`). */
|
|
4
|
+
export type GooDotVariant = "dot-field" | "dot-dither" | "dot-lattice" | "dot-sphere";
|
|
5
|
+
/** Pointer interaction mode — repel pushes dots off the field, attract pulls them in. */
|
|
6
|
+
export type GooDotPointerMode = "repel" | "attract";
|
|
7
|
+
/**
|
|
8
|
+
* Compile-time dot-stamp cell cap (px) — the device-px cell SIZE the fragment quantizes the
|
|
9
|
+
* grid to; mirrors the §T1 `uDotPixelSize` band (a floor so a tiny cell never hangs the
|
|
10
|
+
* fragment over a huge grid). Register-A only.
|
|
11
|
+
*/
|
|
12
|
+
export declare const MIN_DOT_PIXEL_SIZE = 4;
|
|
13
|
+
/** Compile-time lattice column cap — mirrors the Register-B `uCols` instance fan-out. */
|
|
14
|
+
export declare const MAX_LATTICE_COLS = 96;
|
|
15
|
+
/**
|
|
16
|
+
* The full author schema — the studio's `useConfiguratorState` model. The FIELD atoms are
|
|
17
|
+
* REUSED from the goo-blob `BlobConfig` (the metaball field is the byte-untouched goo half),
|
|
18
|
+
* and the DOT-RENDER atoms are ADDED (the §T1/§T2/§T3 dot-grid output). A NEW schema (no
|
|
19
|
+
* prior `goo-dot-matrix`, no MIGRATION row).
|
|
20
|
+
*/
|
|
21
|
+
export interface GooDotConfig {
|
|
22
|
+
/** Which render register — `dot-field` (default) | `dot-dither` | `dot-lattice` | `dot-sphere`. */
|
|
23
|
+
variant: GooDotVariant;
|
|
24
|
+
/**
|
|
25
|
+
* The metaball FIELD config — the byte-untouched goo-blob field atoms (geometry, the
|
|
26
|
+
* smin membrane, the satellites, the warm-cream palette). The hybrid READS the field
|
|
27
|
+
* `sceneDistG`/`thickness` off this; it does not rebuild the math.
|
|
28
|
+
*/
|
|
29
|
+
field: BlobConfig;
|
|
30
|
+
/**
|
|
31
|
+
* The dot-grid CELL size in device px (Register A — §T1 `uDotPixelSize`). Larger cells →
|
|
32
|
+
* coarser dots. Floored at `MIN_DOT_PIXEL_SIZE` so the fragment never over-grids.
|
|
33
|
+
*/
|
|
34
|
+
dotPixelSize: number;
|
|
35
|
+
/** Dot radius MIN (the rim/outside dot, fraction of the cell, §T1 `uDotMin`). */
|
|
36
|
+
dotMin: number;
|
|
37
|
+
/** Dot radius MAX (the core dot, fraction of the cell, §T1 `uDotMax`). */
|
|
38
|
+
dotMax: number;
|
|
39
|
+
/** The field floor below which no dot paints (§T1 `uFieldFloor`). */
|
|
40
|
+
fieldFloor: number;
|
|
41
|
+
/** The dim-outside brightness floor (the dots dim at the rim, §T1 `uDotBrightFloor`). */
|
|
42
|
+
dotBrightFloor: number;
|
|
43
|
+
/**
|
|
44
|
+
* Register-B lattice column count (§T3 `uCols`). The instanced grid is `cols × rows`
|
|
45
|
+
* fit to the aspect; capped at `MAX_LATTICE_COLS`.
|
|
46
|
+
*/
|
|
47
|
+
cols: number;
|
|
48
|
+
/** Register-B flow displacement toward the merging core (§T3 `uFlowAmt`; capped < 0.5 pitch). */
|
|
49
|
+
flowAmt: number;
|
|
50
|
+
/** The dot-color ramp (resolved via the ColorResolver; default warm-cream). */
|
|
51
|
+
palette: OklchStop[];
|
|
52
|
+
/** The ground color (default transparent so the glass card shows through). */
|
|
53
|
+
background: OklchStop | "transparent";
|
|
54
|
+
/** Pointer parallax + repel + accel-burst (the §T7 dot-cursor influence). */
|
|
55
|
+
interactive: boolean;
|
|
56
|
+
/** repel ↔ attract (the dot-influence direction). */
|
|
57
|
+
pointerMode: GooDotPointerMode;
|
|
58
|
+
/** The pointer influence radius (NDC; the §T7 `pointerRadius`). */
|
|
59
|
+
pointerRadius: number;
|
|
60
|
+
/** ONE static frame then park under `prefers-reduced-motion: reduce`. */
|
|
61
|
+
respectReducedMotion: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The warm-cream identity palette (the library default — NOT teal). The dot core is the soft
|
|
65
|
+
* warm cream of the goo-blob bead; the rim fades to warm amber. Mirrors the dot-matrix /
|
|
66
|
+
* dot-flow `WARM_IDENTITY_PALETTE` family — a consumer themes it mono-warm-white-on-near-black
|
|
67
|
+
* through a PRESET, never a token edit.
|
|
68
|
+
*/
|
|
69
|
+
export declare const WARM_IDENTITY_PALETTE: OklchStop[];
|
|
70
|
+
/**
|
|
71
|
+
* The shipped warm-identity default — the §T6 default table: the Register-A field-driven dot
|
|
72
|
+
* stamp over the byte-untouched goo-blob field (the cream metaball), warm-cream dots over a
|
|
73
|
+
* transparent ground (the glass card shows through). The near-dark + reference reproductions
|
|
74
|
+
* are DEMO presets (presets-in-consumers).
|
|
75
|
+
*/
|
|
76
|
+
export declare const DEFAULT_GOO_DOT_CONFIG: GooDotConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as GooDotMatrix } from "./GooDotMatrix.vue";
|
|
2
|
+
export { useGooDotMatrix, type GooDotMatrixHandle, type UseGooDotMatrixOptions, } from "./composables/useGooDotMatrix";
|
|
3
|
+
export { type GooDotConfig, type GooDotVariant, type GooDotPointerMode, DEFAULT_GOO_DOT_CONFIG, WARM_IDENTITY_PALETTE, MIN_DOT_PIXEL_SIZE, MAX_LATTICE_COLS, } from "./constants";
|
|
4
|
+
export { gridOrigin, latticeInstanceCount, fibonacciDot, type Vec2, type Vec3, } from "./composables/gooDotLattice";
|
|
5
|
+
export type { OklchStop } from "../../../composables/color";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The spliced goo-blob field GLSL (decls + sceneDistG/breath/samplePaletteOklch). */
|
|
2
|
+
export declare const GOO_DOT_FIELD_GLSL: string;
|
|
3
|
+
/**
|
|
4
|
+
* The full-quad vertex shader — the BYTE-IDENTICAL metaball.vert convention (the `aPosition`
|
|
5
|
+
* attrib name + `vUv = aPosition·0.5+0.5`), so the goo-blob `uploadBlobUniforms` draw path
|
|
6
|
+
* (the SHARED field upload — `gl.drawArrays(TRIANGLES, 0, 6)` over the `aPosition` quad) is
|
|
7
|
+
* REUSED wholesale for the field lanes; the dot-grid uniforms are set beside it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GOO_DOT_VERT_GLSL = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition * 0.5 + 0.5;\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}";
|
|
10
|
+
/** The Register-A dot-stamp fragment — the GLSL twin of the WGSL `fs_main`. */
|
|
11
|
+
export declare const GOO_DOT_FRAG_GLSL: string;
|
|
@@ -8,9 +8,9 @@ declare const __VLS_base: import("vue").DefineComponent<HandMarkProps, {
|
|
|
8
8
|
play: typeof play;
|
|
9
9
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HandMarkProps> & Readonly<{}>, {
|
|
10
10
|
color: string;
|
|
11
|
+
animation: import("./types").HandAnimation;
|
|
11
12
|
seed: number;
|
|
12
13
|
shape: import("./types").HandShape;
|
|
13
|
-
animation: import("./types").HandAnimation;
|
|
14
14
|
appear: "mount" | "visible" | "manual";
|
|
15
15
|
jagged: boolean;
|
|
16
16
|
brush: import("./brush").BrushName | Partial<import("./brush").Brush>;
|
|
@@ -57,10 +57,20 @@ export interface IconChipProps {
|
|
|
57
57
|
duotone?: boolean;
|
|
58
58
|
/**
|
|
59
59
|
* The chip's own smooth-glass hover register (the backplate mix lifts, a soft
|
|
60
|
-
* glow ring appears, the stroke firms) — on the §6 easing doctrine
|
|
60
|
+
* glow ring appears, the stroke firms) — on the §6 easing doctrine (the GROW
|
|
61
|
+
* rides --spring-smooth, the color cross-fade the bezier), PRM-gated,
|
|
61
62
|
* disco-FREE. Default `false`.
|
|
62
63
|
*/
|
|
63
64
|
bloom?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The louder focal-pop vibrancy axis (BB.W-SUFFUSE3) — re-points the
|
|
67
|
+
* backplate `color-mix` strength off the 25% reference stop to ~40% (more
|
|
68
|
+
* chroma) via `--icon-chip-plate-strength`. STILL the ONE color event per
|
|
69
|
+
* surface (the same event, louder — proof:suffuse d3 counts the event family,
|
|
70
|
+
* not the saturation); the `in srgb` space + the chip≤glyph ratio are
|
|
71
|
+
* untouched. Default `false` (byte-identical to the reference register).
|
|
72
|
+
*/
|
|
73
|
+
saturated?: boolean;
|
|
64
74
|
/**
|
|
65
75
|
* Entrance choreography — composes the shipped `vReveal` directive. A numeric
|
|
66
76
|
* value is the `--d` stagger index; `true` is index 0. PRM-gated by `vReveal`'s
|
|
@@ -23,7 +23,9 @@ export type InstrumentChassisPhase = "ready" | "ping" | "download" | "upload" |
|
|
|
23
23
|
* the structural grooves re-point to the `--silver` quad (the gold quad's
|
|
24
24
|
* cool mirror) instead of the warm-cream `--surface-tint-*` default, so the
|
|
25
25
|
* chassis reads as an INDUSTRIAL precision-instrument housing — the cool-metal
|
|
26
|
-
* twin of the gold "complete"-phase affirmation
|
|
26
|
+
* twin of the warm-gold "complete"-phase affirmation the chassis ships by
|
|
27
|
+
* DEFAULT (the `--phase-complete-color` consumer token defaults to gold;
|
|
28
|
+
* BB.W-PHASE-PALETTE — a consumer may re-ink completion). The phase cascade stays
|
|
27
29
|
* orthogonal (a `structure` chassis still retints on `data-phase`); only the
|
|
28
30
|
* structure-metal recipe forks. The silver is the W-NO-GRAY named cool-neutral
|
|
29
31
|
* exception. Consumer #2 of the silver quad (the atlas's structure surface is
|