@mkbabb/glass-ui 4.0.0 → 4.0.1
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-CW7a0m8M.js +253 -0
- package/dist/{CommandShortcut-DdtWXxOK.js → CommandShortcut-DvZNQ_HF.js} +4 -4
- package/dist/ConfiguratorRow-BR4l-ixA.js +143 -0
- package/dist/{ContextMenuContent-ON3x7cuk.js → ContextMenuContent-uWnVxDab.js} +1 -1
- package/dist/{ContextMenuSubContent-B0Vs6atR.js → ContextMenuSubContent-xol4sD2q.js} +32 -37
- package/dist/{DataTable-C464Zbqd.js → DataTable-CuKwF7wr.js} +4 -4
- package/dist/{DialogContent-DDE6pQBU.js → DialogContent-DcKK8k9i.js} +5 -5
- package/dist/{DialogFooter-8eZbdmPc.js → DialogFooter-BZNX5aVr.js} +3 -3
- package/dist/{FadingScroll-DwNnvKMs.js → FadingScroll-DI6hQhT9.js} +1 -1
- package/dist/{HoverCardContent-DkMaQzH5.js → HoverCardContent-b2uaAMRR.js} +1 -1
- package/dist/{HoverPopover-Dpzwvc4t.js → HoverPopover-CbqbNwgU.js} +2 -2
- package/dist/{IconChip-BDw1j5mu.js → IconChip-BTD-nay5.js} +3 -2
- package/dist/{IconTooltip-DSjasZIt.js → IconTooltip-Bl8gFZ8d.js} +1 -1
- package/dist/{Input-DVG_J0ne.js → Input-h9v5LeXf.js} +1 -1
- package/dist/{MetricBadge-BpC0R_Ec.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-VUwexFUf.js +43 -0
- package/dist/NumberFieldContent-Cq7EzX-U.js +138 -0
- package/dist/{PopoverContent-BTorlp--.js → PopoverContent-DL7E6vJP.js} +4 -4
- package/dist/{Progress-hAT4gqGH.js → Progress-DctG61iZ.js} +4 -4
- package/dist/{ScrollingText-CUVFTWk2.js → ScrollingText-yOpBzFYq.js} +2 -2
- package/dist/{SelectScrollDownButton-C1jb3b3K.js → SelectScrollDownButton-CrA8F0iV.js} +18 -19
- package/dist/Toaster-Bw4xR8xV.js +274 -0
- package/dist/{ToggleGroupItem-Dzk9hWsF.js → ToggleGroupItem-pEM9vIhs.js} +50 -37
- package/dist/{TooltipProvider-B3MkB_8P.js → TooltipProvider-rzvnXz60.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +8 -3
- package/dist/api/types-extra.d.ts +6 -0
- package/dist/aurora.js +885 -242
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +106 -0
- package/dist/{button-BNDWhAZb.js → button-DYCUa-tH.js} +71 -26
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +2 -2
- package/dist/carousel.js +93 -110
- package/dist/collapsible.js +1 -1
- package/dist/command.js +1 -1
- package/dist/compile-CQEFRTmx.js +19 -0
- 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/runtime.d.ts +19 -0
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +5 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +51 -0
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +29 -0
- package/dist/components/custom/aurora/constants/budget.d.ts +21 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +2 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +63 -12
- 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/useBorderSpectrum.d.ts +22 -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/concentric/Concentric.vue.d.ts +39 -0
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +11 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +44 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +13 -0
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +35 -0
- package/dist/components/custom/concentric/constants.d.ts +43 -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/dock/DockIconButton.vue.d.ts +13 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +75 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -0
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +38 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +41 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +34 -0
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -0
- package/dist/components/custom/dot-flow-field/constants.d.ts +48 -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 +20 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.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 +75 -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/fourier-field/FourierField.vue.d.ts +12 -2
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +39 -0
- package/dist/components/custom/fourier-field/constants.d.ts +7 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +1 -1
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +4 -2
- 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/shaders/metaball.wgsl.d.ts +1 -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/metric-stack/MetricStack.vue.d.ts +1 -1
- 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/tabs/SegmentedTabs.vue.d.ts +10 -0
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +1 -1
- package/dist/components/ui/_shared/menuItemVariants.d.ts +1 -1
- 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 +34 -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 +2 -0
- 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/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/focus-scope/FocusScope.vue.d.ts +20 -0
- package/dist/components/ui/focus-scope/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- 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/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/vSpecular.d.ts +2 -0
- package/dist/composables/glass/webgl/shaders/flow.glsl.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 +54 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +84 -0
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/index.d.ts +4 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +59 -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/concentric.d.ts +1 -0
- package/dist/concentric.js +562 -0
- package/dist/configurator.js +3 -2
- package/dist/confirm-dialog.js +22 -24
- package/dist/constellation.js +11 -11
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +1 -1
- package/dist/createCanvasLifecycle-CHD5XrDW.js +82 -0
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +564 -457
- 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 +604 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +380 -0
- package/dist/{dropdown-menu-BJ7E9js_.js → dropdown-menu-CofSZuk8.js} +14 -15
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.d.ts +1 -0
- package/dist/easing.js +463 -0
- package/dist/expandable-container.js +7 -4
- package/dist/fading-scroll.js +1 -1
- package/dist/focus-scope.d.ts +1 -0
- package/dist/focus-scope.js +23 -0
- package/dist/forms.js +7 -7
- package/dist/fourier-field.js +128 -116
- 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 +149 -341
- package/dist/goo-blob.js +830 -224
- 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 +1 -1
- package/dist/instrument-chassis.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +4 -8
- package/dist/motion-core.js +36 -36
- package/dist/motion-curves.js +1 -1
- package/dist/motion.js +157 -55
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{compile-EXXzEr1q.js → procedural-color.glsl-CIFsJhwI.js} +1 -155
- package/dist/procedural-color.wgsl-CToRHugY.js +224 -0
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +9 -11
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-CquRYOAw.js → sheet-tZMg0E0w.js} +5 -5
- package/dist/sheet.js +1 -1
- package/dist/{slider-DQ95MET2.js → slider-DVb4HXU-.js} +3 -3
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spa-view.d.ts +1 -0
- package/dist/spa-view.js +46 -0
- package/dist/styles/animations.css +33 -9
- package/dist/styles/border-progress.css +109 -0
- package/dist/styles/cards.css +76 -0
- package/dist/styles/components.css +1 -1
- package/dist/styles/critical-partition.mjs +140 -0
- package/dist/styles/critical.css +12 -0
- package/dist/styles/deferred.css +31 -0
- package/dist/styles/dock/density.css +45 -0
- package/dist/styles/dock/layers.css +54 -30
- package/dist/styles/dock/morph.css +124 -7
- package/dist/styles/dock/overflow.css +16 -2
- package/dist/styles/dock/shell.css +54 -16
- package/dist/styles/dock.css +32 -0
- package/dist/styles/drawer.css +81 -35
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +87 -31
- package/dist/styles/glass/material.css +78 -15
- package/dist/styles/glass/reveal.css +136 -0
- package/dist/styles/glass/rim.css +100 -0
- package/dist/styles/glass/surfaces.css +101 -3
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +3 -0
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +77 -15
- package/dist/styles/index.css +21 -9
- package/dist/styles/instrument-chassis.css +66 -3
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/segmented-tabs.css +31 -0
- package/dist/styles/theme/bridges.css +11 -0
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +6 -1
- package/dist/styles/tokens/dark-arm.css +98 -26
- package/dist/styles/tokens/glass-deep.css +75 -0
- package/dist/styles/tokens/glass-fx.css +333 -0
- package/dist/styles/tokens/glass.css +39 -319
- package/dist/styles/tokens/light-dark.css +15 -2
- package/dist/styles/tokens/offsets.css +116 -0
- package/dist/styles/tokens/on-glass-fg.css +39 -0
- package/dist/styles/tokens/property-regs.css +127 -0
- package/dist/styles/tokens/scale-paper.css +117 -89
- package/dist/styles/tokens/scheme-motion.css +70 -32
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/{offsets-sizing.css → sizing.css} +37 -100
- package/dist/styles/tokens.css +9 -3
- package/dist/styles/typography/semantic.css +8 -8
- package/dist/styles/typography/utilities.css +22 -7
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +255 -0
- package/dist/styles/utilities/base.css +47 -261
- package/dist/styles/utilities/btn.css +3 -1
- package/dist/styles/utilities/metal.css +189 -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-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/useCanvas2D-B8w_E3Rr.js +83 -0
- package/dist/useConfiguratorState-DNlOh6c8.js +161 -0
- package/dist/useDragMorph-DgxnsVJz.js +102 -0
- package/dist/useLiquidPress-kfb4KX79.js +39 -0
- package/dist/usePointerVelocityField-JbRd5CrM.js +137 -0
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-q1amq1SJ.js +71 -0
- package/dist/useSpringPress-BsqPr7FJ.js +34 -0
- package/dist/{useTouchGate-28Tk2-t2.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/vSpecular-CQFmLNzA.js +68 -0
- package/dist/vendor-CKmzio-i.js +226 -0
- package/dist/watercolor-dot.js +2 -2
- package/package.json +126 -22
- package/src/styles/animations.css +33 -9
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +76 -0
- package/src/styles/critical-partition.mjs +140 -0
- package/src/styles/dock/density.css +45 -0
- package/src/styles/dock/layers.css +54 -30
- package/src/styles/dock/morph.css +124 -7
- package/src/styles/dock/overflow.css +16 -2
- package/src/styles/dock/shell.css +54 -16
- package/src/styles/dock.css +32 -0
- package/src/styles/drawer.css +81 -35
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +87 -31
- package/src/styles/glass/material.css +78 -15
- package/src/styles/glass/reveal.css +136 -0
- package/src/styles/glass/rim.css +100 -0
- package/src/styles/glass/surfaces.css +101 -3
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +3 -0
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +77 -15
- package/src/styles/index.css +12 -0
- package/src/styles/instrument-chassis.css +66 -3
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/segmented-tabs.css +31 -0
- package/src/styles/theme/bridges.css +11 -0
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +6 -1
- package/src/styles/tokens/dark-arm.css +98 -26
- package/src/styles/tokens/glass-deep.css +75 -0
- package/src/styles/tokens/glass-fx.css +333 -0
- package/src/styles/tokens/glass.css +39 -319
- package/src/styles/tokens/light-dark.css +15 -2
- package/src/styles/tokens/offsets.css +116 -0
- package/src/styles/tokens/on-glass-fg.css +39 -0
- package/src/styles/tokens/property-regs.css +127 -0
- package/src/styles/tokens/scale-paper.css +117 -89
- package/src/styles/tokens/scheme-motion.css +70 -32
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/{offsets-sizing.css → sizing.css} +37 -100
- package/src/styles/tokens.css +9 -3
- package/src/styles/typography/semantic.css +8 -8
- package/src/styles/typography/utilities.css +22 -7
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +255 -0
- package/src/styles/utilities/base.css +47 -261
- package/src/styles/utilities/btn.css +3 -1
- package/src/styles/utilities/metal.css +189 -0
- package/src/styles/utilities.css +14 -7
- package/dist/CardAction-XH4YBVEK.js +0 -158
- package/dist/Notification-DKjKsQq8.js +0 -100
- package/dist/NumberFieldContent-1VtwDSgf.js +0 -145
- package/dist/Toaster-Bm_HQSpc.js +0 -263
- 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/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-kiIlun8I.js +0 -303
- 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/dist/{CollapsibleContent-C_s6fG7r.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-Bx0F_q5g.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-Vf3tlpvd.js} +0 -0
- /package/dist/{SelectGroup-Dcczq44n.js → SelectGroup-DwwjicPY.js} +0 -0
- /package/dist/{SelectSeparator-DK2y1Bun.js → SelectSeparator-DXswVdRz.js} +0 -0
- /package/dist/{Separator-BArl4OaB.js → Separator-pKF0oA4M.js} +0 -0
- /package/dist/{Switch-Dr--uLGH.js → Switch-CwYNf8bo.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/{createContext-B2RaZ-b8.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{math-DeuJwLFx.js → math-BINYmg5z.js} +0 -0
- /package/dist/{menuItemVariants-DWRQXBxJ.js → menuItemVariants-D8VNHq22.js} +0 -0
- /package/dist/{prng-Cg22zv8g.js → prng-Za0Rmgag.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CUyHr5Uu.js} +0 -0
- /package/dist/{springPresets-WXaLbu8u.js → springPresets-CFQGQfdl.js} +0 -0
- /package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-BfUq2bUM.js} +0 -0
- /package/dist/{useInterval-CNdua40W.js → useInterval-CvK1mL92.js} +0 -0
- /package/dist/{useLiquidFlex-C12hXwOZ.js → useLiquidFlex-mZPMiNXh.js} +0 -0
- /package/dist/{useRAFLoop-CdwJ7284.js → useRAFLoop-UYa4zoiN.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/{useSortable-BVqlJRBR.js → useSortable-DHjtZSEd.js} +0 -0
- /package/dist/{useSurfaceAxis-CMnF2zHb.js → useSurfaceAxis-g0NloYEF.js} +0 -0
- /package/dist/{useTextHighlight-NmBM5V_4.js → useTextHighlight-CWEi25hf.js} +0 -0
- /package/dist/{useTimer-B_PAasDL.js → useTimer-BHJOKr35.js} +0 -0
- /package/dist/{useUserInvalidAria-CDfJuakL.js → useUserInvalidAria-y5namzeE.js} +0 -0
- /package/dist/{useViewportReady-CvBcCYDf.js → useViewportReady-anbac3m6.js} +0 -0
- /package/dist/{vReveal-D9k0jADx.js → vReveal-Czsb7zQC.js} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* The full author schema — the studio's `useConfiguratorState` model. Every field is a
|
|
11
|
+
* tunable the demo configurator drives; the SFC resolves it into the uniform table.
|
|
12
|
+
*/
|
|
13
|
+
export interface ConcentricConfig {
|
|
14
|
+
/** The ring origins (1..MAX_CENTERS) — a multi-center sum produces ring interference. */
|
|
15
|
+
centers: RingCenter[];
|
|
16
|
+
/** The radial sum-of-sines table (1..MAX_RINGS). */
|
|
17
|
+
ringComponents: RingComponent[];
|
|
18
|
+
/** The ellipsoidal-norm axis ratio (a, b) — the 3D-tilt depth implication. */
|
|
19
|
+
axisRatio: [number, number];
|
|
20
|
+
/** The ring-travel speed (scales ω). */
|
|
21
|
+
speed: number;
|
|
22
|
+
/** The field-value color ramp (the demo themes it); resolved via the ColorResolver. */
|
|
23
|
+
palette: OklchStop[];
|
|
24
|
+
/** The ground color (default transparent so it reads over the page; demo sets it). */
|
|
25
|
+
background: OklchStop | "transparent";
|
|
26
|
+
/** Pointer adds a transient ring center (a local perturbation about the cursor). */
|
|
27
|
+
interactive: boolean;
|
|
28
|
+
/** ONE static frame then park under `prefers-reduced-motion: reduce`. */
|
|
29
|
+
respectReducedMotion: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The warm-cream identity palette (the library default — NOT a themed hue). A three-stop
|
|
33
|
+
* warm ramp over the warm-cream foreground family, resolved via the ColorResolver: a soft
|
|
34
|
+
* cream trough, a warm amber mid, a deeper ember crest — so the ring field reads as warm
|
|
35
|
+
* light interference. A consumer (the demo) themes it through a PRESET, never a token edit.
|
|
36
|
+
*/
|
|
37
|
+
export declare const WARM_IDENTITY_PALETTE: OklchStop[];
|
|
38
|
+
/** The default 5-octave Phillips radial ring ladder. */
|
|
39
|
+
export declare const DEFAULT_RING_COMPONENTS: RingComponent[];
|
|
40
|
+
/** Two ring families offset on the diagonal — the default interference (a moiré beat). */
|
|
41
|
+
export declare const DEFAULT_CENTERS: RingCenter[];
|
|
42
|
+
/** The shipped warm-identity default config. */
|
|
43
|
+
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, DEFAULT_CONCENTRIC_CONFIG, DEFAULT_RING_COMPONENTS, DEFAULT_CENTERS, WARM_IDENTITY_PALETTE, MAX_RINGS, MAX_CENTERS, MAX_RING_STOPS, } from "./constants";
|
|
4
|
+
export { type RingComponent, type RingCenter, type Vec2, sampleRingField, ellipsoidalRadius, buildRingLadder, 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 field. */
|
|
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 float uHasBackground;\nuniform vec3 uRings[MAX_RINGS]; // (amplitude, wavelength, phase)\nuniform vec3 uCenters[MAX_CENTERS]; // (x, y, weight)\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// \u2016p \u2212 c\u2016_e = sqrt((dx/a)\u00B2 + (dy/b)\u00B2) \u2014 transcribes ringField.ts ellipsoidalRadius.\nfloat ellipsoidalRadius(vec2 p, vec2 center, float axisA, float axisB) {\n float dx = (p.x - center.x) / max(axisA, 1e-4);\n float dy = (p.y - center.y) / max(axisB, 1e-4);\n return sqrt(dx * dx + dy * dy);\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 vec3 cj = uCenters[j];\n float radius = ellipsoidalRadius(p, cj.xy, 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// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].\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 // cube-root LMS (the GLSL chunk inlines cbrt as sign(x)\u00B7pow(|x|,1/3) \u2014 no cbrt3 fn).\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 float raw = sampleRingField(p, uTime);\n float v = clamp(0.5 + raw * uFieldNorm, 0.0, 1.0);\n vec3 lin = samplePaletteLin(v);\n vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));\n if (uHasBackground > 0.5) {\n fragColor = vec4(rgb, 1.0);\n return;\n }\n float alpha = clamp(v * 0.92 + 0.08, 0.0, 1.0);\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, _pad)\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 // each ring row: (amplitude, wavelength, phase, _pad)\n rings: array<vec4<f32>, 8>,\n // each center row: (x, y, weight, _pad)\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 // aspect-correct so the rings stay circular under the ellipsoidal norm (NOT squashed\n // by the canvas aspect): widen the domain x by the aspect ratio.\n out.uv = vec2<f32>(c.x, c.y);\n return out;\n}\n\n// The ellipsoidal radial distance \u2016p \u2212 c\u2016_e = sqrt((dx/a)\u00B2 + (dy/b)\u00B2). The single radial\n// metric (transcribes ringField.ts ellipsoidalRadius).\nfn ellipsoidalRadius(p: vec2<f32>, center: vec2<f32>, axisA: f32, axisB: f32) -> f32 {\n let dx = (p.x - center.x) / max(axisA, 1e-4);\n let dy = (p.y - center.y) / max(axisB, 1e-4);\n return sqrt(dx * dx + dy * dy);\n}\n\n// The radial-Fourier ring-interference value f(p,t) \u2014 the multi-center weighted sum of\n// radial sinusoids (transcribes ringField.ts sampleRingField line-for-line).\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 = ellipsoidalRadius(p, cj.xy, 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 // \u03C9 = \u221A(g\u00B7k); speed scales the travel (the shared dispersion law).\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// 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\n let raw = sampleRingField(p, t);\n // Normalize the field \u2192 [0,1] for the palette ramp (uFieldNorm is the amplitude scale).\n let v = clamp(0.5 + raw * u.norm.x, 0.0, 1.0);\n\n let lin = samplePaletteLin(v);\n let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n\n // Premultiplied-alpha output over the (transparent / themed) ground.\n let hasBg = u.bg.w;\n if (hasBg > 0.5) {\n // opaque themed ground: the field paints fully opaque.\n return vec4<f32>(rgb, 1.0);\n }\n // transparent ground: the field's alpha rides its own brightness so the page reads\n // through the troughs (the ring crests carry the ink; the calm field is faint).\n let alpha = clamp(v * 0.92 + 0.08, 0.0, 1.0);\n return vec4<f32>(rgb * alpha, alpha);\n}\n";
|
|
@@ -9,6 +9,15 @@ import { type ButtonHTMLAttributes, type Component, type HTMLAttributes } from "
|
|
|
9
9
|
* `as="a"` swaps the host tag, `as-child` merges the dock class onto a slotted
|
|
10
10
|
* child (the reka-ui Primitive idiom). `type` is emitted only on a <button>
|
|
11
11
|
* host (an anchor/RouterLink carries no `type`).
|
|
12
|
+
*
|
|
13
|
+
* BB.W-LIQUIDHOVER — the pointer-anchored moving-specular gleam AUTO-ARMS via the
|
|
14
|
+
* `v-specular` directive (the tier-root delivery wrapping the ONE position-write
|
|
15
|
+
* core, `createSpecularWriter`). The prior hand-composed `useSpecularTracking` +
|
|
16
|
+
* `:style="specularStyle"` + `@pointermove="onPointerMove"` triplet RETIRED onto it:
|
|
17
|
+
* the dock control gleams pointer-following with ZERO call-site wiring. The
|
|
18
|
+
* `.dock-icon-button` `::before` (material.css) paints + lifts intensity on hover/
|
|
19
|
+
* active; the directive supplies the position. PRM-aware by construction (the wrapped
|
|
20
|
+
* core skips the write under reduce; the CSS bracket pins the catch-light static).
|
|
12
21
|
*/
|
|
13
22
|
type __VLS_Props = {
|
|
14
23
|
/** Compact variant: auto-sized instead of fixed 2.5rem square. */
|
|
@@ -21,15 +30,15 @@ type __VLS_Props = {
|
|
|
21
30
|
asChild?: boolean;
|
|
22
31
|
class?: HTMLAttributes["class"];
|
|
23
32
|
};
|
|
24
|
-
declare var
|
|
33
|
+
declare var __VLS_8: {};
|
|
25
34
|
type __VLS_Slots = {} & {
|
|
26
|
-
default?: (props: typeof
|
|
35
|
+
default?: (props: typeof __VLS_8) => any;
|
|
27
36
|
};
|
|
28
37
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
29
|
-
type: "button" | "
|
|
38
|
+
type: "button" | "reset" | "submit";
|
|
39
|
+
compact: boolean;
|
|
30
40
|
asChild: boolean;
|
|
31
41
|
as: string | Component;
|
|
32
|
-
compact: boolean;
|
|
33
42
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
43
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
44
|
declare const _default: typeof __VLS_export;
|
|
@@ -16,20 +16,28 @@ type __VLS_Props = {
|
|
|
16
16
|
showRail?: boolean;
|
|
17
17
|
/** Rail placement relative to the layer stack. */
|
|
18
18
|
railPosition?: "start" | "end";
|
|
19
|
+
/**
|
|
20
|
+
* BB.W-DRAG-MORPH — pull-to-switch. When `true` (ADDITIVE, default `false`),
|
|
21
|
+
* the switcher-rail indicator becomes draggable: pull along the rail axis to
|
|
22
|
+
* the next layer chip, fling-to-nearest on release writes `activeLayer`
|
|
23
|
+
* (`useDragMorph`, consumer #2). The reka roving tabindex / Arrow keys stay.
|
|
24
|
+
*/
|
|
25
|
+
draggable?: boolean;
|
|
19
26
|
};
|
|
20
27
|
type __VLS_ModelProps = {
|
|
21
28
|
"active": string;
|
|
22
29
|
};
|
|
23
30
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
24
|
-
declare var
|
|
31
|
+
declare var __VLS_34: {};
|
|
25
32
|
type __VLS_Slots = {} & {
|
|
26
|
-
default?: (props: typeof
|
|
33
|
+
default?: (props: typeof __VLS_34) => any;
|
|
27
34
|
};
|
|
28
35
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
36
|
"update:active": (value: string) => any;
|
|
30
37
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
38
|
"onUpdate:active"?: ((value: string) => any) | undefined;
|
|
32
39
|
}>, {
|
|
40
|
+
draggable: boolean;
|
|
33
41
|
showRail: boolean;
|
|
34
42
|
railPosition: "start" | "end";
|
|
35
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* BB.W-CARVE4 — the dock morph MEASURE/SEAT helpers, carved out of
|
|
4
|
+
* `dockMorphContext.ts` to hold the no-god-module bound (the aurora→useAurora /
|
|
5
|
+
* goo-blob→useMetaballRenderer / fourier-field→useFourierField colocation pattern).
|
|
6
|
+
* The orchestrator stays the morph DRIVER (it owns the `SpringProgress`, the targets
|
|
7
|
+
* Set, the per-frame `--dock-morph-t` write); these are the PURE geometry + the
|
|
8
|
+
* reserved-footprint measure + the SYNCHRONOUS PRM seat it composes. `DOCK_SPRING` is
|
|
9
|
+
* byte-fenced — it lives in `../constants`, never touched here.
|
|
10
|
+
*
|
|
11
|
+
* The functions take their element/axis/target dependencies as explicit params (the
|
|
12
|
+
* orchestrator's closures collapse onto this seam) — no module-level state, so the
|
|
13
|
+
* extraction is behaviour-identical to the prior inline closures.
|
|
14
|
+
*/
|
|
15
|
+
/** The minimal morph-target shape the measure/seat helpers read (the orchestrator's
|
|
16
|
+
* full `MorphTarget` structurally satisfies it). */
|
|
17
|
+
export interface MorphMeasureTarget {
|
|
18
|
+
containerEl: Ref<HTMLElement | null>;
|
|
19
|
+
axis: Ref<"horizontal" | "vertical">;
|
|
20
|
+
/** PER-TARGET swap generation — the seat gates its pipeline on its own id. */
|
|
21
|
+
txId: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function dimOf(axis: "horizontal" | "vertical"): "width" | "height";
|
|
24
|
+
export declare function morphAxisProp(axis: "horizontal" | "vertical"): "inline-size" | "block-size";
|
|
25
|
+
export declare function getSize(el: HTMLElement, axis: "horizontal" | "vertical"): number;
|
|
26
|
+
export declare function clearMorphVars(el: HTMLElement): void;
|
|
27
|
+
/**
|
|
28
|
+
* BA-VJS-1 (valuejs-fold A-1) — the OTHER registered targets whose container is a
|
|
29
|
+
* DOM DESCENDANT of `outerEl` (a nested `<DockLayerGroup>` stack inside the outer
|
|
30
|
+
* `.dock-layers`). These are the pinned inner spans the outer measure must see at
|
|
31
|
+
* their OWN intrinsic `max-content`, not their collapsed pin, or the outer
|
|
32
|
+
* shrink-wraps to ~0.
|
|
33
|
+
*/
|
|
34
|
+
export declare function nestedTargetsWithin(outer: MorphMeasureTarget, outerEl: HTMLElement, targets: Iterable<MorphMeasureTarget>): MorphMeasureTarget[];
|
|
35
|
+
/**
|
|
36
|
+
* BA-VJS-1 — force ONE nested target to its own-axis `max-content` (clearing its
|
|
37
|
+
* reserved `--dock-morph-to` footprint so it sizes to content), and return a closure
|
|
38
|
+
* that RESTORES its exact prior inline state. The restore re-writes the precise
|
|
39
|
+
* prior `inline-size`/`block-size` inline value (or removes it if there was none),
|
|
40
|
+
* so the inner's in-flight pin is byte-identical after the outer's measurement —
|
|
41
|
+
* the inner target's own spring/pin pipeline is never disturbed.
|
|
42
|
+
*/
|
|
43
|
+
export declare function forceNestedMaxContent(n: MorphMeasureTarget): () => void;
|
|
44
|
+
/**
|
|
45
|
+
* BB.W-DOCK-MORPH-FAMILY (c) — measure the true `to` for ONE target with the
|
|
46
|
+
* morph axis forced to `max-content` (the same circular-measure escape the rAF
|
|
47
|
+
* path uses), composing the BA-VJS-1 nested-descendant `max-content` ordering so
|
|
48
|
+
* a nested group reads its TRUE intrinsic span (never `to:0`). The element is at
|
|
49
|
+
* the live painted geometry on entry; this forces+reads+restores the axis. PURE
|
|
50
|
+
* measure — no spring, no pin write.
|
|
51
|
+
*/
|
|
52
|
+
export declare function measureTo(t: MorphMeasureTarget, el: HTMLElement, targets: Iterable<MorphMeasureTarget>): number;
|
|
53
|
+
/** The orchestrator settle callbacks the synchronous seat composes (it clears the
|
|
54
|
+
* morph vars + nulls the leaving layer, then parks the root/spring once no target
|
|
55
|
+
* is morphing). */
|
|
56
|
+
export interface MorphSeatCallbacks {
|
|
57
|
+
/** Settle ONE target (clear its morph vars + null its leavingLayer). */
|
|
58
|
+
settleTarget(t: MorphMeasureTarget): void;
|
|
59
|
+
/** Park the shared scalar + spring once NO target is morphing. */
|
|
60
|
+
maybeSettleRoot(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* BB.W-DOCK-MORPH-FAMILY (c) — the SYNCHRONOUS PRM seat. Under
|
|
64
|
+
* `prefers-reduced-motion: reduce` there is NO morph to play, so the geometry +
|
|
65
|
+
* the scalar seat at the target in ONE step (the `useDockOrientationMorph.pin()`
|
|
66
|
+
* precedent transplanted onto the collapse/expand path): measure the true `to`
|
|
67
|
+
* (composing the BA-VJS-1 nested ordering), write the box at `to` (the
|
|
68
|
+
* reserved-footprint reads at scale 1), and set `--dock-morph-t` to the endpoint
|
|
69
|
+
* for THIS swap — then clear the morph state immediately (no rAF measure-defer,
|
|
70
|
+
* no spring, no morph window). The box NEVER paints the collapsed `from` sliver
|
|
71
|
+
* with the scalar at 1 (the P0 terminal failure). Endpoint is the per-swap
|
|
72
|
+
* incoming-ness `1` (the new pane is fully in; the directional `--dock-expand-t`
|
|
73
|
+
* resolves to the class endpoint with `[data-morphing]` cleared).
|
|
74
|
+
*/
|
|
75
|
+
export declare function seatTargetSync(t: MorphMeasureTarget, id: number, root: HTMLElement | null, targets: Iterable<MorphMeasureTarget>, cb: MorphSeatCallbacks): void;
|
|
@@ -68,6 +68,19 @@ export interface UseLayerTransitionReturn {
|
|
|
68
68
|
currentLayer: Ref<string>;
|
|
69
69
|
/** The layer id currently fading out, or null. */
|
|
70
70
|
leavingLayer: Ref<string | null>;
|
|
71
|
+
/**
|
|
72
|
+
* BB.W-PERF-PRODUCER A′-4 — `true` while the size morph is in flight (the
|
|
73
|
+
* reactive twin of the `data-morphing` attr). A floating dock consumer reads
|
|
74
|
+
* this to hold a reka Popper re-position off the morph's critical frames.
|
|
75
|
+
*/
|
|
76
|
+
morphing: Ref<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* BB.W-PERF-PRODUCER A′-4 — schedule a reka Popper re-position OFF the
|
|
79
|
+
* synchronous morph flush. Queued while a morph is live (flushed ONCE on
|
|
80
|
+
* settle, against the final box), else run on the next rAF. Defers the floating
|
|
81
|
+
* re-position only — NOT the FLIP measure.
|
|
82
|
+
*/
|
|
83
|
+
deferReposition(cb: () => void): void;
|
|
71
84
|
}
|
|
72
85
|
/**
|
|
73
86
|
* Coordinates the size morph + crossfade between grid-stacked dock layer panes.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FlowFieldConfig } from "./constants";
|
|
2
|
+
/**
|
|
3
|
+
* DotFlowField — small dots seeded along undulating streamlines, rippling in waves.
|
|
4
|
+
*
|
|
5
|
+
* A curl-noise flow field traced by advected particles, where the scalar potential
|
|
6
|
+
* undulates as a Gerstner/Tessendorf sum-of-sines water-wave field (the cited SOTA
|
|
7
|
+
* math — `composables/flowField.ts`). WebGPU-FIRST: the compute pass advects N
|
|
8
|
+
* particles through the analytic ∇⊥ψ velocity, the render pass draws instanced
|
|
9
|
+
* billboard quads; a Canvas2D point-cloud fallback steps the SAME evaluator where
|
|
10
|
+
* WebGPU is absent (the ~5-10% tail). It composes `useDotFlowField` → the
|
|
11
|
+
* `createGpuSubstrate` picker over the ONE canvas lifecycle leaf (offscreen-pause,
|
|
12
|
+
* live-PRM freeze, consumer-owned DPR) — it never bootstraps its own context.
|
|
13
|
+
*
|
|
14
|
+
* The DEFAULT palette is the warm-cream library identity; the reference teal-on-navy
|
|
15
|
+
* is a DEMO preset (presets-in-consumers — never a library token).
|
|
16
|
+
*/
|
|
17
|
+
type __VLS_Props = {
|
|
18
|
+
/** The full author schema (the studio's `useConfiguratorState` model). */
|
|
19
|
+
config?: FlowFieldConfig;
|
|
20
|
+
/**
|
|
21
|
+
* The declarative WCAG-2.2.2 pause seam. `v-model:paused` parks the render loop
|
|
22
|
+
* (the substrate's `manual` suspend) when `true`. Wire `<DockBackgroundToggle>`'s
|
|
23
|
+
* `@update:paused` to this `v-model`.
|
|
24
|
+
*/
|
|
25
|
+
paused?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
28
|
+
pause: () => void;
|
|
29
|
+
resume: () => void;
|
|
30
|
+
wake: () => void;
|
|
31
|
+
renderAt: (timeSec: number) => void;
|
|
32
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"update:paused": (value: boolean) => any;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
36
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** A 2-vector. */
|
|
2
|
+
export interface Vec2 {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* One Gerstner / Tessendorf wave component. `amplitude` A_i, `wavelength` λ_i (so
|
|
8
|
+
* k_i = 2π/λ_i), `direction` in DEGREES (the unit travel direction), `phase` φ_i.
|
|
9
|
+
* `ω_i = √(g·k_i)` is derived from the dispersion relation, not stored.
|
|
10
|
+
*/
|
|
11
|
+
export interface WaveComponent {
|
|
12
|
+
amplitude: number;
|
|
13
|
+
wavelength: number;
|
|
14
|
+
/** Travel direction in degrees (0 = +x). */
|
|
15
|
+
direction: number;
|
|
16
|
+
phase: number;
|
|
17
|
+
}
|
|
18
|
+
/** Deep-water gravity constant (normalized; scales the dispersion ω). */
|
|
19
|
+
export declare const FLOW_GRAVITY = 9.81;
|
|
20
|
+
/**
|
|
21
|
+
* The Gerstner-sum velocity v(p,t) = ∇⊥h = (∂h/∂y, −∂h/∂x), ANALYTIC. The single
|
|
22
|
+
* math source the WGSL kernel transcribes. `windSpeed` scales the dispersion ω;
|
|
23
|
+
* `windDirection` (deg) is folded into each component's direction by the caller (the
|
|
24
|
+
* components carry their own absolute direction). Returns the un-normalized flow vector.
|
|
25
|
+
*/
|
|
26
|
+
export declare function gerstnerVelocity(p: Vec2, timeSec: number, waves: readonly WaveComponent[], windSpeed: number): Vec2;
|
|
27
|
+
/** The 2D curl of the scalar fbm potential (the JS twin of `curlFBM`). */
|
|
28
|
+
export declare function curlFBM(p: Vec2): Vec2;
|
|
29
|
+
/**
|
|
30
|
+
* The COMPOSITE flow velocity v(p,t): the Gerstner sum-of-sines analytic ∇⊥h PLUS the
|
|
31
|
+
* `curlStrength`-weighted fbm curl-noise braiding term. The SINGLE math source the WGSL
|
|
32
|
+
* compute kernel transcribes; `proof:flow-field` clause 3 round-trips the two paths.
|
|
33
|
+
*/
|
|
34
|
+
export declare function sampleVelocity(p: Vec2, timeSec: number, waves: readonly WaveComponent[], windSpeed: number, curlStrength: number): Vec2;
|
|
35
|
+
/**
|
|
36
|
+
* Build the default 6-octave Phillips-spectrum wave ladder about a dominant wind
|
|
37
|
+
* direction. Amplitudes follow `A_i ∝ exp(−1/(k_i·L)²) / k_i²` (Tessendorf §4), so the
|
|
38
|
+
* field is energy-realistic. The directions spread about `windDirection` so the
|
|
39
|
+
* streamlines braid like a river delta (not a flat band).
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildWaveLadder(windDirection: number, octaves?: number): WaveComponent[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
2
|
+
import { type FlowFieldConfig } from "../constants";
|
|
3
|
+
export declare const FLOW_COMPUTE_UNIFORM_BYTES: number;
|
|
4
|
+
export interface FlowUniformScratch {
|
|
5
|
+
buffer: ArrayBuffer;
|
|
6
|
+
f32: Float32Array;
|
|
7
|
+
i32: Int32Array;
|
|
8
|
+
}
|
|
9
|
+
export declare function createFlowComputeScratch(): FlowUniformScratch;
|
|
10
|
+
/** The domain half-extent (mirrors the WGSL `uDomainHalf`). */
|
|
11
|
+
export declare const FLOW_DOMAIN_HALF = 0.85;
|
|
12
|
+
/** Pack the compute uniforms in place. */
|
|
13
|
+
export declare function packFlowComputeUniforms(scratch: FlowUniformScratch, config: FlowFieldConfig, timeSec: number, dt: number, particleCount: number): FlowUniformScratch;
|
|
14
|
+
export declare const FLOW_RENDER_UNIFORM_BYTES: number;
|
|
15
|
+
export declare function createFlowRenderScratch(): FlowUniformScratch;
|
|
16
|
+
/** Pack the render uniforms in place. */
|
|
17
|
+
export declare function packFlowRenderUniforms(scratch: FlowUniformScratch, config: FlowFieldConfig, timeSec: number, aspect: number, canvasCssMin: number, palette: OklchStop[]): FlowUniformScratch;
|
|
18
|
+
/** The byte size of one particle in the storage buffer (vec4<f32>). */
|
|
19
|
+
export declare const FLOW_PARTICLE_BYTES = 16;
|
|
20
|
+
/**
|
|
21
|
+
* Seed the particle storage buffer: each particle is (pos.x, pos.y, age, seed) in the
|
|
22
|
+
* domain [-half, half]. The seed is deterministic per index so a re-mount is reproducible.
|
|
23
|
+
*/
|
|
24
|
+
export declare function seedParticleBuffer(particleCount: number): Float32Array;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { FlowFieldConfig } from "../constants";
|
|
5
|
+
export interface UseDotFlowFieldOptions {
|
|
6
|
+
config: FlowFieldConfig;
|
|
7
|
+
/** Resolve the dot-color 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 DotFlowFieldHandle {
|
|
14
|
+
/** The resolved backend (`"webgpu"` where supported, else the Canvas2D fallback as `"webgl2"`). */
|
|
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 (a pointer/setter that re-introduced motion). */
|
|
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/2D resources. */
|
|
27
|
+
dispose: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Mount the dot-flow-field renderer on `canvasRef`. The WebGPU primary runs the
|
|
31
|
+
* compute+render two-pass; the Canvas2D fallback steps the SAME `flowField.ts` evaluator
|
|
32
|
+
* (the ONE math source). Returns the uniform lifecycle handle.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useDotFlowField(canvasRef: Ref<HTMLCanvasElement | null>, options: UseDotFlowFieldOptions): DotFlowFieldHandle;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
2
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
3
|
+
import type { FlowFieldConfig } from "../constants";
|
|
4
|
+
export interface FlowWGPUSetupDeps {
|
|
5
|
+
canvas: HTMLCanvasElement;
|
|
6
|
+
config: FlowFieldConfig;
|
|
7
|
+
/** The resolved (ColorResolver) palette stops as OKLCh — re-read each frame so a live palette edit reaches the buffer. */
|
|
8
|
+
getPalette: () => OklchStop[];
|
|
9
|
+
/** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
|
|
10
|
+
shouldContinue: () => boolean;
|
|
11
|
+
/** Reduced-motion read (the substrate owns the query; the renderer maps the clock). */
|
|
12
|
+
getReducedMotion: () => boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the dot-flow-field `setupWGPU(device, context, format)` callback. Closes over the
|
|
16
|
+
* config/palette getters + the renderer's demand gate.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createFlowWGPUSetup(deps: FlowWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { WaveComponent } from "./composables/flowField";
|
|
2
|
+
import type { OklchStop } from "../../../composables/color";
|
|
3
|
+
/** Compile-time particle cap — mirrors the WGSL storage-buffer array bound. */
|
|
4
|
+
export declare const MAX_PARTICLES = 16384;
|
|
5
|
+
/** Compile-time wave-component cap — mirrors the WGSL `MAX_WAVE_COMPONENTS` #define. */
|
|
6
|
+
export declare const MAX_WAVE_COMPONENTS = 8;
|
|
7
|
+
/** Compile-time palette cap — mirrors the WGSL `MAX_FLOW_STOPS` #define. */
|
|
8
|
+
export declare const MAX_FLOW_STOPS = 4;
|
|
9
|
+
/** The default advected-dot count (coarse-pointer/mobile clamps lower). */
|
|
10
|
+
export declare const DEFAULT_PARTICLE_COUNT = 4000;
|
|
11
|
+
/**
|
|
12
|
+
* The full author schema — the studio's `useConfiguratorState` model. Every field is a
|
|
13
|
+
* tunable the demo configurator drives; the SFC resolves it into the uniform table.
|
|
14
|
+
*/
|
|
15
|
+
export interface FlowFieldConfig {
|
|
16
|
+
/** The advected-dot count (500..MAX_PARTICLES). */
|
|
17
|
+
particleCount: number;
|
|
18
|
+
/** The Gerstner sum-of-sines table (1..MAX_WAVE_COMPONENTS). */
|
|
19
|
+
waveComponents: WaveComponent[];
|
|
20
|
+
/** The dominant wave-travel direction in degrees (the field's overall lean). */
|
|
21
|
+
windDirection: number;
|
|
22
|
+
/** The dispersion-driven travel speed (scales ω). */
|
|
23
|
+
windSpeed: number;
|
|
24
|
+
/** The fbm curl-noise braiding term weight over the pure Gerstner field (0..1). */
|
|
25
|
+
curlStrength: number;
|
|
26
|
+
/** The billboard base radius in px @ 1×. */
|
|
27
|
+
dotSize: number;
|
|
28
|
+
/** How much |v| thins the dot (denser-where-calm — the reference's varying size). */
|
|
29
|
+
dotSizeVelocity: number;
|
|
30
|
+
/** The dot-color ramp (the demo themes it teal); resolved via the ColorResolver. */
|
|
31
|
+
palette: OklchStop[];
|
|
32
|
+
/** The ground color (the demo sets dark navy; default transparent). */
|
|
33
|
+
background: OklchStop | "transparent";
|
|
34
|
+
/** Pointer-warp the field (a local velocity perturbation about the cursor). */
|
|
35
|
+
interactive: boolean;
|
|
36
|
+
/** ONE static frame then park under `prefers-reduced-motion: reduce`. */
|
|
37
|
+
respectReducedMotion: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The warm-cream identity palette (the library default — NOT teal). A two-stop
|
|
41
|
+
* warm-amber ramp over the warm-cream foreground family, resolved via the ColorResolver.
|
|
42
|
+
* A consumer (the demo) themes it teal-on-navy through a PRESET, never a token edit.
|
|
43
|
+
*/
|
|
44
|
+
export declare const WARM_IDENTITY_PALETTE: OklchStop[];
|
|
45
|
+
/** The default 6-octave Phillips wave ladder about a 35° diagonal wind. */
|
|
46
|
+
export declare const DEFAULT_WAVE_COMPONENTS: WaveComponent[];
|
|
47
|
+
/** The shipped warm-identity default config. */
|
|
48
|
+
export declare const DEFAULT_FLOW_CONFIG: FlowFieldConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as DotFlowField } from "./DotFlowField.vue";
|
|
2
|
+
export { useDotFlowField, type DotFlowFieldHandle, type UseDotFlowFieldOptions, } from "./composables/useDotFlowField";
|
|
3
|
+
export { type FlowFieldConfig, DEFAULT_FLOW_CONFIG, DEFAULT_WAVE_COMPONENTS, WARM_IDENTITY_PALETTE, MAX_PARTICLES, MAX_WAVE_COMPONENTS, MAX_FLOW_STOPS, DEFAULT_PARTICLE_COUNT, } from "./constants";
|
|
4
|
+
export { type WaveComponent, type Vec2, sampleVelocity, gerstnerVelocity, curlFBM, buildWaveLadder, FLOW_GRAVITY, } from "./composables/flowField";
|
|
5
|
+
export type { OklchStop } from "../../../composables/color";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FLOW_FIELD_COMPUTE_WGSL = "\nconst MAX_WAVE_COMPONENTS: i32 = 8;\nconst PI: f32 = 3.141592653589793;\nconst TAU: f32 = 6.283185307179586;\nconst FLOW_GRAVITY: f32 = 9.81;\nconst CURL_EPS: f32 = 0.012;\nconst FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);\n\nstruct Particle {\n // (pos.x, pos.y, age, seed)\n data: vec4<f32>,\n};\n\n// \u2500\u2500 Uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct FlowUniforms {\n // p0: (uTime, uDt, uWindSpeed, uCurlStrength)\n p0: vec4<f32>,\n // p1: (uDomainHalf, uReseedJitter, _pad, _pad)\n p1: vec4<f32>,\n // ints: (uWaveCount, uParticleCount, _pad, _pad)\n ints: vec4<i32>,\n // each wave row: (amplitude, wavelength, directionDeg, phase)\n waves: array<vec4<f32>, 8>,\n};\n\n@group(0) @binding(0) var<uniform> u: FlowUniforms;\n@group(0) @binding(1) var<storage, read_write> particles: array<Particle>;\n\n// \u2500\u2500 The Gerstner-sum analytic \u2207\u22A5h velocity (transcribes flowField.ts gerstnerVelocity) \u2500\u2500\nfn gerstnerVelocity(p: vec2<f32>, t: f32) -> vec2<f32> {\n var dhdx = 0.0;\n var dhdy = 0.0;\n let windSpeed = u.p0.z;\n let waveCount = u.ints.x;\n for (var i = 0; i < MAX_WAVE_COMPONENTS; i = i + 1) {\n if (i >= waveCount) { break; }\n let w = u.waves[i];\n let amplitude = w.x;\n let wavelength = max(w.y, 1e-4);\n let dirRad = w.z * PI / 180.0;\n let phase = w.w;\n let k = TAU / wavelength;\n let d = vec2<f32>(cos(dirRad), sin(dirRad));\n let omega = sqrt(FLOW_GRAVITY * k) * windSpeed;\n let theta = k * (d.x * p.x + d.y * p.y) - omega * t + phase;\n let akc = amplitude * k * cos(theta);\n dhdx = dhdx + akc * d.x;\n dhdy = dhdy + akc * d.y;\n }\n // v = \u2207\u22A5h = (\u2202h/\u2202y, \u2212\u2202h/\u2202x).\n return vec2<f32>(dhdy, -dhdx);\n}\n\n// \u2500\u2500 Shared curl-noise basis (the WGSL twin of flow.glsl.ts curlFBM) \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\nfn valueNoise(p: vec2<f32>) -> f32 {\n let i = floor(p);\n let f = fract(p);\n let u2 = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n let a = hash21(i + vec2<f32>(0.0, 0.0));\n let b = hash21(i + vec2<f32>(1.0, 0.0));\n let c = hash21(i + vec2<f32>(0.0, 1.0));\n let d = hash21(i + vec2<f32>(1.0, 1.0));\n return mix(mix(a, b, u2.x), mix(c, d, u2.x), u2.y);\n}\n\nfn potentialFBM(p0: vec2<f32>) -> f32 {\n var v = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var p = p0;\n for (var i = 0; i < 3; i = i + 1) {\n v = v + amp * valueNoise(p * freq);\n p = FBM_ROT * p;\n freq = freq * 2.0;\n amp = amp * 0.5;\n }\n return v;\n}\n\nfn curlFBM(p: vec2<f32>) -> vec2<f32> {\n let dx = potentialFBM(p + vec2<f32>(CURL_EPS, 0.0)) - potentialFBM(p - vec2<f32>(CURL_EPS, 0.0));\n let dy = potentialFBM(p + vec2<f32>(0.0, CURL_EPS)) - potentialFBM(p - vec2<f32>(0.0, CURL_EPS));\n let g = vec2<f32>(dx, dy) / (2.0 * CURL_EPS);\n return vec2<f32>(g.y, -g.x);\n}\n\n// The composite flow velocity (transcribes flowField.ts sampleVelocity EXACTLY).\nfn sampleVelocity(p: vec2<f32>, t: f32) -> vec2<f32> {\n let curlStrength = u.p0.w;\n var v = gerstnerVelocity(p, t);\n if (curlStrength > 0.0) {\n let c = curlFBM(vec2<f32>(p.x * 1.7 + t * 0.15, p.y * 1.7));\n v = v + c * curlStrength;\n }\n return v;\n}\n\n// A particle that leaves the bounds re-spawns at a seed-derived position (so coverage\n// stays steady \u2014 the \u00A73 re-seed-at-edge rule). The seed advances each re-spawn so a\n// re-seeded particle does not pile on the previous spawn.\nfn reseed(seed: f32, age: f32) -> vec2<f32> {\n let half = u.p1.x;\n let r1 = hash21(vec2<f32>(seed * 71.13, age * 13.7));\n let r2 = hash21(vec2<f32>(seed * 19.31 + 4.0, age * 7.3 + 2.0));\n return (vec2<f32>(r1, r2) * 2.0 - 1.0) * half;\n}\n\n@compute @workgroup_size(64)\nfn cs_main(@builtin(global_invocation_id) gid: vec3<u32>) {\n let idx = gid.x;\n let count = u32(u.ints.y);\n if (idx >= count) { return; } // bounds-guard the dispatch tail\n\n let t = u.p0.x;\n let dt = u.p0.y;\n let half = u.p1.x;\n\n var pr = particles[idx];\n var pos = pr.data.xy;\n var age = pr.data.z;\n let seed = pr.data.w;\n\n let v = sampleVelocity(pos, t);\n // Forward Euler \u2014 p_{n+1} = p_n + v\u00B7dt.\n pos = pos + v * dt;\n age = age + dt;\n\n // Wrap / re-seed at the domain edge (re-spawn from the seed at a fresh position).\n if (abs(pos.x) > half || abs(pos.y) > half || age > 6.0) {\n pos = reseed(seed, age);\n age = 0.0;\n }\n\n particles[idx] = Particle(vec4<f32>(pos, age, seed));\n}\n";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FlowFieldConfig } from "../constants";
|
|
2
|
+
import { type Vec2 } from "../composables/flowField";
|
|
3
|
+
/** A CPU particle (the Canvas2D-stepped twin of the WGSL storage Particle). */
|
|
4
|
+
export interface CpuParticle {
|
|
5
|
+
pos: Vec2;
|
|
6
|
+
age: number;
|
|
7
|
+
seed: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The CPU particle field — alloc + seed + step + paint, over the Canvas2D substrate.
|
|
11
|
+
* `step(dt, timeSec)` advects every particle through the SAME `sampleVelocity` evaluator
|
|
12
|
+
* the WGSL compute kernel transcribes; `paint(ctx)` draws the soft dots. The fallback's
|
|
13
|
+
* `degraded` parity is the CPU step count vs the GPU's per-particle instancing — the same
|
|
14
|
+
* flow, a coarser density.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createCpuFlowField(config: FlowFieldConfig): {
|
|
17
|
+
particles: CpuParticle[];
|
|
18
|
+
step: (dt: number, timeSec: number) => void;
|
|
19
|
+
paint: (ctx: CanvasRenderingContext2D, wCss: number, hCss: number, timeSec: number, dotColor: string) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FLOW_FIELD_RENDER_WGSL = "\nconst PI: f32 = 3.141592653589793;\nconst TAU: f32 = 6.283185307179586;\nconst FLOW_GRAVITY: f32 = 9.81;\nconst MAX_WAVE_COMPONENTS: i32 = 8;\nconst MAX_FLOW_STOPS: i32 = 4;\n\nstruct Particle {\n // (pos.x, pos.y, age, seed)\n data: vec4<f32>,\n};\n\n// \u2500\u2500 Render uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct RenderUniforms {\n // r0: (uTime, uWindSpeed, uCurlStrength, uDomainHalf)\n r0: vec4<f32>,\n // r1: (uDotSize, uDotSizeVelocity, uAspect, uVMax)\n r1: vec4<f32>,\n // ints: (uWaveCount, uStopCount, uParticleCount, _pad)\n ints: vec4<i32>,\n // bg: (background.rgb, hasBackground)\n bg: vec4<f32>,\n // each wave row: (amplitude, wavelength, directionDeg, phase)\n waves: array<vec4<f32>, 8>,\n // each palette stop: linear-sRGB rgb + _pad\n palette: array<vec4<f32>, 4>,\n};\n\n@group(0) @binding(0) var<uniform> u: RenderUniforms;\n@group(0) @binding(1) var<storage, read> particles: array<Particle>;\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// \u2500\u2500 The Gerstner-sum velocity (the SAME transcription as the compute kernel, read here\n// for the per-particle size + color tint \u2014 denser-where-calm). \u2500\u2500\nfn gerstnerVelocity(p: vec2<f32>, t: f32) -> vec2<f32> {\n var dhdx = 0.0;\n var dhdy = 0.0;\n let windSpeed = u.r0.y;\n let waveCount = u.ints.x;\n for (var i = 0; i < MAX_WAVE_COMPONENTS; i = i + 1) {\n if (i >= waveCount) { break; }\n let w = u.waves[i];\n let k = TAU / max(w.y, 1e-4);\n let dirRad = w.z * PI / 180.0;\n let d = vec2<f32>(cos(dirRad), sin(dirRad));\n let omega = sqrt(FLOW_GRAVITY * k) * windSpeed;\n let theta = k * (d.x * p.x + d.y * p.y) - omega * t + w.w;\n let akc = w.x * k * cos(theta);\n dhdx = dhdx + akc * d.x;\n dhdy = dhdy + akc * d.y;\n }\n return vec2<f32>(dhdy, -dhdx);\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.y;\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\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) local: vec2<f32>, // [-1,1] billboard-local coords for the soft circle\n @location(1) tint: f32, // velocity-derived color/alpha tint [0,1]\n @location(2) alphaScale: f32, // velocity-derived alpha scale (denser-where-calm)\n};\n\n@vertex\nfn vs_main(\n @builtin(vertex_index) vi: u32,\n @builtin(instance_index) ii: u32,\n) -> VSOut {\n // Two-triangle quad corners in billboard-local space.\n var corners = array<vec2<f32>, 6>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(1.0, -1.0), vec2<f32>(-1.0, 1.0),\n vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, -1.0), vec2<f32>(1.0, 1.0),\n );\n let local = corners[vi];\n\n let pr = particles[ii].data;\n let p = pr.xy;\n let t = u.r0.x;\n let half = u.r0.w;\n\n // Per-particle velocity \u2192 size + tint (denser-where-calm: |v| thins the dot).\n let v = gerstnerVelocity(p, t);\n let speed = length(v);\n let vMax = max(u.r1.w, 1e-4);\n let speedNorm = clamp(speed / vMax, 0.0, 1.0);\n let dotSizeVel = u.r1.y;\n // size_i = base \u00B7 (1 \u2212 speedNorm \u00B7 sizeVel) \u2014 calm = larger dot.\n let sizeWorld = u.r1.x * (1.0 - speedNorm * dotSizeVel);\n let alphaScale = 1.0 - speedNorm * 0.35; // calm = denser/brighter\n\n // Position the quad at the particle in clip space. Domain [-half,half] \u2192 NDC [-1,1];\n // the quad half-extent rides sizeWorld (in the same domain units, aspect-corrected x).\n let aspect = u.r1.z;\n let ndc = p / half;\n let off = local * sizeWorld / half;\n let offX = off.x / max(aspect, 1e-4);\n\n var out: VSOut;\n out.pos = vec4<f32>(ndc.x + offX, ndc.y + off.y, 0.0, 1.0);\n out.local = local;\n out.tint = speedNorm;\n out.alphaScale = alphaScale;\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n // Soft circle \u2014 radial smoothstep over the billboard-local radius.\n let r = length(in.local);\n let feather = 0.35;\n let mask = 1.0 - smoothstep(1.0 - feather, 1.0, r);\n if (mask < 0.002) { return vec4<f32>(0.0); }\n\n let lin = samplePaletteLin(in.tint);\n let alpha = mask * in.alphaScale;\n let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n // Premultiplied-alpha output.\n return vec4<f32>(rgb * alpha, alpha);\n}\n";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { EasingPickerMode, EasingPickerValue, JumpTerm } from "./composables/useEasingPicker";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Section label for the configurator layer. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** A token-style sub-label (the mono caption rung). */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** The curve-authoring mode. */
|
|
8
|
+
mode?: EasingPickerMode;
|
|
9
|
+
/** The initial bezier preset key. */
|
|
10
|
+
preset?: string;
|
|
11
|
+
/** The initial step count. */
|
|
12
|
+
steps?: number;
|
|
13
|
+
/** The initial step jump term. */
|
|
14
|
+
term?: JumpTerm;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_ModelProps = {
|
|
17
|
+
modelValue?: EasingPickerValue;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update:modelValue": (value: EasingPickerValue | undefined) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: EasingPickerValue | undefined) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
label: string;
|
|
26
|
+
name: string;
|
|
27
|
+
mode: EasingPickerMode;
|
|
28
|
+
steps: number;
|
|
29
|
+
preset: string;
|
|
30
|
+
term: JumpTerm;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type EasingPickerMode, type EasingPickerValue, type JumpTerm } from "./composables/useEasingPicker";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The curve-authoring mode — `"bezier"` (draggable cubic-bezier) or
|
|
4
|
+
* `"steps"` (the steppedEase staircase). */
|
|
5
|
+
mode?: EasingPickerMode;
|
|
6
|
+
/** The initial bezier preset key. */
|
|
7
|
+
preset?: string;
|
|
8
|
+
/** The initial step count. */
|
|
9
|
+
steps?: number;
|
|
10
|
+
/** The initial step jump term. */
|
|
11
|
+
term?: JumpTerm;
|
|
12
|
+
/** Show the copy-the-literal readout affordance (default true). */
|
|
13
|
+
readout?: boolean;
|
|
14
|
+
/** Show the playback travel-dot control (default true). */
|
|
15
|
+
playback?: boolean;
|
|
16
|
+
/** A11y label for the canvas. */
|
|
17
|
+
label?: string;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_ModelProps = {
|
|
20
|
+
modelValue?: EasingPickerValue;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
23
|
+
declare var __VLS_73: {
|
|
24
|
+
value: EasingPickerValue;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = {} & {
|
|
27
|
+
footer?: (props: typeof __VLS_73) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
"update:modelValue": (value: EasingPickerValue | undefined) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((value: EasingPickerValue | undefined) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
label: string;
|
|
35
|
+
mode: EasingPickerMode;
|
|
36
|
+
steps: number;
|
|
37
|
+
preset: string;
|
|
38
|
+
term: JumpTerm;
|
|
39
|
+
readout: boolean;
|
|
40
|
+
playback: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|