@mkbabb/glass-ui 4.0.1 → 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/dist/{CardAction-CW7a0m8M.js → CardAction-8whJrLWt.js} +23 -8
- package/dist/{CommandShortcut-DvZNQ_HF.js → CommandShortcut-D3yxgHNn.js} +23 -12
- package/dist/{ConfiguratorRow-BR4l-ixA.js → ConfiguratorRow-CaP7U3ZA.js} +11 -11
- package/dist/ContextMenuContent-B3ZsheLV.js +90 -0
- package/dist/{ContextMenuSubContent-xol4sD2q.js → ContextMenuSubContent-DDRID3qC.js} +15 -15
- package/dist/{DataTable-CuKwF7wr.js → DataTable-Bc9kUtu_.js} +2 -2
- package/dist/{DialogContent-DcKK8k9i.js → DialogContent-6JtTB5x2.js} +8 -5
- package/dist/DialogFooter-9phqcRIS.js +80 -0
- package/dist/DialogScrollContent-TTuovQst.js +93 -0
- package/dist/HoverCardContent-Bel1gdLZ.js +88 -0
- package/dist/{IconChip-BTD-nay5.js → IconChip-DhbdGdFQ.js} +1 -1
- package/dist/{IconTooltip-Bl8gFZ8d.js → IconTooltip-B0zimd2H.js} +1 -1
- package/dist/Input-Cg9DF62r.js +57 -0
- package/dist/{Notification-VUwexFUf.js → Notification-CphK7AAm.js} +3 -3
- package/dist/NumberFieldContent-D8cXeyO4.js +140 -0
- package/dist/PagerDots-Cjx96la-.js +98 -0
- package/dist/{SelectScrollDownButton-CrA8F0iV.js → SelectScrollDownButton-DAKCBEdW.js} +62 -57
- package/dist/{SelectSeparator-DXswVdRz.js → SelectSeparator-C2UGOkXF.js} +1 -1
- package/dist/Separator-DQcwC2TR.js +44 -0
- package/dist/Switch-B8RscmRu.js +49 -0
- package/dist/{Toaster-Bw4xR8xV.js → Toaster-D9qIHjBI.js} +1 -1
- package/dist/{ToggleGroupItem-pEM9vIhs.js → ToggleGroupItem-BLtr3TJq.js} +2 -2
- package/dist/TooltipProvider-BJ_Y5EGX.js +109 -0
- package/dist/animated-digit.js +1 -1
- package/dist/api/index.d.ts +15 -32
- package/dist/api/types-extra.d.ts +31 -0
- package/dist/api.js +1 -1
- package/dist/aurora.js +579 -251
- package/dist/border-progress.js +49 -57
- package/dist/{button-DYCUa-tH.js → button-5dY1Dvhd.js} +13 -14
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -3
- package/dist/card.js +1 -1
- package/dist/carousel.js +20 -20
- package/dist/color-Cs0-oxYL.js +116 -0
- package/dist/color.js +2 -2
- package/dist/command.js +1 -1
- 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/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 +12 -0
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +11 -2
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +8 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +18 -0
- package/dist/components/custom/aurora/constants/renderMode.d.ts +16 -8
- 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 -1
- package/dist/components/custom/border-progress/composables/spectrum-walk.d.ts +25 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +14 -18
- package/dist/components/custom/border-progress/index.d.ts +1 -1
- 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/composables/concentricGLSetup.d.ts +7 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +9 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +57 -16
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +2 -1
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +4 -4
- package/dist/components/custom/concentric/constants.d.ts +30 -6
- package/dist/components/custom/concentric/index.d.ts +2 -2
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +2 -2
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -1
- package/dist/components/custom/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 +12 -0
- 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 +80 -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/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 +15 -11
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +48 -6
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +23 -8
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +6 -5
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -5
- package/dist/components/custom/dot-flow-field/constants.d.ts +42 -21
- package/dist/components/custom/dot-flow-field/index.d.ts +2 -2
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -1
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +4 -20
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -1
- 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/EasingPicker.vue.d.ts +2 -2
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +5 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +11 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +40 -47
- 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 +40 -37
- package/dist/components/custom/fourier-field/constants.d.ts +61 -4
- 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/goo-blob/GooBlob.vue.d.ts +9 -1
- 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 -1
- 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/labeled-field/LabeledField.vue.d.ts +21 -2
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +15 -0
- 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/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 +8 -6
- package/dist/components/custom/tabs/constants.d.ts +20 -2
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +29 -16
- 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/useControlSize.d.ts +46 -0
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +45 -0
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselPrevious.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/dropdown-menu/DropdownMenuContent.vue.d.ts +4 -0
- package/dist/components/ui/hover-card/HoverCardContent.vue.d.ts +3 -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/select/SelectContent.vue.d.ts +3 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +2 -0
- package/dist/components/ui/textarea/Textarea.vue.d.ts +3 -0
- 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/useVizChoreography.d.ts +123 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +10 -0
- package/dist/composables/glass/webgl/shaders/flow.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgpu/index.d.ts +1 -1
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +28 -7
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +1 -0
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
- package/dist/composables/motion/core/index.d.ts +3 -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 +31 -6
- 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.js +495 -221
- package/dist/configurator.js +2 -2
- package/dist/confirm-dialog.js +62 -47
- package/dist/constellation.js +635 -235
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +1 -1
- 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 +602 -458
- package/dist/dot-flow-field.js +580 -290
- 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/{dropdown-menu-CofSZuk8.js → dropdown-menu-aJmV5SqE.js} +83 -79
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.js +188 -176
- package/dist/expandable-container.js +42 -20
- package/dist/fading-scroll.js +1 -1
- package/dist/flow.glsl-B2P7e0MT.js +4 -0
- package/dist/forms.js +62 -60
- package/dist/fourier-field.js +825 -178
- package/dist/fourier-math.js +1 -1
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +145 -104
- package/dist/goo-blob.js +171 -1228
- package/dist/goo-dot-matrix.d.ts +1 -0
- package/dist/goo-dot-matrix.js +591 -0
- package/dist/handmark.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 +2 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +70 -60
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +11 -2
- package/dist/motion-core.js +54 -32
- package/dist/motion-curves.js +11 -1
- package/dist/motion.js +46 -111
- 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/{presets-BW2b-fr1.js → presets-CvOUqtdY.js} +3 -3
- package/dist/{procedural-color.glsl-CIFsJhwI.js → procedural-color.wgsl-m7Zgv35j.js} +2 -2
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/{useCanvas2D-B8w_E3Rr.js → resolveCanvasColor-yPyIpJt9.js} +12 -2
- package/dist/scrollReader-DI1NWxUw.js +42 -0
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +160 -304
- 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-tZMg0E0w.js → sheet-B2flBfLH.js} +2 -2
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +216 -114
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +1 -1
- package/dist/spectrum-walk-BVzA7Biz.js +33 -0
- package/dist/{springPresets-CFQGQfdl.js → springPresets-Ce7OYCm9.js} +12 -6
- package/dist/styles/animations.css +13 -3
- package/dist/styles/cards.css +69 -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 +33 -11
- package/dist/styles/deferred.css +2 -0
- package/dist/styles/dock/cta-seat.css +87 -0
- package/dist/styles/dock/density.css +153 -0
- package/dist/styles/dock/layers.css +55 -7
- package/dist/styles/dock/morph-bridge.css +54 -18
- package/dist/styles/dock/morph.css +41 -33
- package/dist/styles/dock/overflow.css +12 -0
- package/dist/styles/dock/search.css +68 -0
- package/dist/styles/dock/shape.css +124 -0
- package/dist/styles/dock/shell.css +23 -5
- 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 +11 -1
- package/dist/styles/glass/accent-tone.css +66 -0
- package/dist/styles/glass/control-surfaces.css +167 -0
- package/dist/styles/glass/ladder.css +67 -17
- package/dist/styles/glass/rim.css +19 -9
- package/dist/styles/glass/surfaces.css +69 -148
- package/dist/styles/glass.css +10 -0
- package/dist/styles/index.css +15 -0
- package/dist/styles/scroll-chrome.css +123 -0
- package/dist/styles/scroll-driven.css +38 -0
- package/dist/styles/segmented-tabs.css +50 -14
- package/dist/styles/theme/bridges.css +22 -0
- package/dist/styles/theme/radius.css +18 -1
- package/dist/styles/tokens/color-radius.css +13 -3
- package/dist/styles/tokens/dark-arm.css +39 -6
- package/dist/styles/tokens/glass-deep.css +28 -3
- package/dist/styles/tokens/glass-fx.css +44 -1
- package/dist/styles/tokens/glass.css +91 -31
- package/dist/styles/tokens/light-dark.css +1 -1
- package/dist/styles/tokens/offsets.css +27 -0
- package/dist/styles/tokens/property-regs.css +133 -0
- package/dist/styles/tokens/scale-paper.css +73 -29
- package/dist/styles/tokens/scheme-motion.css +44 -6
- package/dist/styles/tokens/sizing-config.css +110 -0
- package/dist/styles/tokens/sizing.css +55 -104
- package/dist/styles/tokens.css +5 -0
- package/dist/styles/typography/semantic.css +18 -5
- package/dist/styles/utilities/a11y-overrides.css +20 -5
- package/dist/styles/utilities/base-misc.css +52 -0
- package/dist/styles/utilities/btn.css +14 -3
- package/dist/styles/utilities/components.css +31 -6
- package/dist/styles/utilities/metal.css +26 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +8 -8
- package/dist/timeline.js +1 -1
- 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 +1 -1
- package/dist/uniformBridgeWGPU-CtAKl45L.js +1204 -0
- package/dist/{useAnimatedNumber-BfUq2bUM.js → useAnimatedNumber-CLrxicG9.js} +1 -1
- package/dist/{useConfiguratorState-DNlOh6c8.js → useConfiguratorState-4xblKfwd.js} +25 -24
- package/dist/useControlSize-SH1UmJCi.js +9 -0
- package/dist/useDockCtaReceive-DfFkmgL1.js +82 -0
- package/dist/{useDragMorph-DgxnsVJz.js → useDragMorph-BUgAC-zK.js} +4 -4
- package/dist/useFuzzySearch-DIhcYtcw.js +177 -0
- package/dist/useGpuSubstrate-4pTcp6mX.js +294 -0
- package/dist/{useLiquidPress-kfb4KX79.js → useLiquidPress-BooG97RY.js} +2 -2
- package/dist/usePointerVelocityField-QLsy3_kv.js +91 -0
- package/dist/useScrollChrome-D66AVP7C.js +258 -0
- package/dist/{useSpringMount-q1amq1SJ.js → useSpringMount-BWDnKIwh.js} +1 -1
- package/dist/useSpringPress-B1-Czp-V.js +36 -0
- package/dist/useViewTransition-CUI1nAgn.js +95 -0
- package/dist/{vendor-CKmzio-i.js → vendor-B2qOlYY3.js} +24 -11
- package/dist/virtual.d.ts +1 -0
- package/dist/virtual.js +225 -0
- package/dist/watercolor-dot.js +116 -73
- package/package.json +127 -7
- package/src/styles/animations.css +13 -3
- package/src/styles/cards.css +69 -0
- package/src/styles/completion-seal.css +131 -0
- package/src/styles/configurator.css +55 -0
- package/src/styles/critical-partition.mjs +33 -11
- package/src/styles/dock/cta-seat.css +87 -0
- package/src/styles/dock/density.css +153 -0
- package/src/styles/dock/layers.css +55 -7
- package/src/styles/dock/morph-bridge.css +54 -18
- package/src/styles/dock/morph.css +41 -33
- package/src/styles/dock/overflow.css +12 -0
- package/src/styles/dock/search.css +68 -0
- package/src/styles/dock/shape.css +124 -0
- package/src/styles/dock/shell.css +23 -5
- 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 +11 -1
- package/src/styles/glass/accent-tone.css +66 -0
- package/src/styles/glass/control-surfaces.css +167 -0
- package/src/styles/glass/ladder.css +67 -17
- package/src/styles/glass/rim.css +19 -9
- package/src/styles/glass/surfaces.css +69 -148
- package/src/styles/glass.css +10 -0
- package/src/styles/index.css +15 -0
- package/src/styles/scroll-chrome.css +123 -0
- package/src/styles/scroll-driven.css +38 -0
- package/src/styles/segmented-tabs.css +50 -14
- package/src/styles/theme/bridges.css +22 -0
- package/src/styles/theme/radius.css +18 -1
- package/src/styles/tokens/color-radius.css +13 -3
- package/src/styles/tokens/dark-arm.css +39 -6
- package/src/styles/tokens/glass-deep.css +28 -3
- package/src/styles/tokens/glass-fx.css +44 -1
- package/src/styles/tokens/glass.css +91 -31
- package/src/styles/tokens/light-dark.css +1 -1
- package/src/styles/tokens/offsets.css +27 -0
- package/src/styles/tokens/property-regs.css +133 -0
- package/src/styles/tokens/scale-paper.css +73 -29
- package/src/styles/tokens/scheme-motion.css +44 -6
- package/src/styles/tokens/sizing-config.css +110 -0
- package/src/styles/tokens/sizing.css +55 -104
- package/src/styles/tokens.css +5 -0
- package/src/styles/typography/semantic.css +18 -5
- package/src/styles/utilities/a11y-overrides.css +20 -5
- package/src/styles/utilities/base-misc.css +52 -0
- package/src/styles/utilities/btn.css +14 -3
- package/src/styles/utilities/components.css +31 -6
- package/src/styles/utilities/metal.css +26 -0
- package/dist/ContextMenuContent-uWnVxDab.js +0 -85
- package/dist/DialogFooter-BZNX5aVr.js +0 -165
- package/dist/HoverCardContent-b2uaAMRR.js +0 -83
- package/dist/Input-h9v5LeXf.js +0 -55
- package/dist/NumberFieldContent-Cq7EzX-U.js +0 -138
- package/dist/Separator-pKF0oA4M.js +0 -37
- package/dist/Switch-CwYNf8bo.js +0 -47
- package/dist/TooltipProvider-rzvnXz60.js +0 -104
- 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/createCanvasLifecycle-CHD5XrDW.js +0 -82
- package/dist/procedural-color.wgsl-CToRHugY.js +0 -224
- package/dist/resolveCanvasColor-CUyHr5Uu.js +0 -11
- package/dist/styles/dock/rail-extend.css +0 -397
- package/dist/usePointerVelocityField-JbRd5CrM.js +0 -137
- package/dist/useRAFLoop-UYa4zoiN.js +0 -109
- package/dist/useSpringPress-BsqPr7FJ.js +0 -34
- package/src/styles/dock/rail-extend.css +0 -397
- /package/dist/{FadingScroll-DI6hQhT9.js → FadingScroll-DLRbH5Xr.js} +0 -0
- /package/dist/{HoverPopover-CbqbNwgU.js → HoverPopover-BcIxvyqZ.js} +0 -0
- /package/dist/{InstrumentChassis-Bx0F_q5g.js → InstrumentChassis-CxsHSyMj.js} +0 -0
- /package/dist/{PaperBackdrop-Vf3tlpvd.js → PaperBackdrop-CqwjnfLv.js} +0 -0
- /package/dist/{Progress-DctG61iZ.js → Progress-CnqB7gLm.js} +0 -0
- /package/dist/{ScrollingText-yOpBzFYq.js → ScrollingText-CTZbA_cG.js} +0 -0
- /package/dist/{SelectGroup-DwwjicPY.js → SelectGroup-BFiod7X2.js} +0 -0
- /package/dist/{compile-CQEFRTmx.js → compile-nZ1xVYTp.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants--C2DkLW8.js} +0 -0
- /package/dist/{math-BINYmg5z.js → math-Eb0w3LqU.js} +0 -0
- /package/dist/{prng-Za0Rmgag.js → prng-B-d9eYX8.js} +0 -0
- /package/dist/{slider-DVb4HXU-.js → slider-2A0rPn79.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/{useInterval-CvK1mL92.js → useInterval-CNdua40W.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BPRp33Im.js} +0 -0
- /package/dist/{useLiquidFlex-mZPMiNXh.js → useLiquidFlex-UmA6LMZu.js} +0 -0
- /package/dist/{useScrollProgress-D7bYU2RK.js → useScrollProgress-c3yxmH6a.js} +0 -0
- /package/dist/{useSortable-DHjtZSEd.js → useSortable-BVqlJRBR.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-NmBM5V_4.js} +0 -0
- /package/dist/{vReveal-Czsb7zQC.js → vReveal-D9k0jADx.js} +0 -0
- /package/dist/{vSpecular-CQFmLNzA.js → vSpecular-EX7loENl.js} +0 -0
package/dist/concentric.js
CHANGED
|
@@ -1,10 +1,116 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { t } from "./usePointerVelocityField-QLsy3_kv.js";
|
|
3
|
+
import { n, o as r, r as i, s as a } from "./procedural-color.wgsl-m7Zgv35j.js";
|
|
4
|
+
import { a as o, t as s } from "./useGpuSubstrate-4pTcp6mX.js";
|
|
5
|
+
import { c } from "./color-Cs0-oxYL.js";
|
|
6
|
+
import { computed as l, createElementBlock as u, createElementVNode as d, defineComponent as f, normalizeStyle as p, onScopeDispose as m, openBlock as h, useTemplateRef as g, watch as _ } from "vue";
|
|
7
|
+
//#region src/components/custom/concentric/composables/ringField.ts
|
|
8
|
+
var v = 9.81, y = Math.PI * 2;
|
|
9
|
+
function b(e, t, n, r) {
|
|
10
|
+
let i = Math.cos(t.rotAlpha), a = Math.sin(t.rotAlpha), o = e.x - t.x, s = e.y - t.y, c = i * o + a * s, l = -a * o + i * s, u = c / Math.max(n, 1e-4), d = l / Math.max(r, 1e-4);
|
|
11
|
+
return Math.sqrt(u * u + d * d);
|
|
12
|
+
}
|
|
13
|
+
function x(e, t, n, r) {
|
|
14
|
+
let i = (e.x - t.x) / Math.max(n, 1e-4), a = (e.y - t.y) / Math.max(r, 1e-4);
|
|
15
|
+
return Math.sqrt(i * i + a * a);
|
|
16
|
+
}
|
|
17
|
+
function S(e, t, n, r) {
|
|
18
|
+
let i = Math.cos(t.rotAlpha), a = Math.sin(t.rotAlpha), o = e.x - t.x, s = e.y - t.y, c = i * o + a * s, l = -a * o + i * s, u = Math.max(n, 1e-4), d = Math.max(r, 1e-4), f = c / u, p = l / d, m = Math.sqrt(f * f + p * p), h = f / u, g = p / d;
|
|
19
|
+
return Math.sqrt(h * h + g * g) / Math.max(m, 1e-4);
|
|
20
|
+
}
|
|
21
|
+
function C(e, t, n, r, i, a, o) {
|
|
22
|
+
let s = 0;
|
|
23
|
+
for (let c of n) {
|
|
24
|
+
let n = b(e, c, i, a), l = 0;
|
|
25
|
+
for (let e of r) {
|
|
26
|
+
let r = y / Math.max(e.wavelength, 1e-4), i = Math.sqrt(v * r) * o, a = r * n - i * t + e.phase;
|
|
27
|
+
l += e.amplitude * Math.sin(a);
|
|
28
|
+
}
|
|
29
|
+
s += l * c.weight;
|
|
30
|
+
}
|
|
31
|
+
return s;
|
|
32
|
+
}
|
|
33
|
+
function w(e, t, n, r, i, a, o, s, c, l = .08) {
|
|
34
|
+
let u = 0, d = 0;
|
|
35
|
+
for (let f of n) {
|
|
36
|
+
let n = b(e, f, i, a), p = S(e, f, i, a);
|
|
37
|
+
for (let e of r) {
|
|
38
|
+
let r = y / Math.max(e.wavelength, 1e-4), i = Math.sqrt(v * r) * o, a = r * n - i * t + e.phase, m = Math.sin(a), h = Math.abs(Math.cos(a)), g = Math.max(r * p, 1e-4), _ = Math.abs(m) / Math.max(h * g, 1e-4) * g / Math.max(l, 1e-4), b = 1 - T(s, s + c, _), x = e.amplitude * f.weight;
|
|
39
|
+
u = Math.max(u, b * x), d += m * x;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
ink: E(u),
|
|
44
|
+
env: d
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function T(e, t, n) {
|
|
48
|
+
let r = E((n - e) / Math.max(t - e, 1e-6));
|
|
49
|
+
return r * r * (3 - 2 * r);
|
|
50
|
+
}
|
|
51
|
+
function E(e) {
|
|
52
|
+
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
53
|
+
}
|
|
54
|
+
function D(e, t = 1, n = 0) {
|
|
55
|
+
let r = [], i = Math.max(1, Math.min(2, t));
|
|
56
|
+
for (let t = 0; t < i; t++) r.push({
|
|
57
|
+
amplitude: t === 0 ? 1 : .45,
|
|
58
|
+
wavelength: e / (t + 1),
|
|
59
|
+
phase: (n + t * 1.618033) % y
|
|
60
|
+
});
|
|
61
|
+
return r;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/custom/concentric/constants.ts
|
|
65
|
+
var O = 8, k = 4, A = 4;
|
|
66
|
+
function j(e) {
|
|
67
|
+
return e === "static-contour" ? 1 : e === "both" ? 2 : 0;
|
|
68
|
+
}
|
|
69
|
+
var M = [
|
|
70
|
+
{
|
|
71
|
+
L: .94,
|
|
72
|
+
C: .025,
|
|
73
|
+
h: 80
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
L: .82,
|
|
77
|
+
C: .075,
|
|
78
|
+
h: 62
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
L: .66,
|
|
82
|
+
C: .105,
|
|
83
|
+
h: 44
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
function N(e = .24, t = .04) {
|
|
87
|
+
return [D(e, 1, 0)[0], D(e * (1 + t), 1, 1.7)[0]];
|
|
88
|
+
}
|
|
89
|
+
var P = N(), F = [{
|
|
90
|
+
x: -.28,
|
|
91
|
+
y: -.18,
|
|
92
|
+
weight: 1,
|
|
93
|
+
rotAlpha: .35
|
|
94
|
+
}, {
|
|
95
|
+
x: .3,
|
|
96
|
+
y: .22,
|
|
97
|
+
weight: .85,
|
|
98
|
+
rotAlpha: -.55
|
|
99
|
+
}], I = {
|
|
100
|
+
centers: F,
|
|
101
|
+
ringComponents: P,
|
|
102
|
+
axisRatio: [1, .62],
|
|
103
|
+
speed: .5,
|
|
104
|
+
lineWidth: 1.4,
|
|
105
|
+
lineSoftness: 1,
|
|
106
|
+
renderMode: "traveling-rings",
|
|
107
|
+
contourLevels: 12,
|
|
108
|
+
beatDetune: .04,
|
|
109
|
+
palette: M,
|
|
110
|
+
background: "transparent",
|
|
111
|
+
interactive: !1,
|
|
112
|
+
respectReducedMotion: !0
|
|
113
|
+
}, L = `
|
|
8
114
|
const PI: f32 = 3.141592653589793;
|
|
9
115
|
const TAU: f32 = 6.283185307179586;
|
|
10
116
|
const RING_GRAVITY: f32 = 9.81;
|
|
@@ -16,15 +122,17 @@ const MAX_RING_STOPS: i32 = 4;
|
|
|
16
122
|
struct ConcentricUniforms {
|
|
17
123
|
// u0: (uTime, uSpeed, uAxisA, uAxisB)
|
|
18
124
|
u0: vec4<f32>,
|
|
19
|
-
// ints: (uCenterCount, uRingCount, uStopCount,
|
|
125
|
+
// ints: (uCenterCount, uRingCount, uStopCount, uRenderMode) // 0 rings · 1 contour · 2 both
|
|
20
126
|
ints: vec4<i32>,
|
|
21
127
|
// bg: (background.rgb (linear), hasBackground)
|
|
22
128
|
bg: vec4<f32>,
|
|
23
129
|
// norm: (uFieldNorm, uAspect, _pad, _pad) — field → [0,1] scale
|
|
24
130
|
norm: vec4<f32>,
|
|
131
|
+
// line: (lineHalfWidth, aaSoftness, contourLevels, _pad) — stroke geometry (field units)
|
|
132
|
+
line: vec4<f32>,
|
|
25
133
|
// each ring row: (amplitude, wavelength, phase, _pad)
|
|
26
134
|
rings: array<vec4<f32>, 8>,
|
|
27
|
-
// each center row: (x, y, weight,
|
|
135
|
+
// each center row: (x, y, weight, rotAlpha)
|
|
28
136
|
centers: array<vec4<f32>, 4>,
|
|
29
137
|
// each palette stop: linear-sRGB rgb + _pad
|
|
30
138
|
palette: array<vec4<f32>, 4>,
|
|
@@ -32,8 +140,8 @@ struct ConcentricUniforms {
|
|
|
32
140
|
|
|
33
141
|
@group(0) @binding(0) var<uniform> u: ConcentricUniforms;
|
|
34
142
|
|
|
143
|
+
${n}
|
|
35
144
|
${i}
|
|
36
|
-
${a}
|
|
37
145
|
|
|
38
146
|
// Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the
|
|
39
147
|
// viewport from a single 3-vertex draw — no vertex buffer.
|
|
@@ -50,22 +158,45 @@ fn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {
|
|
|
50
158
|
let c = corners[vi];
|
|
51
159
|
var out: VSOut;
|
|
52
160
|
out.pos = vec4<f32>(c, 0.0, 1.0);
|
|
53
|
-
// aspect-correct so the rings stay circular under the ellipsoidal norm (NOT squashed
|
|
54
|
-
// by the canvas aspect): widen the domain x by the aspect ratio.
|
|
55
161
|
out.uv = vec2<f32>(c.x, c.y);
|
|
56
162
|
return out;
|
|
57
163
|
}
|
|
58
164
|
|
|
59
|
-
// The ellipsoidal radial distance
|
|
60
|
-
//
|
|
61
|
-
fn
|
|
62
|
-
let
|
|
63
|
-
let
|
|
165
|
+
// The ellipsoidal radial distance in the family's ROTATED frame R(−α): rotate (p − c) by
|
|
166
|
+
// −α, then scale by (a,b). Transcribes ringField.ts ellipsoidalRadiusRot.
|
|
167
|
+
fn ellipsoidalRadiusRot(p: vec2<f32>, center: vec2<f32>, rotAlpha: f32, axisA: f32, axisB: f32) -> f32 {
|
|
168
|
+
let ca = cos(rotAlpha);
|
|
169
|
+
let sa = sin(rotAlpha);
|
|
170
|
+
let px = p.x - center.x;
|
|
171
|
+
let py = p.y - center.y;
|
|
172
|
+
let rx = ca * px + sa * py;
|
|
173
|
+
let ry = -sa * px + ca * py;
|
|
174
|
+
let dx = rx / max(axisA, 1e-4);
|
|
175
|
+
let dy = ry / max(axisB, 1e-4);
|
|
64
176
|
return sqrt(dx * dx + dy * dy);
|
|
65
177
|
}
|
|
66
178
|
|
|
179
|
+
// |∇r| of the rotated ellipsoidal radius — closed-form (the IQ distance-estimation
|
|
180
|
+
// denominator). Transcribes ringField.ts ellipsoidalGradMag.
|
|
181
|
+
fn ellipsoidalGradMag(p: vec2<f32>, center: vec2<f32>, rotAlpha: f32, axisA: f32, axisB: f32) -> f32 {
|
|
182
|
+
let ca = cos(rotAlpha);
|
|
183
|
+
let sa = sin(rotAlpha);
|
|
184
|
+
let px = p.x - center.x;
|
|
185
|
+
let py = p.y - center.y;
|
|
186
|
+
let rx = ca * px + sa * py;
|
|
187
|
+
let ry = -sa * px + ca * py;
|
|
188
|
+
let a = max(axisA, 1e-4);
|
|
189
|
+
let b = max(axisB, 1e-4);
|
|
190
|
+
let sx = rx / a;
|
|
191
|
+
let sy = ry / b;
|
|
192
|
+
let r = sqrt(sx * sx + sy * sy);
|
|
193
|
+
let gx = sx / a;
|
|
194
|
+
let gy = sy / b;
|
|
195
|
+
return sqrt(gx * gx + gy * gy) / max(r, 1e-4);
|
|
196
|
+
}
|
|
197
|
+
|
|
67
198
|
// The radial-Fourier ring-interference value f(p,t) — the multi-center weighted sum of
|
|
68
|
-
// radial sinusoids (transcribes ringField.ts sampleRingField
|
|
199
|
+
// CLEAN radial sinusoids (the BEAT ENVELOPE; transcribes ringField.ts sampleRingField).
|
|
69
200
|
fn sampleRingField(p: vec2<f32>, t: f32) -> f32 {
|
|
70
201
|
var acc = 0.0;
|
|
71
202
|
let speed = u.u0.y;
|
|
@@ -76,13 +207,12 @@ fn sampleRingField(p: vec2<f32>, t: f32) -> f32 {
|
|
|
76
207
|
for (var j = 0; j < MAX_CENTERS; j = j + 1) {
|
|
77
208
|
if (j >= centerCount) { break; }
|
|
78
209
|
let cj = u.centers[j];
|
|
79
|
-
let radius =
|
|
210
|
+
let radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, axisA, axisB);
|
|
80
211
|
var centerSum = 0.0;
|
|
81
212
|
for (var i = 0; i < MAX_RINGS; i = i + 1) {
|
|
82
213
|
if (i >= ringCount) { break; }
|
|
83
214
|
let r = u.rings[i];
|
|
84
215
|
let k = TAU / max(r.y, 1e-4);
|
|
85
|
-
// ω = √(g·k); speed scales the travel (the shared dispersion law).
|
|
86
216
|
let omega = sqrt(RING_GRAVITY * k) * speed;
|
|
87
217
|
let theta = k * radius - omega * t + r.z;
|
|
88
218
|
centerSum = centerSum + r.x * sin(theta);
|
|
@@ -92,6 +222,72 @@ fn sampleRingField(p: vec2<f32>, t: f32) -> f32 {
|
|
|
92
222
|
return acc;
|
|
93
223
|
}
|
|
94
224
|
|
|
225
|
+
// The IQ gradient-normalized isoline INK + the beat ENVELOPE — the per-pixel line strength
|
|
226
|
+
// (brightest-wins union over every family × ring crest) and the raw envelope (the hue
|
|
227
|
+
// driver). Transcribes ringField.ts ringIsolineInk.
|
|
228
|
+
struct InkEnv { ink: f32, env: f32, };
|
|
229
|
+
fn ringIsolineInk(p: vec2<f32>, t: f32) -> InkEnv {
|
|
230
|
+
var ink = 0.0;
|
|
231
|
+
var env = 0.0;
|
|
232
|
+
let speed = u.u0.y;
|
|
233
|
+
let axisA = u.u0.z;
|
|
234
|
+
let axisB = u.u0.w;
|
|
235
|
+
let centerCount = u.ints.x;
|
|
236
|
+
let ringCount = u.ints.y;
|
|
237
|
+
let lineHalfW = u.line.x;
|
|
238
|
+
let aa = u.line.y;
|
|
239
|
+
for (var j = 0; j < MAX_CENTERS; j = j + 1) {
|
|
240
|
+
if (j >= centerCount) { break; }
|
|
241
|
+
let cj = u.centers[j];
|
|
242
|
+
let radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, axisA, axisB);
|
|
243
|
+
let gradR = ellipsoidalGradMag(p, cj.xy, cj.w, axisA, axisB);
|
|
244
|
+
for (var i = 0; i < MAX_RINGS; i = i + 1) {
|
|
245
|
+
if (i >= ringCount) { break; }
|
|
246
|
+
let r = u.rings[i];
|
|
247
|
+
let k = TAU / max(r.y, 1e-4);
|
|
248
|
+
let omega = sqrt(RING_GRAVITY * k) * speed;
|
|
249
|
+
let phase = k * radius - omega * t + r.z;
|
|
250
|
+
let s = sin(phase);
|
|
251
|
+
let cphase = abs(cos(phase));
|
|
252
|
+
let gradPhase = max(k * gradR, 1e-4);
|
|
253
|
+
// The IQ gradient-normalized distance-to-isoline (domain units; round-trips JS).
|
|
254
|
+
let de = abs(s) / max(cphase * gradPhase, 1e-4);
|
|
255
|
+
// Convert the domain-units distance to PIXELS via fwidth(phase) (the device
|
|
256
|
+
// per-pixel phase change) so the stroke is a constant pixel width everywhere —
|
|
257
|
+
// lineHalfW/aa are in pixels (NOT fwidthFine, Compatibility-Mode safe).
|
|
258
|
+
let dPx = max(fwidth(phase), 1e-4);
|
|
259
|
+
let dePx = de * gradPhase / dPx;
|
|
260
|
+
var lineV = 1.0 - smoothstep(lineHalfW, lineHalfW + aa, dePx);
|
|
261
|
+
// Analytic anti-aliasing: where the rings pack tighter than the pixel can resolve
|
|
262
|
+
// (fwidth(phase) ≳ π, near a center / under DPR), FADE the line out instead of
|
|
263
|
+
// flooding to a solid mass (IQ filterwidth — the aliasing-fade that keeps the field
|
|
264
|
+
// thin LINES, not a bright slab where the rings converge).
|
|
265
|
+
let aliasFade = 1.0 - smoothstep(PI * 0.6, PI * 1.2, dPx);
|
|
266
|
+
lineV = lineV * aliasFade;
|
|
267
|
+
let w = r.x * cj.z;
|
|
268
|
+
ink = max(ink, lineV * w);
|
|
269
|
+
env = env + s * w;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
var oe: InkEnv;
|
|
273
|
+
oe.ink = clamp(ink, 0.0, 1.0);
|
|
274
|
+
oe.env = env;
|
|
275
|
+
return oe;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// The topographic-contour operator: the isolines of the STATIC interference envelope at N
|
|
279
|
+
// evenly-spaced heights. de_contour = |fract(f·N + 0.5) − 0.5| / |fwidth(f·N)| — the IQ
|
|
280
|
+
// contour-line form. fwidth is the device pixel-derivative safety clamp on the composite
|
|
281
|
+
// ONLY (NOT fwidthFine — Compatibility-Mode safe on Metal/WebKit).
|
|
282
|
+
fn contourInk(envValue: f32, levels: f32) -> f32 {
|
|
283
|
+
let fN = envValue * levels;
|
|
284
|
+
let band = abs(fract(fN + 0.5) - 0.5);
|
|
285
|
+
// fwidth is the device pixel-derivative safety clamp (NOT fwidthFine — Compatibility-Mode
|
|
286
|
+
// safe on Metal/WebKit).
|
|
287
|
+
let aaW = max(fwidth(fN), 1e-4);
|
|
288
|
+
return 1.0 - smoothstep(u.line.x, u.line.x + u.line.y, band / aaW);
|
|
289
|
+
}
|
|
290
|
+
|
|
95
291
|
// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
|
|
96
292
|
fn samplePaletteLin(t: f32) -> vec3<f32> {
|
|
97
293
|
let stopCount = u.ints.z;
|
|
@@ -112,166 +308,119 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
|
|
|
112
308
|
let aspect = max(u.norm.y, 1e-4);
|
|
113
309
|
let p = vec2<f32>(in.uv.x * aspect, in.uv.y);
|
|
114
310
|
let t = u.u0.x;
|
|
311
|
+
let mode = u.ints.w; // 0 traveling-rings · 1 static-contour · 2 both
|
|
312
|
+
let levels = u.line.z;
|
|
313
|
+
|
|
314
|
+
// The isoline strokes (the LINES) + the beat envelope (the HUE).
|
|
315
|
+
let oe = ringIsolineInk(p, t);
|
|
316
|
+
var ink = oe.ink;
|
|
317
|
+
let env = oe.env;
|
|
115
318
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
319
|
+
// The static-contour mode draws elevation lines of the (static) envelope.
|
|
320
|
+
if (mode == 1) {
|
|
321
|
+
ink = contourInk(env * u.norm.x, max(levels, 1.0));
|
|
322
|
+
} else if (mode == 2) {
|
|
323
|
+
ink = max(ink, contourInk(env * u.norm.x, max(levels, 1.0)));
|
|
324
|
+
}
|
|
325
|
+
// fwidth safety clamp on the final line composite (Compatibility-Mode safe).
|
|
326
|
+
ink = clamp(ink, 0.0, 1.0);
|
|
119
327
|
|
|
328
|
+
// The beat-envelope drives the warm-family tone across the ramp (cream↔amber↔ember) so the
|
|
329
|
+
// crossing ring families read as warm-light interference; the saturated mid-amber reads on
|
|
330
|
+
// BOTH the cream page and the dark page (the warm-cream identity, NOT a themed hue).
|
|
331
|
+
let v = clamp(0.5 + env * u.norm.x, 0.0, 1.0);
|
|
120
332
|
let lin = samplePaletteLin(v);
|
|
121
333
|
let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
|
|
122
334
|
|
|
123
|
-
// Premultiplied-alpha output over the (transparent / themed) ground.
|
|
124
335
|
let hasBg = u.bg.w;
|
|
125
336
|
if (hasBg > 0.5) {
|
|
126
|
-
// opaque themed ground: the
|
|
127
|
-
|
|
337
|
+
// opaque themed ground: composite the lit line over the themed bg.
|
|
338
|
+
let bg = clamp(linearToSrgb(u.bg.rgb), vec3<f32>(0.0), vec3<f32>(1.0));
|
|
339
|
+
let outRgb = mix(bg, rgb, ink);
|
|
340
|
+
return vec4<f32>(outRgb, 1.0);
|
|
128
341
|
}
|
|
129
|
-
// transparent ground: the
|
|
130
|
-
|
|
131
|
-
let alpha = clamp(v * 0.92 + 0.08, 0.0, 1.0);
|
|
342
|
+
// transparent ground: the LINE carries the alpha — the page reads through the troughs.
|
|
343
|
+
let alpha = ink;
|
|
132
344
|
return vec4<f32>(rgb * alpha, alpha);
|
|
133
345
|
}
|
|
134
|
-
`,
|
|
135
|
-
function b(e, t, n, r) {
|
|
136
|
-
let i = (e.x - t.x) / Math.max(n, 1e-4), a = (e.y - t.y) / Math.max(r, 1e-4);
|
|
137
|
-
return Math.sqrt(i * i + a * a);
|
|
138
|
-
}
|
|
139
|
-
function x(e, t, n, r, i, a, o) {
|
|
140
|
-
let s = 0;
|
|
141
|
-
for (let c of n) {
|
|
142
|
-
let n = b(e, c, i, a), l = 0;
|
|
143
|
-
for (let e of r) {
|
|
144
|
-
let r = y / Math.max(e.wavelength, 1e-4), i = Math.sqrt(v * r) * o, a = r * n - i * t + e.phase;
|
|
145
|
-
l += e.amplitude * Math.sin(a);
|
|
146
|
-
}
|
|
147
|
-
s += l * c.weight;
|
|
148
|
-
}
|
|
149
|
-
return s;
|
|
150
|
-
}
|
|
151
|
-
function S(e = 5) {
|
|
152
|
-
let t = [], n = .7;
|
|
153
|
-
for (let r = 0; r < e; r++) {
|
|
154
|
-
let e = y / n, i = Math.exp(-1 / (e * 1.4) ** 2) / (e * e);
|
|
155
|
-
t.push({
|
|
156
|
-
amplitude: i * .9,
|
|
157
|
-
wavelength: n,
|
|
158
|
-
phase: r * 1.618033 % y
|
|
159
|
-
}), n *= .62;
|
|
160
|
-
}
|
|
161
|
-
return t;
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/components/custom/concentric/constants.ts
|
|
165
|
-
var C = 8, w = 4, T = 4, E = [
|
|
166
|
-
{
|
|
167
|
-
L: .94,
|
|
168
|
-
C: .025,
|
|
169
|
-
h: 80
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
L: .82,
|
|
173
|
-
C: .075,
|
|
174
|
-
h: 62
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
L: .66,
|
|
178
|
-
C: .105,
|
|
179
|
-
h: 44
|
|
180
|
-
}
|
|
181
|
-
], D = S(5), O = [{
|
|
182
|
-
x: -.22,
|
|
183
|
-
y: -.14,
|
|
184
|
-
weight: 1
|
|
185
|
-
}, {
|
|
186
|
-
x: .28,
|
|
187
|
-
y: .2,
|
|
188
|
-
weight: .7
|
|
189
|
-
}], k = {
|
|
190
|
-
centers: O,
|
|
191
|
-
ringComponents: D,
|
|
192
|
-
axisRatio: [1, .62],
|
|
193
|
-
speed: .5,
|
|
194
|
-
palette: E,
|
|
195
|
-
background: "transparent",
|
|
196
|
-
interactive: !1,
|
|
197
|
-
respectReducedMotion: !0
|
|
198
|
-
}, A = 320, j = {
|
|
346
|
+
`, R = 336, z = {
|
|
199
347
|
u0: 0,
|
|
200
348
|
ints: 4,
|
|
201
349
|
bg: 8,
|
|
202
350
|
norm: 12,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
351
|
+
line: 16,
|
|
352
|
+
rings: 20,
|
|
353
|
+
centers: 52,
|
|
354
|
+
palette: 68
|
|
355
|
+
}, B = .55;
|
|
356
|
+
function V() {
|
|
357
|
+
let e = new ArrayBuffer(R);
|
|
209
358
|
return {
|
|
210
359
|
buffer: e,
|
|
211
360
|
f32: new Float32Array(e),
|
|
212
361
|
i32: new Int32Array(e)
|
|
213
362
|
};
|
|
214
363
|
}
|
|
215
|
-
function
|
|
216
|
-
let { f32:
|
|
217
|
-
|
|
218
|
-
let
|
|
219
|
-
if (
|
|
364
|
+
function H(e, t, n, r, i, a) {
|
|
365
|
+
let { f32: o, i32: s } = e, [l, u] = t.axisRatio, d = a ?? t.centers;
|
|
366
|
+
o[z.u0 + 0] = n, o[z.u0 + 1] = t.speed, o[z.u0 + 2] = l, o[z.u0 + 3] = u;
|
|
367
|
+
let f = Math.min(d.length, 4), p = Math.min(t.ringComponents.length, 8), m = Math.min(i.length, 4);
|
|
368
|
+
if (s[z.ints + 0] = f, s[z.ints + 1] = p, s[z.ints + 2] = m, s[z.ints + 3] = j(t.renderMode), t.background === "transparent") o[z.bg + 0] = 0, o[z.bg + 1] = 0, o[z.bg + 2] = 0, o[z.bg + 3] = 0;
|
|
220
369
|
else {
|
|
221
|
-
let e =
|
|
222
|
-
|
|
370
|
+
let e = c(t.background);
|
|
371
|
+
o[z.bg + 0] = e[0], o[z.bg + 1] = e[1], o[z.bg + 2] = e[2], o[z.bg + 3] = 1;
|
|
223
372
|
}
|
|
224
|
-
|
|
373
|
+
o[z.norm + 0] = B, o[z.norm + 1] = r, o[z.norm + 2] = 0, o[z.norm + 3] = 0, o[z.line + 0] = t.lineWidth, o[z.line + 1] = t.lineSoftness, o[z.line + 2] = t.contourLevels, o[z.line + 3] = 0, U(o, z.rings, t.ringComponents), W(o, z.centers, d);
|
|
225
374
|
for (let e = 0; e < 4; e++) {
|
|
226
|
-
let t =
|
|
227
|
-
|
|
375
|
+
let t = z.palette + e * 4, n = c(i[Math.min(e, m - 1)] ?? i[0]);
|
|
376
|
+
o[t + 0] = n[0], o[t + 1] = n[1], o[t + 2] = n[2], o[t + 3] = 0;
|
|
228
377
|
}
|
|
229
378
|
return e;
|
|
230
379
|
}
|
|
231
|
-
function
|
|
380
|
+
function U(e, t, n) {
|
|
232
381
|
for (let r = 0; r < 8; r++) {
|
|
233
382
|
let i = t + r * 4, a = n[r];
|
|
234
383
|
a ? (e[i + 0] = a.amplitude, e[i + 1] = a.wavelength, e[i + 2] = a.phase, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 1, e[i + 2] = 0, e[i + 3] = 0);
|
|
235
384
|
}
|
|
236
385
|
}
|
|
237
|
-
function
|
|
386
|
+
function W(e, t, n) {
|
|
238
387
|
for (let r = 0; r < 4; r++) {
|
|
239
388
|
let i = t + r * 4, a = n[r];
|
|
240
|
-
a ? (e[i + 0] = a.x, e[i + 1] = a.y, e[i + 2] = a.weight, e[i + 3] =
|
|
389
|
+
a ? (e[i + 0] = a.x, e[i + 1] = a.y, e[i + 2] = a.weight, e[i + 3] = a.rotAlpha) : (e[i + 0] = 0, e[i + 1] = 0, e[i + 2] = 0, e[i + 3] = 0);
|
|
241
390
|
}
|
|
242
391
|
}
|
|
243
392
|
//#endregion
|
|
244
393
|
//#region src/components/custom/concentric/composables/concentricWGPUSetup.ts
|
|
245
|
-
var
|
|
246
|
-
function
|
|
247
|
-
let { canvas: t, config: n, getPalette: r,
|
|
248
|
-
return function(e,
|
|
249
|
-
let
|
|
394
|
+
var G = 64, K = 8, q = 2;
|
|
395
|
+
function J(e) {
|
|
396
|
+
let { canvas: t, config: n, getPalette: r, getCenters: i, shouldContinue: a, onFrame: s } = e;
|
|
397
|
+
return function(e, c, l) {
|
|
398
|
+
let u = e.createShaderModule({
|
|
250
399
|
label: "[Concentric] concentric.wgsl",
|
|
251
|
-
code:
|
|
252
|
-
}),
|
|
400
|
+
code: L
|
|
401
|
+
}), d = V(), f = e.createBuffer({
|
|
253
402
|
label: "[Concentric] uniforms",
|
|
254
|
-
size:
|
|
255
|
-
usage:
|
|
256
|
-
}),
|
|
403
|
+
size: d.buffer.byteLength,
|
|
404
|
+
usage: G | K
|
|
405
|
+
}), p = e.createBindGroupLayout({
|
|
257
406
|
label: "[Concentric] bgl",
|
|
258
407
|
entries: [{
|
|
259
408
|
binding: 0,
|
|
260
|
-
visibility:
|
|
409
|
+
visibility: q,
|
|
261
410
|
buffer: { type: "uniform" }
|
|
262
411
|
}]
|
|
263
|
-
}),
|
|
412
|
+
}), m = e.createRenderPipeline({
|
|
264
413
|
label: "[Concentric] pipeline",
|
|
265
|
-
layout: e.createPipelineLayout({ bindGroupLayouts: [
|
|
414
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [p] }),
|
|
266
415
|
vertex: {
|
|
267
|
-
module:
|
|
416
|
+
module: u,
|
|
268
417
|
entryPoint: "vs_main"
|
|
269
418
|
},
|
|
270
419
|
fragment: {
|
|
271
|
-
module:
|
|
420
|
+
module: u,
|
|
272
421
|
entryPoint: "fs_main",
|
|
273
422
|
targets: [{
|
|
274
|
-
format:
|
|
423
|
+
format: l,
|
|
275
424
|
blend: {
|
|
276
425
|
color: {
|
|
277
426
|
srcFactor: "one",
|
|
@@ -287,22 +436,22 @@ function B(e) {
|
|
|
287
436
|
}]
|
|
288
437
|
},
|
|
289
438
|
primitive: { topology: "triangle-list" }
|
|
290
|
-
}),
|
|
439
|
+
}), h = e.createBindGroup({
|
|
291
440
|
label: "[Concentric] bg",
|
|
292
|
-
layout:
|
|
441
|
+
layout: p,
|
|
293
442
|
entries: [{
|
|
294
443
|
binding: 0,
|
|
295
|
-
resource: { buffer:
|
|
444
|
+
resource: { buffer: f }
|
|
296
445
|
}]
|
|
297
446
|
});
|
|
298
|
-
function
|
|
447
|
+
function g() {
|
|
299
448
|
let e = o(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
|
|
300
449
|
(t.width !== i || t.height !== a) && (t.width = i, t.height = a);
|
|
301
450
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
304
|
-
let o = e.createCommandEncoder({ label: "[Concentric] frame" }),
|
|
305
|
-
view:
|
|
451
|
+
function _(a) {
|
|
452
|
+
s?.(a), H(d, n, a, (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), r(), i()), e.queue.writeBuffer(f, 0, d.buffer);
|
|
453
|
+
let o = e.createCommandEncoder({ label: "[Concentric] frame" }), l = c.getCurrentTexture().createView(), u = o.beginRenderPass({ colorAttachments: [{
|
|
454
|
+
view: l,
|
|
306
455
|
clearValue: {
|
|
307
456
|
r: 0,
|
|
308
457
|
g: 0,
|
|
@@ -312,21 +461,21 @@ function B(e) {
|
|
|
312
461
|
loadOp: "clear",
|
|
313
462
|
storeOp: "store"
|
|
314
463
|
}] });
|
|
315
|
-
|
|
464
|
+
u.setPipeline(m), u.setBindGroup(0, h), u.draw(3, 1, 0, 0), u.end(), e.queue.submit([o.finish()]);
|
|
316
465
|
}
|
|
317
466
|
return {
|
|
318
|
-
frame:
|
|
319
|
-
shouldContinue:
|
|
320
|
-
resize:
|
|
467
|
+
frame: _,
|
|
468
|
+
shouldContinue: a,
|
|
469
|
+
resize: g,
|
|
321
470
|
teardown: () => {
|
|
322
|
-
|
|
471
|
+
f.destroy();
|
|
323
472
|
}
|
|
324
473
|
};
|
|
325
474
|
};
|
|
326
475
|
}
|
|
327
476
|
//#endregion
|
|
328
477
|
//#region src/components/custom/concentric/shaders/concentric.glsl.ts
|
|
329
|
-
var
|
|
478
|
+
var Y = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", X = `#version 300 es
|
|
330
479
|
precision highp float;
|
|
331
480
|
|
|
332
481
|
#define PI 3.141592653589793
|
|
@@ -347,28 +496,55 @@ uniform float uAspect;
|
|
|
347
496
|
uniform int uCenterCount;
|
|
348
497
|
uniform int uRingCount;
|
|
349
498
|
uniform int uStopCount;
|
|
499
|
+
uniform int uRenderMode; // 0 traveling-rings · 1 static-contour · 2 both
|
|
350
500
|
uniform float uHasBackground;
|
|
501
|
+
uniform vec3 uLine; // (lineHalfWidth, aaSoftness, contourLevels) — stroke geometry
|
|
502
|
+
uniform vec3 uBg; // themed background (linear-sRGB)
|
|
351
503
|
uniform vec3 uRings[MAX_RINGS]; // (amplitude, wavelength, phase)
|
|
352
|
-
uniform
|
|
504
|
+
uniform vec4 uCenters[MAX_CENTERS]; // (x, y, weight, rotAlpha)
|
|
353
505
|
uniform vec3 uPalette[MAX_RING_STOPS]; // linear-sRGB stops
|
|
354
506
|
|
|
355
|
-
${
|
|
356
|
-
${
|
|
507
|
+
${r}
|
|
508
|
+
${a}
|
|
357
509
|
|
|
358
|
-
//
|
|
359
|
-
float
|
|
360
|
-
float
|
|
361
|
-
float
|
|
510
|
+
// rotated ellipsoidal radius — transcribes ringField.ts ellipsoidalRadiusRot.
|
|
511
|
+
float ellipsoidalRadiusRot(vec2 p, vec2 center, float rotAlpha, float axisA, float axisB) {
|
|
512
|
+
float ca = cos(rotAlpha);
|
|
513
|
+
float sa = sin(rotAlpha);
|
|
514
|
+
float px = p.x - center.x;
|
|
515
|
+
float py = p.y - center.y;
|
|
516
|
+
float rx = ca * px + sa * py;
|
|
517
|
+
float ry = -sa * px + ca * py;
|
|
518
|
+
float dx = rx / max(axisA, 1e-4);
|
|
519
|
+
float dy = ry / max(axisB, 1e-4);
|
|
362
520
|
return sqrt(dx * dx + dy * dy);
|
|
363
521
|
}
|
|
364
522
|
|
|
523
|
+
// |∇r| of the rotated ellipsoidal radius — transcribes ringField.ts ellipsoidalGradMag.
|
|
524
|
+
float ellipsoidalGradMag(vec2 p, vec2 center, float rotAlpha, float axisA, float axisB) {
|
|
525
|
+
float ca = cos(rotAlpha);
|
|
526
|
+
float sa = sin(rotAlpha);
|
|
527
|
+
float px = p.x - center.x;
|
|
528
|
+
float py = p.y - center.y;
|
|
529
|
+
float rx = ca * px + sa * py;
|
|
530
|
+
float ry = -sa * px + ca * py;
|
|
531
|
+
float a = max(axisA, 1e-4);
|
|
532
|
+
float b = max(axisB, 1e-4);
|
|
533
|
+
float sx = rx / a;
|
|
534
|
+
float sy = ry / b;
|
|
535
|
+
float r = sqrt(sx * sx + sy * sy);
|
|
536
|
+
float gx = sx / a;
|
|
537
|
+
float gy = sy / b;
|
|
538
|
+
return sqrt(gx * gx + gy * gy) / max(r, 1e-4);
|
|
539
|
+
}
|
|
540
|
+
|
|
365
541
|
// f(p,t) — the multi-center weighted radial sum (transcribes ringField.ts sampleRingField).
|
|
366
542
|
float sampleRingField(vec2 p, float t) {
|
|
367
543
|
float acc = 0.0;
|
|
368
544
|
for (int j = 0; j < MAX_CENTERS; j++) {
|
|
369
545
|
if (j >= uCenterCount) break;
|
|
370
|
-
|
|
371
|
-
float radius =
|
|
546
|
+
vec4 cj = uCenters[j];
|
|
547
|
+
float radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, uAxis.x, uAxis.y);
|
|
372
548
|
float centerSum = 0.0;
|
|
373
549
|
for (int i = 0; i < MAX_RINGS; i++) {
|
|
374
550
|
if (i >= uRingCount) break;
|
|
@@ -383,7 +559,54 @@ float sampleRingField(vec2 p, float t) {
|
|
|
383
559
|
return acc;
|
|
384
560
|
}
|
|
385
561
|
|
|
386
|
-
//
|
|
562
|
+
// The IQ gradient-normalized isoline ink + the beat envelope (transcribes ringIsolineInk).
|
|
563
|
+
// Returns vec2(ink, env).
|
|
564
|
+
vec2 ringIsolineInk(vec2 p, float t) {
|
|
565
|
+
float ink = 0.0;
|
|
566
|
+
float env = 0.0;
|
|
567
|
+
float lineHalfW = uLine.x;
|
|
568
|
+
float aa = uLine.y;
|
|
569
|
+
for (int j = 0; j < MAX_CENTERS; j++) {
|
|
570
|
+
if (j >= uCenterCount) break;
|
|
571
|
+
vec4 cj = uCenters[j];
|
|
572
|
+
float radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, uAxis.x, uAxis.y);
|
|
573
|
+
float gradR = ellipsoidalGradMag(p, cj.xy, cj.w, uAxis.x, uAxis.y);
|
|
574
|
+
for (int i = 0; i < MAX_RINGS; i++) {
|
|
575
|
+
if (i >= uRingCount) break;
|
|
576
|
+
vec3 r = uRings[i];
|
|
577
|
+
float k = TAU / max(r.y, 1e-4);
|
|
578
|
+
float omega = sqrt(RING_GRAVITY * k) * uSpeed;
|
|
579
|
+
float phase = k * radius - omega * t + r.z;
|
|
580
|
+
float s = sin(phase);
|
|
581
|
+
float cphase = abs(cos(phase));
|
|
582
|
+
float gradPhase = max(k * gradR, 1e-4);
|
|
583
|
+
// The IQ gradient-normalized distance-to-isoline (domain units; round-trips JS).
|
|
584
|
+
float de = abs(s) / max(cphase * gradPhase, 1e-4);
|
|
585
|
+
// Convert to PIXELS via fwidth(phase) so the stroke is a constant pixel width.
|
|
586
|
+
float dPx = max(fwidth(phase), 1e-4);
|
|
587
|
+
float dePx = de * gradPhase / dPx;
|
|
588
|
+
float lineV = 1.0 - smoothstep(lineHalfW, lineHalfW + aa, dePx);
|
|
589
|
+
// Analytic anti-aliasing: fade lines where the rings pack tighter than a pixel can
|
|
590
|
+
// resolve (fwidth(phase) ≳ π, near a center / under DPR) so the field stays thin LINES
|
|
591
|
+
// instead of flooding to a bright slab (IQ filterwidth).
|
|
592
|
+
float aliasFade = 1.0 - smoothstep(PI * 0.6, PI * 1.2, dPx);
|
|
593
|
+
lineV *= aliasFade;
|
|
594
|
+
float w = r.x * cj.z;
|
|
595
|
+
ink = max(ink, lineV * w);
|
|
596
|
+
env += s * w;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return vec2(clamp(ink, 0.0, 1.0), env);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// The topographic-contour operator (transcribes contourInk).
|
|
603
|
+
float contourInk(float envValue, float levels) {
|
|
604
|
+
float fN = envValue * levels;
|
|
605
|
+
float band = abs(fract(fN + 0.5) - 0.5);
|
|
606
|
+
float aaW = max(fwidth(fN), 1e-4);
|
|
607
|
+
return 1.0 - smoothstep(uLine.x, uLine.x + uLine.y, band / aaW);
|
|
608
|
+
}
|
|
609
|
+
|
|
387
610
|
vec3 samplePaletteLin(float t) {
|
|
388
611
|
if (uStopCount <= 1) return uPalette[0];
|
|
389
612
|
float n = float(uStopCount);
|
|
@@ -391,7 +614,6 @@ vec3 samplePaletteLin(float t) {
|
|
|
391
614
|
int i0 = int(floor(ft));
|
|
392
615
|
int i1 = min(i0 + 1, uStopCount - 1);
|
|
393
616
|
float f = ft - float(i0);
|
|
394
|
-
// cube-root LMS (the GLSL chunk inlines cbrt as sign(x)·pow(|x|,1/3) — no cbrt3 fn).
|
|
395
617
|
vec3 lmsA = LINEAR_SRGB_TO_LMS * uPalette[i0];
|
|
396
618
|
vec3 lmsB = LINEAR_SRGB_TO_LMS * uPalette[i1];
|
|
397
619
|
vec3 labA = LMS_TO_OKLAB * (sign(lmsA) * pow(abs(lmsA), vec3(1.0 / 3.0)));
|
|
@@ -402,20 +624,35 @@ vec3 samplePaletteLin(float t) {
|
|
|
402
624
|
void main() {
|
|
403
625
|
float aspect = max(uAspect, 1e-4);
|
|
404
626
|
vec2 p = vec2(vUv.x * aspect, vUv.y);
|
|
405
|
-
|
|
406
|
-
|
|
627
|
+
|
|
628
|
+
vec2 ie = ringIsolineInk(p, uTime);
|
|
629
|
+
float ink = ie.x;
|
|
630
|
+
float env = ie.y;
|
|
631
|
+
|
|
632
|
+
if (uRenderMode == 1) {
|
|
633
|
+
ink = contourInk(env * uFieldNorm, max(uLine.z, 1.0));
|
|
634
|
+
} else if (uRenderMode == 2) {
|
|
635
|
+
ink = max(ink, contourInk(env * uFieldNorm, max(uLine.z, 1.0)));
|
|
636
|
+
}
|
|
637
|
+
ink = clamp(ink, 0.0, 1.0);
|
|
638
|
+
|
|
639
|
+
// The beat-envelope drives the warm-family tone across the ramp (cream↔amber↔ember) so the
|
|
640
|
+
// crossing families read as warm-light interference (the warm-cream identity).
|
|
641
|
+
float v = clamp(0.5 + env * uFieldNorm, 0.0, 1.0);
|
|
407
642
|
vec3 lin = samplePaletteLin(v);
|
|
408
643
|
vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
|
|
644
|
+
|
|
409
645
|
if (uHasBackground > 0.5) {
|
|
410
|
-
|
|
646
|
+
vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));
|
|
647
|
+
fragColor = vec4(mix(bg, rgb, ink), 1.0);
|
|
411
648
|
return;
|
|
412
649
|
}
|
|
413
|
-
float alpha =
|
|
650
|
+
float alpha = ink;
|
|
414
651
|
fragColor = vec4(rgb * alpha, alpha);
|
|
415
652
|
}`;
|
|
416
653
|
//#endregion
|
|
417
654
|
//#region src/components/custom/concentric/composables/concentricGLSetup.ts
|
|
418
|
-
function
|
|
655
|
+
function Z(e, t, n) {
|
|
419
656
|
let r = e.createShader(t);
|
|
420
657
|
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
421
658
|
let t = e.getShaderInfoLog(r);
|
|
@@ -423,16 +660,16 @@ function U(e, t, n) {
|
|
|
423
660
|
}
|
|
424
661
|
return r;
|
|
425
662
|
}
|
|
426
|
-
function
|
|
427
|
-
let { canvas: t, config: n, getPalette: r,
|
|
663
|
+
function Q(e) {
|
|
664
|
+
let { canvas: t, config: n, getPalette: r, getCenters: i, shouldContinue: a, onFrame: s } = e;
|
|
428
665
|
return function(e) {
|
|
429
|
-
let
|
|
430
|
-
if (e.attachShader(
|
|
431
|
-
e.deleteShader(
|
|
432
|
-
let
|
|
433
|
-
e.bindVertexArray(
|
|
434
|
-
let
|
|
435
|
-
e.bindBuffer(e.ARRAY_BUFFER,
|
|
666
|
+
let l = Z(e, e.VERTEX_SHADER, Y), u = Z(e, e.FRAGMENT_SHADER, X), d = e.createProgram();
|
|
667
|
+
if (e.attachShader(d, l), e.attachShader(d, u), e.linkProgram(d), !e.getProgramParameter(d, e.LINK_STATUS)) throw Error(`[Concentric] link failed: ${e.getProgramInfoLog(d)}`);
|
|
668
|
+
e.deleteShader(l), e.deleteShader(u);
|
|
669
|
+
let f = e.createVertexArray();
|
|
670
|
+
e.bindVertexArray(f);
|
|
671
|
+
let p = e.createBuffer();
|
|
672
|
+
e.bindBuffer(e.ARRAY_BUFFER, p), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
436
673
|
-1,
|
|
437
674
|
-1,
|
|
438
675
|
3,
|
|
@@ -440,91 +677,128 @@ function W(e) {
|
|
|
440
677
|
-1,
|
|
441
678
|
3
|
|
442
679
|
]), e.STATIC_DRAW);
|
|
443
|
-
let
|
|
444
|
-
e.enableVertexAttribArray(
|
|
445
|
-
let
|
|
446
|
-
function
|
|
680
|
+
let m = e.getAttribLocation(d, "aPosition");
|
|
681
|
+
e.enableVertexAttribArray(m), e.vertexAttribPointer(m, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
|
|
682
|
+
let h = (t) => e.getUniformLocation(d, t), g = h("uTime"), _ = h("uSpeed"), v = h("uAxis"), y = h("uFieldNorm"), b = h("uAspect"), x = h("uCenterCount"), S = h("uRingCount"), C = h("uStopCount"), w = h("uRenderMode"), T = h("uHasBackground"), E = h("uLine"), D = h("uBg"), O = h("uRings[0]"), k = h("uCenters[0]"), A = h("uPalette[0]");
|
|
683
|
+
function M() {
|
|
447
684
|
let n = o(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
|
|
448
685
|
(t.width !== a || t.height !== s) && (t.width = a, t.height = s), e.viewport(0, 0, t.width, t.height);
|
|
449
686
|
}
|
|
450
|
-
function
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
687
|
+
function N(a) {
|
|
688
|
+
s?.(a);
|
|
689
|
+
let o = t.clientWidth || 320, l = t.clientHeight || 320, u = o / Math.max(l, 1);
|
|
690
|
+
e.useProgram(d), e.bindVertexArray(f), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.uniform1f(g, a), e.uniform1f(_, n.speed), e.uniform2f(v, n.axisRatio[0], n.axisRatio[1]), e.uniform1f(y, B), e.uniform1f(b, u);
|
|
691
|
+
let p = i(), m = Math.min(p.length, 4), h = Math.min(n.ringComponents.length, 8), M = r(), N = Math.min(M.length, 4);
|
|
692
|
+
if (e.uniform1i(x, m), e.uniform1i(S, h), e.uniform1i(C, N), e.uniform1i(w, j(n.renderMode)), e.uniform3f(E, n.lineWidth, n.lineSoftness, n.contourLevels), n.background === "transparent") e.uniform1f(T, 0), e.uniform3f(D, 0, 0, 0);
|
|
693
|
+
else {
|
|
694
|
+
e.uniform1f(T, 1);
|
|
695
|
+
let t = c(n.background);
|
|
696
|
+
e.uniform3f(D, t[0], t[1], t[2]);
|
|
697
|
+
}
|
|
698
|
+
let P = new Float32Array(24);
|
|
456
699
|
for (let e = 0; e < 8; e++) {
|
|
457
700
|
let t = n.ringComponents[e];
|
|
458
|
-
|
|
701
|
+
P[e * 3 + 0] = t?.amplitude ?? 0, P[e * 3 + 1] = t?.wavelength ?? 1, P[e * 3 + 2] = t?.phase ?? 0;
|
|
459
702
|
}
|
|
460
|
-
e.uniform3fv(
|
|
461
|
-
let
|
|
703
|
+
e.uniform3fv(O, P);
|
|
704
|
+
let F = new Float32Array(16);
|
|
462
705
|
for (let e = 0; e < 4; e++) {
|
|
463
|
-
let t =
|
|
464
|
-
|
|
706
|
+
let t = p[e];
|
|
707
|
+
F[e * 4 + 0] = t?.x ?? 0, F[e * 4 + 1] = t?.y ?? 0, F[e * 4 + 2] = t?.weight ?? 0, F[e * 4 + 3] = t?.rotAlpha ?? 0;
|
|
465
708
|
}
|
|
466
|
-
e.
|
|
467
|
-
let
|
|
709
|
+
e.uniform4fv(k, F);
|
|
710
|
+
let I = new Float32Array(12);
|
|
468
711
|
for (let e = 0; e < 4; e++) {
|
|
469
|
-
let t =
|
|
470
|
-
|
|
712
|
+
let t = c(M[Math.min(e, N - 1)] ?? M[0]);
|
|
713
|
+
I[e * 3 + 0] = t[0], I[e * 3 + 1] = t[1], I[e * 3 + 2] = t[2];
|
|
471
714
|
}
|
|
472
|
-
e.uniform3fv(
|
|
715
|
+
e.uniform3fv(A, I), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
|
|
473
716
|
}
|
|
474
717
|
return {
|
|
475
|
-
frame:
|
|
476
|
-
shouldContinue:
|
|
477
|
-
resize:
|
|
718
|
+
frame: N,
|
|
719
|
+
shouldContinue: a,
|
|
720
|
+
resize: M,
|
|
478
721
|
teardown: () => {
|
|
479
|
-
e.deleteProgram(
|
|
722
|
+
e.deleteProgram(d), e.deleteVertexArray(f), e.deleteBuffer(p);
|
|
480
723
|
}
|
|
481
724
|
};
|
|
482
725
|
};
|
|
483
726
|
}
|
|
484
727
|
//#endregion
|
|
485
728
|
//#region src/components/custom/concentric/composables/useConcentric.ts
|
|
486
|
-
function
|
|
487
|
-
let { config:
|
|
729
|
+
function $(e, n) {
|
|
730
|
+
let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), c = r.centers.slice(), l = 0, u = () => {
|
|
731
|
+
o.onPointerEnter(), r.interactive && v?.wake();
|
|
732
|
+
}, d = (e) => {
|
|
733
|
+
o.onPointerMove(e), r.interactive && v?.wake();
|
|
734
|
+
}, f = (e) => e.parentElement ?? e;
|
|
735
|
+
function p(e) {
|
|
736
|
+
let t = f(e);
|
|
737
|
+
t.addEventListener("pointermove", d), t.addEventListener("pointerenter", u), t.addEventListener("pointerleave", o.onPointerLeave);
|
|
738
|
+
}
|
|
739
|
+
function h(e) {
|
|
740
|
+
let t = f(e);
|
|
741
|
+
t.removeEventListener("pointermove", d), t.removeEventListener("pointerenter", u), t.removeEventListener("pointerleave", o.onPointerLeave);
|
|
742
|
+
}
|
|
743
|
+
function g(e) {
|
|
744
|
+
let t = l > 0 ? (e - l) * 1e3 : 16.7;
|
|
745
|
+
if (l = e, o.tick(t), c = r.centers.slice(0, 4), !r.interactive || !o.active.value || c.length >= 4) return;
|
|
746
|
+
let n = o.smoothedPosition.value, i = o.velocity.value, a = n.x * 2 - 1, s = -(n.y * 2 - 1), u = Math.atan2(i.y, i.x), d = .35 + Math.min(.65, o.burst.value);
|
|
747
|
+
c.push({
|
|
748
|
+
x: a,
|
|
749
|
+
y: s,
|
|
750
|
+
weight: d,
|
|
751
|
+
rotAlpha: u
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
let _ = () => c, v = null, y = () => {
|
|
488
755
|
let t = e.value;
|
|
489
|
-
return t ? (
|
|
756
|
+
return t ? (v || (p(t), v = s(t, {
|
|
490
757
|
mode: a,
|
|
491
|
-
respectReducedMotion:
|
|
492
|
-
setupWGPU:
|
|
758
|
+
respectReducedMotion: r.respectReducedMotion,
|
|
759
|
+
setupWGPU: J({
|
|
493
760
|
canvas: t,
|
|
494
|
-
config:
|
|
761
|
+
config: r,
|
|
495
762
|
getPalette: i,
|
|
496
|
-
|
|
763
|
+
getCenters: _,
|
|
764
|
+
shouldContinue: () => !0,
|
|
765
|
+
onFrame: g
|
|
497
766
|
}),
|
|
498
|
-
setupGL:
|
|
767
|
+
setupGL: Q({
|
|
499
768
|
canvas: t,
|
|
500
|
-
config:
|
|
769
|
+
config: r,
|
|
501
770
|
getPalette: i,
|
|
502
|
-
|
|
771
|
+
getCenters: _,
|
|
772
|
+
shouldContinue: () => !0,
|
|
773
|
+
onFrame: g
|
|
503
774
|
})
|
|
504
|
-
}),
|
|
775
|
+
}), v.armAsync()), v) : null;
|
|
505
776
|
};
|
|
506
|
-
queueMicrotask(() =>
|
|
507
|
-
let
|
|
777
|
+
queueMicrotask(() => y());
|
|
778
|
+
let b = {
|
|
508
779
|
get backend() {
|
|
509
|
-
return
|
|
780
|
+
return y()?.backend ?? "webgpu";
|
|
510
781
|
},
|
|
511
|
-
pause: () =>
|
|
512
|
-
resume: () =>
|
|
513
|
-
wake: () =>
|
|
514
|
-
renderAt: (e) =>
|
|
782
|
+
pause: () => y()?.suspend("manual"),
|
|
783
|
+
resume: () => y()?.resume("manual"),
|
|
784
|
+
wake: () => y()?.wake(),
|
|
785
|
+
renderAt: (e) => y()?.renderAt(e),
|
|
515
786
|
get reducedMotion() {
|
|
516
|
-
return
|
|
787
|
+
return v?.reducedMotion ?? !1;
|
|
517
788
|
},
|
|
518
|
-
dispose: () =>
|
|
789
|
+
dispose: () => {
|
|
790
|
+
let t = e.value;
|
|
791
|
+
t && h(t), o.dispose(), v?.dispose();
|
|
792
|
+
}
|
|
519
793
|
};
|
|
520
|
-
return
|
|
794
|
+
return m(() => b.dispose()), b;
|
|
521
795
|
}
|
|
522
796
|
//#endregion
|
|
523
797
|
//#region src/components/custom/concentric/Concentric.vue
|
|
524
|
-
var
|
|
798
|
+
var ee = /* @__PURE__ */ e(/* @__PURE__ */ f({
|
|
525
799
|
__name: "Concentric",
|
|
526
800
|
props: {
|
|
527
|
-
config: { default: () =>
|
|
801
|
+
config: { default: () => I },
|
|
528
802
|
paused: {
|
|
529
803
|
type: Boolean,
|
|
530
804
|
default: !1
|
|
@@ -532,12 +806,12 @@ var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
|
|
|
532
806
|
},
|
|
533
807
|
emits: ["update:paused"],
|
|
534
808
|
setup(e, { expose: t }) {
|
|
535
|
-
let n =
|
|
809
|
+
let n = g("canvasRef"), r = $(n, {
|
|
536
810
|
config: e.config,
|
|
537
811
|
getPalette: () => e.config.palette
|
|
538
812
|
});
|
|
539
|
-
|
|
540
|
-
let i =
|
|
813
|
+
_(() => e.paused, (e) => e ? r.pause() : r.resume(), { immediate: !0 });
|
|
814
|
+
let i = l(() => {
|
|
541
815
|
let t = e.config.background;
|
|
542
816
|
if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
|
|
543
817
|
});
|
|
@@ -546,10 +820,10 @@ var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
|
|
|
546
820
|
resume: r.resume,
|
|
547
821
|
wake: r.wake,
|
|
548
822
|
renderAt: r.renderAt
|
|
549
|
-
}), (e, t) => (
|
|
823
|
+
}), (e, t) => (h(), u("div", {
|
|
550
824
|
class: "concentric-wrapper",
|
|
551
|
-
style:
|
|
552
|
-
}, [
|
|
825
|
+
style: p(i.value ? { background: i.value } : void 0)
|
|
826
|
+
}, [d("canvas", {
|
|
553
827
|
ref_key: "canvasRef",
|
|
554
828
|
ref: n,
|
|
555
829
|
class: "concentric-canvas",
|
|
@@ -559,4 +833,4 @@ var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
|
|
|
559
833
|
}
|
|
560
834
|
}), [["__scopeId", "data-v-f8bbc88a"]]);
|
|
561
835
|
//#endregion
|
|
562
|
-
export {
|
|
836
|
+
export { ee as Concentric, F as DEFAULT_CENTERS, I as DEFAULT_CONCENTRIC_CONFIG, P as DEFAULT_RING_COMPONENTS, k as MAX_CENTERS, O as MAX_RINGS, A as MAX_RING_STOPS, v as RING_GRAVITY, M as WARM_IDENTITY_PALETTE, N as buildDefaultRingComponents, D as buildRingFamily, S as ellipsoidalGradMag, x as ellipsoidalRadius, b as ellipsoidalRadiusRot, j as renderModeToInt, w as ringIsolineInk, C as sampleRingField, $ as useConcentric };
|