@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
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as CompletionSeal } from "./CompletionSeal.vue";
|
|
2
|
+
export type { CompletionSealProps } from "./CompletionSeal.vue";
|
|
3
|
+
export type { CompletionSealShape } from "./constants";
|
|
4
|
+
export { useCompletionSeal, type UseCompletionSeal, type UseCompletionSealOptions, } from "./composables/useCompletionSeal";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ConcentricConfig } from "./constants";
|
|
2
|
+
/**
|
|
3
|
+
* Concentric — a radial Fourier ring-interference field.
|
|
4
|
+
*
|
|
5
|
+
* Concentric ellipsoid rings whose interference is a sum of radial harmonics about
|
|
6
|
+
* one-or-more centers (the cited radial-Fourier math — `composables/ringField.ts`): the
|
|
7
|
+
* same Fourier-series vocabulary the dot-flow-field's wave potential uses, so the suite
|
|
8
|
+
* speaks ONE math language. WebGPU-FIRST: a pure fullscreen fragment pass (the aurora
|
|
9
|
+
* shape-class) evaluates `f(p,t) = Σ_j Σ_i A_i·sin(k_i·‖p−c_j‖_e − ω_i·t + φ_i)` per
|
|
10
|
+
* pixel, with a clean WebGL2 GLSL fallback where WebGPU is absent. It composes
|
|
11
|
+
* `useConcentric` → the `createGpuSubstrate` picker over the ONE canvas lifecycle leaf
|
|
12
|
+
* (offscreen-pause, live-PRM freeze, consumer-owned DPR) — it never bootstraps its own
|
|
13
|
+
* context.
|
|
14
|
+
*
|
|
15
|
+
* The DEFAULT palette is the warm-cream library identity; the demo themes the rings
|
|
16
|
+
* through a PRESET (presets-in-consumers — never a library token).
|
|
17
|
+
*/
|
|
18
|
+
type __VLS_Props = {
|
|
19
|
+
/** The full author schema (the studio's `useConfiguratorState` model). */
|
|
20
|
+
config?: ConcentricConfig;
|
|
21
|
+
/**
|
|
22
|
+
* The declarative WCAG-2.2.2 pause seam. `v-model:paused` parks the render loop
|
|
23
|
+
* (the substrate's `manual` suspend) when `true`. Wire `<DockBackgroundToggle>`'s
|
|
24
|
+
* `@update:paused` to this `v-model`.
|
|
25
|
+
*/
|
|
26
|
+
paused?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
29
|
+
pause: () => void;
|
|
30
|
+
resume: () => void;
|
|
31
|
+
wake: () => void;
|
|
32
|
+
renderAt: (timeSec: number) => void;
|
|
33
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
|
+
"update:paused": (value: boolean) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WebGLCanvasFrame } from "../../../../composables/glass/webgl/useWebGLCanvas";
|
|
2
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
3
|
+
import { type ConcentricConfig } from "../constants";
|
|
4
|
+
import type { RingCenter } from "./ringField";
|
|
5
|
+
export interface ConcentricGLSetupDeps {
|
|
6
|
+
canvas: HTMLCanvasElement;
|
|
7
|
+
config: ConcentricConfig;
|
|
8
|
+
getPalette: () => OklchStop[];
|
|
9
|
+
getCenters: () => RingCenter[];
|
|
10
|
+
shouldContinue: () => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The per-frame pointer hook — useConcentric advances the shared pointer field +
|
|
13
|
+
* injects the transient cursor center here (the no-own-rAF discipline). ZERO own rAF.
|
|
14
|
+
*/
|
|
15
|
+
onFrame?: (timeSec: number) => void;
|
|
16
|
+
}
|
|
17
|
+
/** Build the `setupGL(gl)` callback the `createGpuSubstrate` WebGL2 path invokes. */
|
|
18
|
+
export declare function createConcentricGLSetup(deps: ConcentricGLSetupDeps): (gl: WebGL2RenderingContext) => WebGLCanvasFrame;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
2
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
3
|
+
import type { ConcentricConfig } from "../constants";
|
|
4
|
+
import type { RingCenter } from "./ringField";
|
|
5
|
+
export interface ConcentricWGPUSetupDeps {
|
|
6
|
+
canvas: HTMLCanvasElement;
|
|
7
|
+
config: ConcentricConfig;
|
|
8
|
+
/** The resolved (ColorResolver) palette stops as OKLCh — re-read each frame so a live edit reaches the buffer. */
|
|
9
|
+
getPalette: () => OklchStop[];
|
|
10
|
+
/** The render centers (author + the transient pointer center) — re-read each frame. */
|
|
11
|
+
getCenters: () => RingCenter[];
|
|
12
|
+
/** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
|
|
13
|
+
shouldContinue: () => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The per-frame pointer hook — useConcentric advances the shared `usePointerVelocityField`
|
|
16
|
+
* here (the no-own-rAF discipline: the renderer's frame loop FEEDS `tick(delta)`) and
|
|
17
|
+
* mutates `config.centers` to inject the transient cursor ring-family. ZERO own rAF.
|
|
18
|
+
*/
|
|
19
|
+
onFrame?: (timeSec: number) => void;
|
|
20
|
+
}
|
|
21
|
+
/** Build the concentric `setupWGPU(device, context, format)` callback. */
|
|
22
|
+
export declare function createConcentricWGPUSetup(deps: ConcentricWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/** A 2-vector. */
|
|
2
|
+
export interface Vec2 {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* One CLEAN radial ring component. `amplitude` A_i, `wavelength` λ_i (so k_i = 2π/λ_i),
|
|
8
|
+
* `phase` φ_i. `ω_i = √(g·k_i)` is derived from the dispersion relation, not stored (the
|
|
9
|
+
* SAME dispersion the flow field's Gerstner sum uses — the ONE suite dispersion law). A
|
|
10
|
+
* family carries 1–2 clean low frequencies, NEVER a turbulence octave ladder (the noise
|
|
11
|
+
* amplifier that read as a blur).
|
|
12
|
+
*/
|
|
13
|
+
export interface RingComponent {
|
|
14
|
+
amplitude: number;
|
|
15
|
+
wavelength: number;
|
|
16
|
+
phase: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A ring origin in domain space [-1,1]² (multi-center → interference). `rotAlpha` is the
|
|
20
|
+
* per-family tilt of the ellipsoidal frame (radians) — two families at different tilts cross
|
|
21
|
+
* into rich moiré. It reuses the spare `centers[j].w` uniform lane (no byte-layout change).
|
|
22
|
+
*/
|
|
23
|
+
export interface RingCenter {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
/** Per-center weight (a far center contributes a fainter ring family). */
|
|
27
|
+
weight: number;
|
|
28
|
+
/** The per-family ellipsoid tilt (radians); 0 = the un-rotated frame. */
|
|
29
|
+
rotAlpha: number;
|
|
30
|
+
}
|
|
31
|
+
/** Deep-water gravity constant (normalized; scales the dispersion ω — shared with the flow field). */
|
|
32
|
+
export declare const RING_GRAVITY = 9.81;
|
|
33
|
+
/**
|
|
34
|
+
* The ellipsoidal radial distance ‖p − c‖_e = sqrt((dx/a)² + (dy/b)²) in the family's
|
|
35
|
+
* ROTATED frame R(−α): rotate (p − c) by −α, then scale each axis by (a,b). The axis ratio
|
|
36
|
+
* tilts the rings into ellipses; the rotation tilts the ellipse so crossing families read as
|
|
37
|
+
* distinct waves. The single radial metric the WGSL shader transcribes.
|
|
38
|
+
*/
|
|
39
|
+
export declare function ellipsoidalRadiusRot(p: Vec2, center: RingCenter, axisA: number, axisB: number): number;
|
|
40
|
+
/** The un-rotated ellipsoidal radius (rotAlpha = 0). Kept for the gate's axis-ratio assert. */
|
|
41
|
+
export declare function ellipsoidalRadius(p: Vec2, center: RingCenter, axisA: number, axisB: number): number;
|
|
42
|
+
/**
|
|
43
|
+
* |∇r| of the rotated ellipsoidal radius r = ‖R(−α)(p − c)‖_e. By the chain rule, with
|
|
44
|
+
* u = R(−α)(p − c) and the scaled coordinates (ux/a, uy/b):
|
|
45
|
+
*
|
|
46
|
+
* ∂r/∂p = Rᵀ · ( ux/a² , uy/b² ) / r → |∇r| = sqrt((ux/a²)² + (uy/b²)²) / r
|
|
47
|
+
*
|
|
48
|
+
* (the rotation Rᵀ is orthonormal so it does not change the magnitude). At r→0 the gradient
|
|
49
|
+
* is ill-defined; ε-clamp the denominator. This is the closed-form magnitude the IQ
|
|
50
|
+
* distance-estimation de = |sin(phase)| / (|cos(phase)|·k·|∇r|) divides by.
|
|
51
|
+
*/
|
|
52
|
+
export declare function ellipsoidalGradMag(p: Vec2, center: RingCenter, axisA: number, axisB: number): number;
|
|
53
|
+
/**
|
|
54
|
+
* The radial-Fourier ring-interference value f(p,t) ∈ ℝ — the multi-center weighted sum of
|
|
55
|
+
* CLEAN radial sinusoids. The SINGLE math source the WGSL `fs_main` + the GLSL fallback
|
|
56
|
+
* transcribe. `speed` scales the dispersion ω (the ring-travel speed). Returns the
|
|
57
|
+
* un-normalized field value (the BEAT ENVELOPE the shader tints through the palette).
|
|
58
|
+
*/
|
|
59
|
+
export declare function sampleRingField(p: Vec2, timeSec: number, centers: readonly RingCenter[], rings: readonly RingComponent[], axisA: number, axisB: number, speed: number): number;
|
|
60
|
+
/**
|
|
61
|
+
* The IQ gradient-normalized distance-to-isoline INK at p — the per-pixel line strength,
|
|
62
|
+
* the union (brightest-wins `max`) over every (family × ring) crest. For a sinusoid
|
|
63
|
+
* s = sin(phase), de ≈ |s| / |∇s| = |sin| / (|cos|·k·|∇r|) is the analytic (domain-units)
|
|
64
|
+
* distance to the nearest crest everywhere; the SHADER converts it to a constant PIXEL
|
|
65
|
+
* width via fwidth(phase): dePx = de·gradPhase / fwidth(phase) = |sin|/(|cos|·fwidth(phase)),
|
|
66
|
+
* then line = 1 − smoothstep(lineHalfW, lineHalfW+aa, dePx) with lineHalfW/aa in pixels. The
|
|
67
|
+
* JS takes `phaseDeriv` as the per-pixel phase derivative (the fwidth(phase) analogue) so a
|
|
68
|
+
* node round-trip matches the shader exactly; a bare call uses a representative default.
|
|
69
|
+
*
|
|
70
|
+
* Returns { ink, env } — ink ∈ [0,1] the line strength (the alpha/brightness), env the raw
|
|
71
|
+
* beat-envelope value (the hue driver, identical to sampleRingField).
|
|
72
|
+
*/
|
|
73
|
+
export declare function ringIsolineInk(p: Vec2, timeSec: number, centers: readonly RingCenter[], rings: readonly RingComponent[], axisA: number, axisB: number, speed: number, lineHalfW: number, aa: number, phaseDeriv?: number): {
|
|
74
|
+
ink: number;
|
|
75
|
+
env: number;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Build a CLEAN beating ring FAMILY — 1–2 low-frequency radial sinusoids, NOT a turbulence
|
|
79
|
+
* octave ladder. `baseWavelength` ≈ 0.18 sets the ring spacing; a second harmonic at
|
|
80
|
+
* 0.5×base (optional) adds a subtle inner-ring texture without busying the field. The
|
|
81
|
+
* amplitudes are FLAT (energy is not the point — clean lines are), so each crest paints a
|
|
82
|
+
* crisp isoline. Distinct families get slightly different base wavelengths (a small Δλ) so
|
|
83
|
+
* they BEAT into the moiré envelope — the "distinct waves."
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildRingFamily(baseWavelength: number, harmonics?: number, phaseSeed?: number): RingComponent[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
2
|
+
import type { RingCenter } from "./ringField";
|
|
3
|
+
import { type ConcentricConfig } from "../constants";
|
|
4
|
+
export declare const CONCENTRIC_UNIFORM_BYTES: number;
|
|
5
|
+
/** The field-amplitude normalization scale (field → [0,1] for the palette ramp). */
|
|
6
|
+
export declare const CONCENTRIC_FIELD_NORM = 0.55;
|
|
7
|
+
export interface ConcentricUniformScratch {
|
|
8
|
+
buffer: ArrayBuffer;
|
|
9
|
+
f32: Float32Array;
|
|
10
|
+
i32: Int32Array;
|
|
11
|
+
}
|
|
12
|
+
export declare function createConcentricScratch(): ConcentricUniformScratch;
|
|
13
|
+
/** Pack the concentric uniforms in place. */
|
|
14
|
+
export declare function packConcentricUniforms(scratch: ConcentricUniformScratch, config: ConcentricConfig, timeSec: number, aspect: number, palette: OklchStop[], centersOverride?: readonly RingCenter[]): ConcentricUniformScratch;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import { type GpuBackend } from "../../../../composables/glass/webgpu/useGpuSubstrate";
|
|
3
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
4
|
+
import type { ConcentricConfig } from "../constants";
|
|
5
|
+
export interface UseConcentricOptions {
|
|
6
|
+
config: ConcentricConfig;
|
|
7
|
+
/** Resolve the field-value palette as OKLCh (the demo themes it; default warm-identity). */
|
|
8
|
+
getPalette: () => OklchStop[];
|
|
9
|
+
/** `"capture"` → renderAt-only (the deterministic π capture path). Default `"live"`. */
|
|
10
|
+
mode?: "live" | "capture";
|
|
11
|
+
}
|
|
12
|
+
/** The uniform handle a consumer wires its lifecycle against (backend-agnostic). */
|
|
13
|
+
export interface ConcentricHandle {
|
|
14
|
+
/** The resolved backend (`"webgpu"` where supported, else the WebGL2 GLSL fallback). */
|
|
15
|
+
readonly backend: GpuBackend;
|
|
16
|
+
/** Park the loop (the WCAG-2.2.2 pause seam — `DockBackgroundToggle` wires this). */
|
|
17
|
+
pause: () => void;
|
|
18
|
+
/** Re-arm the loop. */
|
|
19
|
+
resume: () => void;
|
|
20
|
+
/** Re-arm a parked loop on demand. */
|
|
21
|
+
wake: () => void;
|
|
22
|
+
/** Draw one frame out-of-loop (capture / thumbnail). */
|
|
23
|
+
renderAt: (timeSec: number) => void;
|
|
24
|
+
/** The live `prefers-reduced-motion: reduce` state. */
|
|
25
|
+
readonly reducedMotion: boolean;
|
|
26
|
+
/** Tear down the renderer + release GPU/GL resources. */
|
|
27
|
+
dispose: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Mount the concentric renderer on `canvasRef`. The WebGPU primary + the WebGL2 fallback are
|
|
31
|
+
* BOTH pure fullscreen fragment passes evaluating the SAME radial-Fourier field (the ONE
|
|
32
|
+
* math source `ringField.ts`), so the picker is the only seam. Returns the uniform lifecycle
|
|
33
|
+
* handle.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useConcentric(canvasRef: Ref<HTMLCanvasElement | null>, options: UseConcentricOptions): ConcentricHandle;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { RingComponent, RingCenter } from "./composables/ringField";
|
|
2
|
+
import type { OklchStop } from "../../../composables/color";
|
|
3
|
+
/** Compile-time ring-component cap — mirrors the WGSL `MAX_RINGS` #define. */
|
|
4
|
+
export declare const MAX_RINGS = 8;
|
|
5
|
+
/** Compile-time center cap — mirrors the WGSL `MAX_CENTERS` #define. */
|
|
6
|
+
export declare const MAX_CENTERS = 4;
|
|
7
|
+
/** Compile-time palette cap — mirrors the WGSL `MAX_RING_STOPS` #define. */
|
|
8
|
+
export declare const MAX_RING_STOPS = 4;
|
|
9
|
+
/** The render mode — traveling crest-lines, static elevation-contour, or both. */
|
|
10
|
+
export type ConcentricRenderMode = "traveling-rings" | "static-contour" | "both";
|
|
11
|
+
/** Map a render mode to the shader int (the uniform `ints.w` lane). */
|
|
12
|
+
export declare function renderModeToInt(mode: ConcentricRenderMode): number;
|
|
13
|
+
/**
|
|
14
|
+
* The full author schema — the studio's `useConfiguratorState` model. Every field is a
|
|
15
|
+
* tunable the demo configurator drives; the SFC resolves it into the uniform table.
|
|
16
|
+
*/
|
|
17
|
+
export interface ConcentricConfig {
|
|
18
|
+
/** The ring origins (1..MAX_CENTERS) — a multi-center sum produces ring interference. */
|
|
19
|
+
centers: RingCenter[];
|
|
20
|
+
/** The clean radial sum-of-sines table (1..2 frequencies — NOT a turbulence ladder). */
|
|
21
|
+
ringComponents: RingComponent[];
|
|
22
|
+
/** The ellipsoidal-norm axis ratio (a, b) — the tilted-disc depth implication. */
|
|
23
|
+
axisRatio: [number, number];
|
|
24
|
+
/** The ring-travel speed (scales ω). */
|
|
25
|
+
speed: number;
|
|
26
|
+
/** The stroke half-width (field-distance units; the IQ line thickness). */
|
|
27
|
+
lineWidth: number;
|
|
28
|
+
/** The stroke AA softness (field-distance units; the edge feather). */
|
|
29
|
+
lineSoftness: number;
|
|
30
|
+
/** The render mode — traveling crest-lines · static elevation-contour · both. */
|
|
31
|
+
renderMode: ConcentricRenderMode;
|
|
32
|
+
/** The contour-level count for the static-contour mode (4..24). */
|
|
33
|
+
contourLevels: number;
|
|
34
|
+
/** The beat detune — the second ring's wavelength offset that makes the families BEAT. */
|
|
35
|
+
beatDetune: number;
|
|
36
|
+
/** The field-value color ramp (the demo themes it); resolved via the ColorResolver. */
|
|
37
|
+
palette: OklchStop[];
|
|
38
|
+
/** The ground color (default transparent so it reads over the page; demo sets it). */
|
|
39
|
+
background: OklchStop | "transparent";
|
|
40
|
+
/** Pointer adds a transient ring center (a local perturbation about the cursor). */
|
|
41
|
+
interactive: boolean;
|
|
42
|
+
/** ONE static frame then park under `prefers-reduced-motion: reduce`. */
|
|
43
|
+
respectReducedMotion: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The warm-cream identity palette (the library default — NOT a themed hue). A three-stop
|
|
47
|
+
* warm ramp over the warm-cream foreground family, resolved via the ColorResolver: a soft
|
|
48
|
+
* cream trough, a warm amber mid, a deeper ember crest — so the ring LINES read as warm
|
|
49
|
+
* light interference. A consumer (the demo) themes it through a PRESET, never a token edit.
|
|
50
|
+
*/
|
|
51
|
+
export declare const WARM_IDENTITY_PALETTE: OklchStop[];
|
|
52
|
+
/**
|
|
53
|
+
* Build the default clean beating ring table — one base ring + a slightly-detuned twin so
|
|
54
|
+
* the field BEATS into a low-frequency moiré envelope (the "distinct waves"). NOT the
|
|
55
|
+
* retired 5-octave Phillips turbulence ladder.
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildDefaultRingComponents(baseWavelength?: number, beatDetune?: number): RingComponent[];
|
|
58
|
+
/** The default clean beating ring table (2 detuned low-frequency rings). */
|
|
59
|
+
export declare const DEFAULT_RING_COMPONENTS: RingComponent[];
|
|
60
|
+
/**
|
|
61
|
+
* Two ring FAMILIES offset on the diagonal at different tilts — the default interference: a
|
|
62
|
+
* moiré BEAT where the two tilted-ellipsoid families cross (the literal "ellipsoid lines
|
|
63
|
+
* forming distinct waves").
|
|
64
|
+
*/
|
|
65
|
+
export declare const DEFAULT_CENTERS: RingCenter[];
|
|
66
|
+
/** The shipped warm-identity default config — thin bright LINES that beat into waves. */
|
|
67
|
+
export declare const DEFAULT_CONCENTRIC_CONFIG: ConcentricConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Concentric } from "./Concentric.vue";
|
|
2
|
+
export { useConcentric, type ConcentricHandle, type UseConcentricOptions, } from "./composables/useConcentric";
|
|
3
|
+
export { type ConcentricConfig, type ConcentricRenderMode, renderModeToInt, DEFAULT_CONCENTRIC_CONFIG, DEFAULT_RING_COMPONENTS, DEFAULT_CENTERS, WARM_IDENTITY_PALETTE, buildDefaultRingComponents, MAX_RINGS, MAX_CENTERS, MAX_RING_STOPS, } from "./constants";
|
|
4
|
+
export { type RingComponent, type RingCenter, type Vec2, sampleRingField, ringIsolineInk, ellipsoidalRadius, ellipsoidalRadiusRot, ellipsoidalGradMag, buildRingFamily, RING_GRAVITY, } from "./composables/ringField";
|
|
5
|
+
export type { OklchStop } from "../../../composables/color";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The full-screen-triangle vertex shader (the substrate's standard fullscreen pass). */
|
|
2
|
+
export declare const CONCENTRIC_VERT_GLSL = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]\u00B2 domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}";
|
|
3
|
+
/** The concentric fragment source — the aurora-class radial-Fourier isoline render. */
|
|
4
|
+
export declare const CONCENTRIC_FRAG_GLSL = "#version 300 es\nprecision highp float;\n\n#define PI 3.141592653589793\n#define TAU 6.283185307179586\n#define RING_GRAVITY 9.81\n#define MAX_RINGS 8\n#define MAX_CENTERS 4\n#define MAX_RING_STOPS 4\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform float uTime;\nuniform float uSpeed;\nuniform vec2 uAxis; // (a, b) ellipsoidal-norm axis ratio\nuniform float uFieldNorm; // field \u2192 [0,1] amplitude scale\nuniform float uAspect;\nuniform int uCenterCount;\nuniform int uRingCount;\nuniform int uStopCount;\nuniform int uRenderMode; // 0 traveling-rings \u00B7 1 static-contour \u00B7 2 both\nuniform float uHasBackground;\nuniform vec3 uLine; // (lineHalfWidth, aaSoftness, contourLevels) \u2014 stroke geometry\nuniform vec3 uBg; // themed background (linear-sRGB)\nuniform vec3 uRings[MAX_RINGS]; // (amplitude, wavelength, phase)\nuniform vec4 uCenters[MAX_CENTERS]; // (x, y, weight, rotAlpha)\nuniform vec3 uPalette[MAX_RING_STOPS]; // linear-sRGB stops\n\n\nfloat srgbToLinearCh(float c) {\n return c <= 0.04045 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4);\n}\nvec3 srgbToLinear(vec3 c) {\n return vec3(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfloat linearToSrgbCh(float c) {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nvec3 linearToSrgb(vec3 c) {\n return vec3(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// value.js LINEAR_SRGB_TO_LMS (constants.ts), row-major; written here as GLSL\n// columns (= the transpose) so mat3 * vec3 evaluates the row-major M\u00B7v.\nconst mat3 LINEAR_SRGB_TO_LMS = mat3(\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 (gamut.ts lines 295-297 \u2014\n// these differ at the ~1e-9 digit from LMS_TO_OKLAB_MATRIX; use the inline ones to\n// mirror the exact value.js path), row-major \u2192 GLSL columns.\nconst mat3 LMS_TO_OKLAB = mat3(\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 (constants.ts), row-major \u2192 GLSL columns. Rows:\n// l = [1, 0.3963377774, 0.2158037573], m = [1, -0.1055613458, -0.0638541728],\n// s = [1, -0.0894841775, -1.2914855480].\nconst mat3 OKLAB_TO_LMS = mat3(\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 (constants.ts), row-major \u2192 GLSL columns.\nconst mat3 LMS_TO_LINEAR_SRGB = mat3(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nvec3 srgbToOklab(vec3 c) {\n vec3 lin = srgbToLinear(c);\n vec3 lms = LINEAR_SRGB_TO_LMS * lin;\n vec3 lmsCbrt = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0));\n return LMS_TO_OKLAB * lmsCbrt;\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nvec3 oklabToLinearSrgb(vec3 lab) {\n vec3 lms_ = OKLAB_TO_LMS * lab;\n vec3 lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS. Mirrors value.js rawOklabToOklch (which returns\n// degrees; we stay in radians and only fold to [0, 2pi)).\nvec3 oklabToOklch(vec3 lab) {\n float C = length(lab.yz);\n float H = atan(lab.z, lab.y);\n if (H < 0.0) H += 2.0 * PI;\n return vec3(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nvec3 oklchToOklab(vec3 lch) {\n return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\n// rotated ellipsoidal radius \u2014 transcribes ringField.ts ellipsoidalRadiusRot.\nfloat ellipsoidalRadiusRot(vec2 p, vec2 center, float rotAlpha, float axisA, float axisB) {\n float ca = cos(rotAlpha);\n float sa = sin(rotAlpha);\n float px = p.x - center.x;\n float py = p.y - center.y;\n float rx = ca * px + sa * py;\n float ry = -sa * px + ca * py;\n float dx = rx / max(axisA, 1e-4);\n float dy = ry / max(axisB, 1e-4);\n return sqrt(dx * dx + dy * dy);\n}\n\n// |\u2207r| of the rotated ellipsoidal radius \u2014 transcribes ringField.ts ellipsoidalGradMag.\nfloat ellipsoidalGradMag(vec2 p, vec2 center, float rotAlpha, float axisA, float axisB) {\n float ca = cos(rotAlpha);\n float sa = sin(rotAlpha);\n float px = p.x - center.x;\n float py = p.y - center.y;\n float rx = ca * px + sa * py;\n float ry = -sa * px + ca * py;\n float a = max(axisA, 1e-4);\n float b = max(axisB, 1e-4);\n float sx = rx / a;\n float sy = ry / b;\n float r = sqrt(sx * sx + sy * sy);\n float gx = sx / a;\n float gy = sy / b;\n return sqrt(gx * gx + gy * gy) / max(r, 1e-4);\n}\n\n// f(p,t) \u2014 the multi-center weighted radial sum (transcribes ringField.ts sampleRingField).\nfloat sampleRingField(vec2 p, float t) {\n float acc = 0.0;\n for (int j = 0; j < MAX_CENTERS; j++) {\n if (j >= uCenterCount) break;\n vec4 cj = uCenters[j];\n float radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, uAxis.x, uAxis.y);\n float centerSum = 0.0;\n for (int i = 0; i < MAX_RINGS; i++) {\n if (i >= uRingCount) break;\n vec3 r = uRings[i];\n float k = TAU / max(r.y, 1e-4);\n float omega = sqrt(RING_GRAVITY * k) * uSpeed;\n float theta = k * radius - omega * t + r.z;\n centerSum += r.x * sin(theta);\n }\n acc += centerSum * cj.z;\n }\n return acc;\n}\n\n// The IQ gradient-normalized isoline ink + the beat envelope (transcribes ringIsolineInk).\n// Returns vec2(ink, env).\nvec2 ringIsolineInk(vec2 p, float t) {\n float ink = 0.0;\n float env = 0.0;\n float lineHalfW = uLine.x;\n float aa = uLine.y;\n for (int j = 0; j < MAX_CENTERS; j++) {\n if (j >= uCenterCount) break;\n vec4 cj = uCenters[j];\n float radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, uAxis.x, uAxis.y);\n float gradR = ellipsoidalGradMag(p, cj.xy, cj.w, uAxis.x, uAxis.y);\n for (int i = 0; i < MAX_RINGS; i++) {\n if (i >= uRingCount) break;\n vec3 r = uRings[i];\n float k = TAU / max(r.y, 1e-4);\n float omega = sqrt(RING_GRAVITY * k) * uSpeed;\n float phase = k * radius - omega * t + r.z;\n float s = sin(phase);\n float cphase = abs(cos(phase));\n float gradPhase = max(k * gradR, 1e-4);\n // The IQ gradient-normalized distance-to-isoline (domain units; round-trips JS).\n float de = abs(s) / max(cphase * gradPhase, 1e-4);\n // Convert to PIXELS via fwidth(phase) so the stroke is a constant pixel width.\n float dPx = max(fwidth(phase), 1e-4);\n float dePx = de * gradPhase / dPx;\n float lineV = 1.0 - smoothstep(lineHalfW, lineHalfW + aa, dePx);\n // Analytic anti-aliasing: fade lines where the rings pack tighter than a pixel can\n // resolve (fwidth(phase) \u2273 \u03C0, near a center / under DPR) so the field stays thin LINES\n // instead of flooding to a bright slab (IQ filterwidth).\n float aliasFade = 1.0 - smoothstep(PI * 0.6, PI * 1.2, dPx);\n lineV *= aliasFade;\n float w = r.x * cj.z;\n ink = max(ink, lineV * w);\n env += s * w;\n }\n }\n return vec2(clamp(ink, 0.0, 1.0), env);\n}\n\n// The topographic-contour operator (transcribes contourInk).\nfloat contourInk(float envValue, float levels) {\n float fN = envValue * levels;\n float band = abs(fract(fN + 0.5) - 0.5);\n float aaW = max(fwidth(fN), 1e-4);\n return 1.0 - smoothstep(uLine.x, uLine.x + uLine.y, band / aaW);\n}\n\nvec3 samplePaletteLin(float t) {\n if (uStopCount <= 1) return uPalette[0];\n float n = float(uStopCount);\n float ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n int i0 = int(floor(ft));\n int i1 = min(i0 + 1, uStopCount - 1);\n float f = ft - float(i0);\n vec3 lmsA = LINEAR_SRGB_TO_LMS * uPalette[i0];\n vec3 lmsB = LINEAR_SRGB_TO_LMS * uPalette[i1];\n vec3 labA = LMS_TO_OKLAB * (sign(lmsA) * pow(abs(lmsA), vec3(1.0 / 3.0)));\n vec3 labB = LMS_TO_OKLAB * (sign(lmsB) * pow(abs(lmsB), vec3(1.0 / 3.0)));\n return oklabToLinearSrgb(mix(labA, labB, f));\n}\n\nvoid main() {\n float aspect = max(uAspect, 1e-4);\n vec2 p = vec2(vUv.x * aspect, vUv.y);\n\n vec2 ie = ringIsolineInk(p, uTime);\n float ink = ie.x;\n float env = ie.y;\n\n if (uRenderMode == 1) {\n ink = contourInk(env * uFieldNorm, max(uLine.z, 1.0));\n } else if (uRenderMode == 2) {\n ink = max(ink, contourInk(env * uFieldNorm, max(uLine.z, 1.0)));\n }\n ink = clamp(ink, 0.0, 1.0);\n\n // The beat-envelope drives the warm-family tone across the ramp (cream\u2194amber\u2194ember) so the\n // crossing families read as warm-light interference (the warm-cream identity).\n float v = clamp(0.5 + env * uFieldNorm, 0.0, 1.0);\n vec3 lin = samplePaletteLin(v);\n vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));\n\n if (uHasBackground > 0.5) {\n vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));\n fragColor = vec4(mix(bg, rgb, ink), 1.0);\n return;\n }\n float alpha = ink;\n fragColor = vec4(rgb * alpha, alpha);\n}";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CONCENTRIC_WGSL = "\nconst PI: f32 = 3.141592653589793;\nconst TAU: f32 = 6.283185307179586;\nconst RING_GRAVITY: f32 = 9.81;\nconst MAX_RINGS: i32 = 8;\nconst MAX_CENTERS: i32 = 4;\nconst MAX_RING_STOPS: i32 = 4;\n\n// \u2500\u2500 Concentric uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct ConcentricUniforms {\n // u0: (uTime, uSpeed, uAxisA, uAxisB)\n u0: vec4<f32>,\n // ints: (uCenterCount, uRingCount, uStopCount, uRenderMode) // 0 rings \u00B7 1 contour \u00B7 2 both\n ints: vec4<i32>,\n // bg: (background.rgb (linear), hasBackground)\n bg: vec4<f32>,\n // norm: (uFieldNorm, uAspect, _pad, _pad) \u2014 field \u2192 [0,1] scale\n norm: vec4<f32>,\n // line: (lineHalfWidth, aaSoftness, contourLevels, _pad) \u2014 stroke geometry (field units)\n line: vec4<f32>,\n // each ring row: (amplitude, wavelength, phase, _pad)\n rings: array<vec4<f32>, 8>,\n // each center row: (x, y, weight, rotAlpha)\n centers: array<vec4<f32>, 4>,\n // each palette stop: linear-sRGB rgb + _pad\n palette: array<vec4<f32>, 4>,\n};\n\n@group(0) @binding(0) var<uniform> u: ConcentricUniforms;\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// Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the\n// viewport from a single 3-vertex draw \u2014 no vertex buffer.\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) uv: vec2<f32>, // domain [-1,1]\u00B2, aspect-corrected x\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n var corners = array<vec2<f32>, 3>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(3.0, -1.0), vec2<f32>(-1.0, 3.0),\n );\n let c = corners[vi];\n var out: VSOut;\n out.pos = vec4<f32>(c, 0.0, 1.0);\n out.uv = vec2<f32>(c.x, c.y);\n return out;\n}\n\n// The ellipsoidal radial distance in the family's ROTATED frame R(\u2212\u03B1): rotate (p \u2212 c) by\n// \u2212\u03B1, then scale by (a,b). Transcribes ringField.ts ellipsoidalRadiusRot.\nfn ellipsoidalRadiusRot(p: vec2<f32>, center: vec2<f32>, rotAlpha: f32, axisA: f32, axisB: f32) -> f32 {\n let ca = cos(rotAlpha);\n let sa = sin(rotAlpha);\n let px = p.x - center.x;\n let py = p.y - center.y;\n let rx = ca * px + sa * py;\n let ry = -sa * px + ca * py;\n let dx = rx / max(axisA, 1e-4);\n let dy = ry / max(axisB, 1e-4);\n return sqrt(dx * dx + dy * dy);\n}\n\n// |\u2207r| of the rotated ellipsoidal radius \u2014 closed-form (the IQ distance-estimation\n// denominator). Transcribes ringField.ts ellipsoidalGradMag.\nfn ellipsoidalGradMag(p: vec2<f32>, center: vec2<f32>, rotAlpha: f32, axisA: f32, axisB: f32) -> f32 {\n let ca = cos(rotAlpha);\n let sa = sin(rotAlpha);\n let px = p.x - center.x;\n let py = p.y - center.y;\n let rx = ca * px + sa * py;\n let ry = -sa * px + ca * py;\n let a = max(axisA, 1e-4);\n let b = max(axisB, 1e-4);\n let sx = rx / a;\n let sy = ry / b;\n let r = sqrt(sx * sx + sy * sy);\n let gx = sx / a;\n let gy = sy / b;\n return sqrt(gx * gx + gy * gy) / max(r, 1e-4);\n}\n\n// The radial-Fourier ring-interference value f(p,t) \u2014 the multi-center weighted sum of\n// CLEAN radial sinusoids (the BEAT ENVELOPE; transcribes ringField.ts sampleRingField).\nfn sampleRingField(p: vec2<f32>, t: f32) -> f32 {\n var acc = 0.0;\n let speed = u.u0.y;\n let axisA = u.u0.z;\n let axisB = u.u0.w;\n let centerCount = u.ints.x;\n let ringCount = u.ints.y;\n for (var j = 0; j < MAX_CENTERS; j = j + 1) {\n if (j >= centerCount) { break; }\n let cj = u.centers[j];\n let radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, axisA, axisB);\n var centerSum = 0.0;\n for (var i = 0; i < MAX_RINGS; i = i + 1) {\n if (i >= ringCount) { break; }\n let r = u.rings[i];\n let k = TAU / max(r.y, 1e-4);\n let omega = sqrt(RING_GRAVITY * k) * speed;\n let theta = k * radius - omega * t + r.z;\n centerSum = centerSum + r.x * sin(theta);\n }\n acc = acc + centerSum * cj.z;\n }\n return acc;\n}\n\n// The IQ gradient-normalized isoline INK + the beat ENVELOPE \u2014 the per-pixel line strength\n// (brightest-wins union over every family \u00D7 ring crest) and the raw envelope (the hue\n// driver). Transcribes ringField.ts ringIsolineInk.\nstruct InkEnv { ink: f32, env: f32, };\nfn ringIsolineInk(p: vec2<f32>, t: f32) -> InkEnv {\n var ink = 0.0;\n var env = 0.0;\n let speed = u.u0.y;\n let axisA = u.u0.z;\n let axisB = u.u0.w;\n let centerCount = u.ints.x;\n let ringCount = u.ints.y;\n let lineHalfW = u.line.x;\n let aa = u.line.y;\n for (var j = 0; j < MAX_CENTERS; j = j + 1) {\n if (j >= centerCount) { break; }\n let cj = u.centers[j];\n let radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, axisA, axisB);\n let gradR = ellipsoidalGradMag(p, cj.xy, cj.w, axisA, axisB);\n for (var i = 0; i < MAX_RINGS; i = i + 1) {\n if (i >= ringCount) { break; }\n let r = u.rings[i];\n let k = TAU / max(r.y, 1e-4);\n let omega = sqrt(RING_GRAVITY * k) * speed;\n let phase = k * radius - omega * t + r.z;\n let s = sin(phase);\n let cphase = abs(cos(phase));\n let gradPhase = max(k * gradR, 1e-4);\n // The IQ gradient-normalized distance-to-isoline (domain units; round-trips JS).\n let de = abs(s) / max(cphase * gradPhase, 1e-4);\n // Convert the domain-units distance to PIXELS via fwidth(phase) (the device\n // per-pixel phase change) so the stroke is a constant pixel width everywhere \u2014\n // lineHalfW/aa are in pixels (NOT fwidthFine, Compatibility-Mode safe).\n let dPx = max(fwidth(phase), 1e-4);\n let dePx = de * gradPhase / dPx;\n var lineV = 1.0 - smoothstep(lineHalfW, lineHalfW + aa, dePx);\n // Analytic anti-aliasing: where the rings pack tighter than the pixel can resolve\n // (fwidth(phase) \u2273 \u03C0, near a center / under DPR), FADE the line out instead of\n // flooding to a solid mass (IQ filterwidth \u2014 the aliasing-fade that keeps the field\n // thin LINES, not a bright slab where the rings converge).\n let aliasFade = 1.0 - smoothstep(PI * 0.6, PI * 1.2, dPx);\n lineV = lineV * aliasFade;\n let w = r.x * cj.z;\n ink = max(ink, lineV * w);\n env = env + s * w;\n }\n }\n var oe: InkEnv;\n oe.ink = clamp(ink, 0.0, 1.0);\n oe.env = env;\n return oe;\n}\n\n// The topographic-contour operator: the isolines of the STATIC interference envelope at N\n// evenly-spaced heights. de_contour = |fract(f\u00B7N + 0.5) \u2212 0.5| / |fwidth(f\u00B7N)| \u2014 the IQ\n// contour-line form. fwidth is the device pixel-derivative safety clamp on the composite\n// ONLY (NOT fwidthFine \u2014 Compatibility-Mode safe on Metal/WebKit).\nfn contourInk(envValue: f32, levels: f32) -> f32 {\n let fN = envValue * levels;\n let band = abs(fract(fN + 0.5) - 0.5);\n // fwidth is the device pixel-derivative safety clamp (NOT fwidthFine \u2014 Compatibility-Mode\n // safe on Metal/WebKit).\n let aaW = max(fwidth(fN), 1e-4);\n return 1.0 - smoothstep(u.line.x, u.line.x + u.line.y, band / aaW);\n}\n\n// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].\nfn samplePaletteLin(t: f32) -> vec3<f32> {\n let stopCount = u.ints.z;\n if (stopCount <= 1) { return u.palette[0].rgb; }\n let n = f32(stopCount);\n let ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n let i0 = i32(floor(ft));\n let i1 = min(i0 + 1, stopCount - 1);\n let f = ft - f32(i0);\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i0].rgb);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i1].rgb);\n return oklabToLinearSrgb(mix(labA, labB, f));\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n // aspect-correct the domain x so the rings read circular under the ellipsoidal norm.\n let aspect = max(u.norm.y, 1e-4);\n let p = vec2<f32>(in.uv.x * aspect, in.uv.y);\n let t = u.u0.x;\n let mode = u.ints.w; // 0 traveling-rings \u00B7 1 static-contour \u00B7 2 both\n let levels = u.line.z;\n\n // The isoline strokes (the LINES) + the beat envelope (the HUE).\n let oe = ringIsolineInk(p, t);\n var ink = oe.ink;\n let env = oe.env;\n\n // The static-contour mode draws elevation lines of the (static) envelope.\n if (mode == 1) {\n ink = contourInk(env * u.norm.x, max(levels, 1.0));\n } else if (mode == 2) {\n ink = max(ink, contourInk(env * u.norm.x, max(levels, 1.0)));\n }\n // fwidth safety clamp on the final line composite (Compatibility-Mode safe).\n ink = clamp(ink, 0.0, 1.0);\n\n // The beat-envelope drives the warm-family tone across the ramp (cream\u2194amber\u2194ember) so the\n // crossing ring families read as warm-light interference; the saturated mid-amber reads on\n // BOTH the cream page and the dark page (the warm-cream identity, NOT a themed hue).\n let v = clamp(0.5 + env * u.norm.x, 0.0, 1.0);\n let lin = samplePaletteLin(v);\n let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n\n let hasBg = u.bg.w;\n if (hasBg > 0.5) {\n // opaque themed ground: composite the lit line over the themed bg.\n let bg = clamp(linearToSrgb(u.bg.rgb), vec3<f32>(0.0), vec3<f32>(1.0));\n let outRgb = mix(bg, rgb, ink);\n return vec4<f32>(outRgb, 1.0);\n }\n // transparent ground: the LINE carries the alpha \u2014 the page reads through the troughs.\n let alpha = ink;\n return vec4<f32>(rgb * alpha, alpha);\n}\n";
|
|
@@ -9,11 +9,11 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
"open"?: boolean;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_35: {}, __VLS_64: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_35) => any;
|
|
15
15
|
} & {
|
|
16
|
-
action?: (props: typeof
|
|
16
|
+
action?: (props: typeof __VLS_64) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
"update:open": (value: boolean) => any;
|
|
@@ -4,8 +4,13 @@ declare const __VLS_export: import("vue").DefineComponent<ConstellationProps, im
|
|
|
4
4
|
speed: number;
|
|
5
5
|
count: number;
|
|
6
6
|
opacityCeiling: number;
|
|
7
|
+
parallax: number;
|
|
7
8
|
pointerReactive: boolean;
|
|
8
9
|
warpOnClick: boolean;
|
|
10
|
+
wander: boolean | {
|
|
11
|
+
minIdle?: number;
|
|
12
|
+
jitter?: number;
|
|
13
|
+
};
|
|
9
14
|
gravityWell: boolean | {
|
|
10
15
|
holdMs?: number;
|
|
11
16
|
gain?: number;
|
|
@@ -14,10 +19,6 @@ declare const __VLS_export: import("vue").DefineComponent<ConstellationProps, im
|
|
|
14
19
|
maxSpeed?: number;
|
|
15
20
|
soften?: number;
|
|
16
21
|
};
|
|
17
|
-
wander: boolean | {
|
|
18
|
-
minIdle?: number;
|
|
19
|
-
jitter?: number;
|
|
20
|
-
};
|
|
21
22
|
pinned: boolean | number;
|
|
22
23
|
accentEdges: boolean;
|
|
23
24
|
pinnedDrift: boolean | {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WebGLCanvasFrame } from "../../../../composables/glass/webgl/useWebGLCanvas";
|
|
2
|
+
import type { ConstellationRenderState } from "./constellationWGPUSetup";
|
|
3
|
+
export interface ConstellationGLSetupDeps {
|
|
4
|
+
canvas: HTMLCanvasElement;
|
|
5
|
+
resolveFrame: (timeSec: number) => ConstellationRenderState | null;
|
|
6
|
+
onResize?: (w: number, h: number) => void;
|
|
7
|
+
shouldContinue: () => boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Build the `setupGL(gl)` callback the `createGpuSubstrate` WebGL2 path invokes. */
|
|
10
|
+
export declare function createConstellationGLSetup(deps: ConstellationGLSetupDeps): (gl: WebGL2RenderingContext) => WebGLCanvasFrame;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
2
|
+
import { type ConstellationUniformValues, type PackedNode, type PackedEdge } from "./uniformBridgeWGPU";
|
|
3
|
+
/** The per-frame render state the renderer resolves (the stepped field → packed rows). */
|
|
4
|
+
export interface ConstellationRenderState {
|
|
5
|
+
nodes: PackedNode[];
|
|
6
|
+
edges: PackedEdge[];
|
|
7
|
+
uniforms: ConstellationUniformValues;
|
|
8
|
+
}
|
|
9
|
+
export interface ConstellationWGPUSetupDeps {
|
|
10
|
+
canvas: HTMLCanvasElement;
|
|
11
|
+
/** Advance the field + the shared pointer field one renderer frame, return the packed render state. */
|
|
12
|
+
resolveFrame: (timeSec: number) => ConstellationRenderState | null;
|
|
13
|
+
/** Size the canvas backing store (returns the resolved backing-store [w,h] in device px). */
|
|
14
|
+
onResize?: (w: number, h: number) => void;
|
|
15
|
+
/** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
|
|
16
|
+
shouldContinue: () => boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Build the constellation `setupWGPU(device, context, format)` callback. */
|
|
19
|
+
export declare function createConstellationWGPUSetup(deps: ConstellationWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** Floats per node row (one vec4). */
|
|
2
|
+
export declare const NODE_FLOATS = 4;
|
|
3
|
+
/** Bytes per node row. */
|
|
4
|
+
export declare const NODE_BYTES: number;
|
|
5
|
+
/** The pre-sized node storage buffer byte length. */
|
|
6
|
+
export declare const NODES_BUFFER_BYTES: number;
|
|
7
|
+
/** Floats per edge row (2 vec4s). */
|
|
8
|
+
export declare const EDGE_FLOATS = 8;
|
|
9
|
+
/** Bytes per edge row. */
|
|
10
|
+
export declare const EDGE_BYTES: number;
|
|
11
|
+
/** The pre-sized edge storage buffer byte length. */
|
|
12
|
+
export declare const EDGES_BUFFER_BYTES: number;
|
|
13
|
+
export declare const CONSTELLATION_UNIFORM_BYTES = 112;
|
|
14
|
+
export interface ConstellationUniformScratch {
|
|
15
|
+
buffer: ArrayBuffer;
|
|
16
|
+
f32: Float32Array;
|
|
17
|
+
}
|
|
18
|
+
export declare function createConstellationScratch(): ConstellationUniformScratch;
|
|
19
|
+
/** The per-frame uniform values the render reads (resolved JS-side). */
|
|
20
|
+
export interface ConstellationUniformValues {
|
|
21
|
+
resolutionX: number;
|
|
22
|
+
resolutionY: number;
|
|
23
|
+
dpr: number;
|
|
24
|
+
kVis: number;
|
|
25
|
+
time: number;
|
|
26
|
+
lineWidth: number;
|
|
27
|
+
opacityCeiling: number;
|
|
28
|
+
/** The field-yields-to-type `--constellation-alpha` global dimmer. */
|
|
29
|
+
alpha: number;
|
|
30
|
+
edgeAlpha: number;
|
|
31
|
+
edgeFocusAlpha: number;
|
|
32
|
+
edgeAccentAlpha: number;
|
|
33
|
+
edgeFloor: number;
|
|
34
|
+
/** Premultiplied-ready RGBA (`[0,1]`) — `node`/`nodeDim`/`line`/`accent`. */
|
|
35
|
+
node: [number, number, number, number];
|
|
36
|
+
nodeDim: [number, number, number, number];
|
|
37
|
+
line: [number, number, number, number];
|
|
38
|
+
accent: [number, number, number, number];
|
|
39
|
+
}
|
|
40
|
+
/** Pack the constellation uniforms in place. */
|
|
41
|
+
export declare function packConstellationUniforms(scratch: ConstellationUniformScratch, v: ConstellationUniformValues): ConstellationUniformScratch;
|
|
42
|
+
/** A pre-sized node scratch (`MAX_NODES` rows × NODE_FLOATS). */
|
|
43
|
+
export declare function createNodeScratch(): Float32Array;
|
|
44
|
+
/** A pre-sized edge scratch (`E_MAX` rows × EDGE_FLOATS). */
|
|
45
|
+
export declare function createEdgeScratch(): Float32Array;
|
|
46
|
+
/** A packed node row in screen-px: `(x, y, radius, dim)`. */
|
|
47
|
+
export interface PackedNode {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
r: number;
|
|
51
|
+
dim: number;
|
|
52
|
+
}
|
|
53
|
+
/** Pack `count` node rows into the scratch (clamped to MAX_NODES). Returns the count packed. */
|
|
54
|
+
export declare function packNodes(scratch: Float32Array, nodes: readonly PackedNode[]): number;
|
|
55
|
+
/** A packed edge row: `(ax, ay, bx, by, alpha, accent, focus)`. */
|
|
56
|
+
export interface PackedEdge {
|
|
57
|
+
ax: number;
|
|
58
|
+
ay: number;
|
|
59
|
+
bx: number;
|
|
60
|
+
by: number;
|
|
61
|
+
alpha: number;
|
|
62
|
+
accent: number;
|
|
63
|
+
focus: number;
|
|
64
|
+
}
|
|
65
|
+
/** Pack `count` edge rows into the scratch (clamped to E_MAX). Returns the count packed. */
|
|
66
|
+
export declare function packEdges(scratch: Float32Array, edges: readonly PackedEdge[]): number;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
+
import { type GpuBackend } from "../../../../composables/glass/webgpu/useGpuSubstrate";
|
|
2
3
|
import { type ConstellationField, type ConstellationProps } from "../constellationField";
|
|
3
4
|
/** The imperative seam the SFC re-exposes via `defineExpose`. */
|
|
4
5
|
export interface ConstellationExpose {
|
|
5
6
|
field: ConstellationField;
|
|
6
7
|
isFrozen: Ref<boolean>;
|
|
8
|
+
/** The resolved backend (`"webgpu"` where supported, else the WebGL2 instanced twin). */
|
|
9
|
+
backend: () => GpuBackend;
|
|
7
10
|
warpTo(a: {
|
|
8
11
|
x: number;
|
|
9
12
|
y: number;
|
|
@@ -13,14 +16,4 @@ export interface ConstellationExpose {
|
|
|
13
16
|
warpSettled(): boolean;
|
|
14
17
|
pinNode(idx: number): void;
|
|
15
18
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Drive a `<Constellation>` instance. `props` is the REACTIVE (defaulted) prop
|
|
18
|
-
* surface — the per-frame live-read props (`pointerReactive`/`opacityCeiling`/
|
|
19
|
-
* `accentEdges`/`drawOverlay`) are read off `props.x` INSIDE the render loop so a
|
|
20
|
-
* bound `:opacity-ceiling` updates without a remount (the Vue 3.5 reactive-prop
|
|
21
|
-
* read; the SFC `defineProps` destructure transform does not reach a composable
|
|
22
|
-
* argument, so the live reads stay on `props`). `hostRef`/`canvasRef` are the SFC
|
|
23
|
-
* template refs. Returns the imperative expose object the SFC spreads into
|
|
24
|
-
* `defineExpose`.
|
|
25
|
-
*/
|
|
26
19
|
export declare function useConstellation(props: ConstellationProps, hostRef: Ref<HTMLElement | null>, canvasRef: Ref<HTMLCanvasElement | null>): ConstellationExpose;
|
|
@@ -59,3 +59,36 @@ export declare const DEFAULT_PINNED_DRIFT_JITTER = 8000;
|
|
|
59
59
|
* ≥ ~0.72·BASE_WIDTH ≈ 922px (incl. the 1280 export frame — byte-identical
|
|
60
60
|
* there by construction); below it the marks stop crushing sub-pixel. */
|
|
61
61
|
export declare const DEFAULT_K_FLOOR = 0.72;
|
|
62
|
+
/**
|
|
63
|
+
* The maximum node count the points/edges buffers pre-size for (the slider cap — a count
|
|
64
|
+
* above this is clamped at upload). ≫ this BOOKS the compute neighbor-bin path.
|
|
65
|
+
*/
|
|
66
|
+
export declare const MAX_NODES = 256;
|
|
67
|
+
/**
|
|
68
|
+
* The per-node max degree budget — the edge buffer is pre-sized at `MAX_NODES · MAX_DEGREE`
|
|
69
|
+
* so the CPU all-pairs scan never overflows it (a denser-than-degree neighborhood drops the
|
|
70
|
+
* weakest edges, never re-allocates). 12 is a generous incident-edge ceiling for a
|
|
71
|
+
* distance-threshold ε-proximity graph at the default link/count.
|
|
72
|
+
*/
|
|
73
|
+
export declare const MAX_DEGREE = 12;
|
|
74
|
+
/** The pre-sized edge instance budget (`MAX_NODES · MAX_DEGREE`). */
|
|
75
|
+
export declare const E_MAX: number;
|
|
76
|
+
/**
|
|
77
|
+
* The pointer-parallax depth default (§6). Each node carries a seeded depth `z ∈ [0,1]`;
|
|
78
|
+
* the pointer offsets node screen positions by `parallax · z · (pointer − center)` — a
|
|
79
|
+
* cheap pointer-parallax giving the flat lattice apparent depth (the Awwwards "living
|
|
80
|
+
* network" register). Additive default-on at a SUB-PERCEPTUAL 0.08 (a hair of depth, not a
|
|
81
|
+
* behavior break). 0 = the flat lattice (no parallax).
|
|
82
|
+
*/
|
|
83
|
+
export declare const DEFAULT_PARALLAX = 0.08;
|
|
84
|
+
/**
|
|
85
|
+
* The base node radius band (CSS px) the DPR-aware SDF circle sizes within (the §1 "Node
|
|
86
|
+
* size" config axis). `seedField` rolls each node's radius in `[NODE_R_MIN, NODE_R_MIN +
|
|
87
|
+
* NODE_R_SPREAD)` (the prior `1.6 + rng()*1.6` band, named); the WGSL/GLSL fragment SDF
|
|
88
|
+
* sizes `half = radius · uKVis · uDpr / uResolution` so the disc samples at full device
|
|
89
|
+
* resolution and is AA'd by the pixel-footprint derivative — crisp at ANY DPR.
|
|
90
|
+
*/
|
|
91
|
+
export declare const NODE_R_MIN = 1.6;
|
|
92
|
+
export declare const NODE_R_SPREAD = 1.6;
|
|
93
|
+
/** The hairline edge half-width (CSS px) the instanced segment-quad fragment AAs. */
|
|
94
|
+
export declare const DEFAULT_LINE_WIDTH = 1;
|
|
@@ -39,4 +39,34 @@ export declare function refitField(field: ConstellationField, prevW: number, pre
|
|
|
39
39
|
* `setWarpTarget` to a random node when it elapses AND the spring has settled
|
|
40
40
|
* (a click-warp in flight pre-empts the cadence — `warpSettled` reports false).
|
|
41
41
|
*/
|
|
42
|
-
export declare function stepField(field: ConstellationField, k: number, speed: number, pointer: ConstellationPointer | null, dt?: number, now?: number, rng?: () => number): void;
|
|
42
|
+
export declare function stepField(field: ConstellationField, k: number, speed: number, pointer: ConstellationPointer | null, dt?: number, now?: number, rng?: () => number, pointerVel?: ConstellationPointer | null): void;
|
|
43
|
+
import type { ConstellationEdge } from "./constellationTypes";
|
|
44
|
+
/**
|
|
45
|
+
* Scan the proximity graph and return its edge SET (the `1 − d²/reach²` distance-falloff
|
|
46
|
+
* weight per pair within `reach = link·k`). `accentIndex ≥ 0` marks the edges incident on
|
|
47
|
+
* that node (the flagged-node tether). Pure + node-testable; the render loop calls it each
|
|
48
|
+
* frame and uploads the result to the instanced-lines storage buffer.
|
|
49
|
+
*
|
|
50
|
+
* `eMax` caps the result (the pre-sized buffer budget). When the scan would exceed it, the
|
|
51
|
+
* WEAKEST overflow edges are dropped (a denser-than-budget neighborhood keeps its strongest
|
|
52
|
+
* links — never re-allocates the GPU buffer mid-frame).
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildEdges(field: ConstellationField, link: number, accentIndex?: number, eMax?: number): ConstellationEdge[];
|
|
55
|
+
/**
|
|
56
|
+
* Append the POINTER-WEB tether edges to an existing edge set (the `drawPointerWeb` math
|
|
57
|
+
* relocated): the cursor is a "virtual node" whose incident edges (to every node within
|
|
58
|
+
* `reach`) carry `focus = 1` (the render strokes them at the focus alpha). No-op when the
|
|
59
|
+
* pointer is inactive (`x < 0`). The `eMax` budget is shared with the ambient set.
|
|
60
|
+
*/
|
|
61
|
+
export declare function appendPointerWeb(edges: ConstellationEdge[], field: ConstellationField, link: number, pointer: ConstellationPointer | null, eMax?: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* The parallax-offset SCREEN position for a node (§6). Offsets the node by
|
|
64
|
+
* `parallax · z · (pointer − center)` — a cheap pointer-parallax giving the flat lattice
|
|
65
|
+
* apparent depth (deeper nodes — higher `z` — shift more, the Awwwards "living network"
|
|
66
|
+
* register). When the pointer is inactive the offset is 0 (the flat lattice). Pure; the
|
|
67
|
+
* render loop maps each node's `(x,y)` through this before writing the GPU position buffer.
|
|
68
|
+
*/
|
|
69
|
+
export declare function parallaxNodePos(node: ConstellationNode, pointer: ConstellationPointer | null, w: number, h: number, parallax: number): {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
};
|