@mkbabb/glass-ui 4.0.1 → 4.2.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-DlVP2evz.js} +72 -53
- package/dist/{CommandShortcut-DvZNQ_HF.js → CommandShortcut-By-VQcLO.js} +25 -14
- package/dist/{ConfiguratorRow-BR4l-ixA.js → ConfiguratorRow-YMXdINHx.js} +14 -14
- package/dist/ContextMenuContent-CMWn6huB.js +90 -0
- package/dist/{ContextMenuSubContent-xol4sD2q.js → ContextMenuSubContent-DvwWCUc0.js} +16 -16
- package/dist/{DataTable-CuKwF7wr.js → DataTable-C4tG3eIJ.js} +4 -4
- package/dist/DialogContent-D8U9ZfWS.js +121 -0
- package/dist/DialogFooter-DoLy0ewI.js +80 -0
- package/dist/DialogScrollContent-BMekN7gq.js +93 -0
- package/dist/{FadingScroll-DI6hQhT9.js → FadingScroll-P8B30rAD.js} +1 -1
- package/dist/HoverCardContent-DAmGYglo.js +88 -0
- package/dist/{HoverPopover-CbqbNwgU.js → HoverPopover-DYpBOzzF.js} +1 -1
- package/dist/{IconChip-BTD-nay5.js → IconChip-CQa7XZYc.js} +7 -5
- package/dist/{IconTooltip-Bl8gFZ8d.js → IconTooltip-_df8M3xm.js} +1 -1
- package/dist/Input-CyU4_hIC.js +57 -0
- package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
- package/dist/{Notification-VUwexFUf.js → Notification-BlSPJhtZ.js} +4 -4
- package/dist/NumberFieldContent-Z3VxGu_6.js +140 -0
- package/dist/PagerDots-CYlqVFd4.js +196 -0
- package/dist/PaperBackdrop-DYWgrnh8.js +42 -0
- package/dist/{PopoverContent-DL7E6vJP.js → PopoverContent-BuKyHZSz.js} +2 -2
- package/dist/{Progress-DctG61iZ.js → Progress-C9SsdwIZ.js} +1 -1
- package/dist/{ScrollingText-yOpBzFYq.js → ScrollingText-DY3W1Jfh.js} +2 -2
- package/dist/SelectScrollDownButton-3mFHX_R-.js +260 -0
- package/dist/{SelectSeparator-DXswVdRz.js → SelectSeparator-CNRGG7Ew.js} +1 -1
- package/dist/Separator-Cf9-JFgi.js +44 -0
- package/dist/Switch-uf-UKPA2.js +49 -0
- package/dist/{Toaster-Bw4xR8xV.js → Toaster-ozrsR4mP.js} +2 -2
- package/dist/{ToggleGroupItem-pEM9vIhs.js → ToggleGroupItem-BpzaVzNm.js} +6 -6
- package/dist/TooltipProvider-QQVM_80r.js +109 -0
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +16 -32
- package/dist/api/types-extra.d.ts +33 -0
- package/dist/api.js +2 -2
- package/dist/aurora.js +629 -269
- package/dist/badge-Bt14yURi.js +72 -0
- package/dist/badge.js +1 -1
- package/dist/border-progress.js +49 -57
- package/dist/button-D1W9PrzI.js +130 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -3
- package/dist/card.js +1 -1
- package/dist/carousel.js +235 -106
- package/dist/chipVariants-BJQ0I2kB.js +18 -0
- package/dist/collapsible.js +1 -1
- package/dist/color-B9jZdhJX.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/glSetup.d.ts +1 -1
- package/dist/components/custom/aurora/composables/runtime.d.ts +12 -0
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +12 -3
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +8 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +47 -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/aurora/index.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/Concentric.vue.d.ts +15 -12
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +12 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -3
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
- package/dist/components/custom/concentric/constants.d.ts +69 -24
- 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/configurator/Configurator.vue.d.ts +23 -2
- package/dist/components/custom/configurator/index.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/DockDropdownTrigger.vue.d.ts +4 -3
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +22 -0
- package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
- package/dist/components/custom/dock/DockStack.vue.d.ts +78 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +21 -3
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +78 -67
- package/dist/components/custom/dock/composables/index.d.ts +3 -0
- package/dist/components/custom/dock/composables/railProjection.d.ts +45 -0
- package/dist/components/custom/dock/composables/useDockContextSilhouette.d.ts +192 -0
- package/dist/components/custom/dock/composables/useDockFission.d.ts +158 -0
- package/dist/components/custom/dock/composables/useDockItemDrag.d.ts +18 -0
- package/dist/components/custom/dock/composables/useDockSearch.d.ts +85 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +49 -0
- package/dist/components/custom/dock/constants.d.ts +32 -17
- package/dist/components/custom/dock/index.d.ts +8 -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 +69 -6
- package/dist/components/custom/dot-flow-field/composables/flowGLProgram.d.ts +8 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupGL.d.ts +9 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupGLFlow.d.ts +12 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupWGPU.d.ts +7 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +50 -9
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +6 -5
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +23 -9
- package/dist/components/custom/dot-flow-field/constants.d.ts +92 -20
- 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 +31 -18
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -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 +61 -0
- package/dist/components/custom/dot-matrix/composables/useDotMatrix.d.ts +34 -0
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +34 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +72 -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 +44 -47
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +24 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +31 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +56 -0
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +61 -37
- package/dist/components/custom/fourier-field/constants.d.ts +114 -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/composables/easing.d.ts +1 -0
- package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +1 -0
- package/dist/components/custom/goo-blob/constants.d.ts +26 -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 +86 -1
- 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 +79 -0
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +45 -0
- package/dist/components/custom/goo-dot-matrix/composables/useGooDotMatrix.d.ts +31 -0
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +115 -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 +13 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +4 -0
- package/dist/components/custom/goo-filter/GooFilter.vue.d.ts +22 -0
- package/dist/components/custom/goo-filter/index.d.ts +1 -0
- package/dist/components/custom/handmark/brush.d.ts +17 -17
- package/dist/components/custom/handmark/constants.d.ts +28 -8
- package/dist/components/custom/handmark/geometry.d.ts +34 -1
- package/dist/components/custom/handmark/index.d.ts +1 -1
- package/dist/components/custom/icon-chip/types.d.ts +10 -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-backdrop/PaperBackdrop.vue.d.ts +18 -0
- package/dist/components/custom/paper-grid/PaperGrid.vue.d.ts +42 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +105 -0
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +18 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +21 -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 +95 -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/chipVariants.d.ts +39 -0
- package/dist/components/custom/selectable-chip/index.d.ts +2 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +15 -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 +28 -2
- package/dist/components/custom/timeline/ScrubberTimeline.vue.d.ts +16 -0
- package/dist/components/custom/timeline/geometry.d.ts +0 -8
- package/dist/components/custom/toggle-chip/index.d.ts +15 -4
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +32 -17
- package/dist/components/custom/watercolor-dot/useWatercolorBlob.d.ts +10 -5
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/useControlSize.d.ts +46 -0
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +17 -3
- package/dist/components/ui/badge/Badge.vue.d.ts +14 -0
- package/dist/components/ui/badge/index.d.ts +1 -0
- package/dist/components/ui/button/Button.vue.d.ts +1 -0
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +46 -1
- package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
- 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/dialog/DialogContent.vue.d.ts +9 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +33 -14
- package/dist/components/ui/drawer/constants.d.ts +8 -6
- package/dist/components/ui/drawer/index.d.ts +12 -2
- 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 +12 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +9 -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/dom/index.d.ts +1 -0
- package/dist/composables/dom/useDragVelocity.d.ts +46 -0
- package/dist/composables/glass/useVizChoreography.d.ts +123 -0
- package/dist/composables/glass/wave/index.d.ts +4 -0
- package/dist/composables/glass/wave/waveField.d.ts +115 -0
- package/dist/composables/glass/wave/waveField.glsl.d.ts +1 -0
- package/dist/composables/glass/wave/waveField.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +105 -2
- package/dist/composables/glass/webgl/shaders/flow.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
- package/dist/composables/glass/webgpu/index.d.ts +2 -1
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +65 -7
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +50 -2
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
- package/dist/composables/motion/core/index.d.ts +7 -0
- package/dist/composables/motion/core/useHaptic.d.ts +48 -0
- package/dist/composables/motion/core/writeVelocityWeight.d.ts +31 -0
- package/dist/composables/motion/index.d.ts +2 -0
- package/dist/composables/motion/scrollReader.d.ts +25 -0
- package/dist/composables/motion/springPresets.d.ts +19 -1
- package/dist/composables/motion/suite.d.ts +2 -2
- package/dist/composables/motion/useBloomUp.d.ts +97 -0
- package/dist/composables/motion/useCelebrationBurst.d.ts +50 -0
- package/dist/composables/motion/useCharStagger.d.ts +44 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +29 -22
- package/dist/composables/motion/useGooMorph.d.ts +72 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +18 -0
- package/dist/composables/motion/useLiquidMorph.d.ts +108 -0
- package/dist/composables/motion/useLiquidPress.d.ts +12 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +7 -4
- package/dist/composables/motion/useMorphField.d.ts +157 -0
- package/dist/composables/motion/useScrollChrome.d.ts +58 -0
- package/dist/composables/motion/useScrollPin.d.ts +49 -0
- package/dist/composables/motion/useScrollScene.d.ts +67 -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 +552 -309
- 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 +2 -2
- package/dist/createCanvasLifecycle-CuCrGRfq.js +173 -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 +1320 -631
- package/dist/dockContext-gFVS2gMg.js +18 -0
- package/dist/dom.js +7 -6
- package/dist/dot-flow-field.js +1268 -387
- package/dist/dot-matrix.d.ts +1 -0
- package/dist/dot-matrix.js +774 -0
- package/dist/dotMatrixField-CRO0ZFk4.js +48 -0
- package/dist/drawer.js +106 -96
- package/dist/{dropdown-menu-CofSZuk8.js → dropdown-menu-CCfcCQ68.js} +83 -79
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.js +188 -176
- package/dist/expandable-container.js +43 -21
- package/dist/fading-scroll.js +1 -1
- package/dist/flow.glsl-DqEGRpl4.js +4 -0
- package/dist/forms.js +64 -62
- package/dist/fourier-field.js +1069 -178
- 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 +164 -119
- package/dist/goo-blob.js +175 -1230
- package/dist/goo-dot-matrix.d.ts +1 -0
- package/dist/goo-dot-matrix.js +811 -0
- package/dist/handmark.js +137 -94
- 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 +5 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +70 -60
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +12 -3
- package/dist/motion-core.js +59 -34
- package/dist/motion-curves.js +30 -14
- package/dist/motion.js +231 -96
- 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 +761 -0
- package/dist/paperGrid-CXCSMbZ1.js +191 -0
- package/dist/popover.js +1 -1
- package/dist/{presets-BW2b-fr1.js → presets-QvYgnFIZ.js} +14 -13
- package/dist/{procedural-color.glsl-CIFsJhwI.js → procedural-color.wgsl-C1Y5PkM6.js} +2 -2
- package/dist/progress.js +1 -1
- package/dist/pulse.js +2 -2
- package/dist/reactive.js +2 -2
- package/dist/{useCanvas2D-B8w_E3Rr.js → resolveCanvasColor-DsSJk06I.js} +16 -6
- package/dist/scrollReader-rc3Ns_NM.js +42 -0
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +162 -306
- package/dist/select.js +3 -3
- package/dist/selectable-chip.d.ts +1 -0
- package/dist/selectable-chip.js +48 -0
- package/dist/separator.js +1 -1
- package/dist/{sheet-tZMg0E0w.js → sheet-DUCIoOe0.js} +4 -4
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +216 -114
- package/dist/slider-CcICPe3u.js +149 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spectrum-walk-cBNSx_zm.js +33 -0
- package/dist/springPresets-DfoQ6XRY.js +64 -0
- package/dist/stacked-icons.js +54 -39
- package/dist/styles/animations.css +13 -3
- package/dist/styles/cards.css +271 -2
- package/dist/styles/completion-seal.css +131 -0
- package/dist/styles/components.css +1 -4
- package/dist/styles/configurator.css +221 -1
- package/dist/styles/critical-partition.mjs +66 -11
- package/dist/styles/deferred.css +4 -0
- package/dist/styles/dock/adaptive-legibility.css +119 -0
- package/dist/styles/dock/cta-seat.css +87 -0
- package/dist/styles/dock/density.css +167 -6
- package/dist/styles/dock/fission-bridge.css +552 -0
- package/dist/styles/dock/layers.css +90 -78
- package/dist/styles/dock/morph-bridge.css +67 -18
- package/dist/styles/dock/morph.css +57 -118
- package/dist/styles/dock/overflow.css +12 -0
- package/dist/styles/dock/search.css +68 -0
- package/dist/styles/dock/shape.css +250 -0
- package/dist/styles/dock/shell.css +24 -8
- package/dist/styles/dock/stack-rail.css +352 -0
- package/dist/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/dist/styles/dock-controls/icon-button.css +46 -0
- package/dist/styles/dock-controls/triggers.css +23 -1
- package/dist/styles/dock-controls.css +18 -0
- package/dist/styles/dock.css +27 -2
- package/dist/styles/drawer.css +166 -0
- package/dist/styles/glass/accent-tone.css +66 -0
- package/dist/styles/glass/control-surfaces.css +167 -0
- package/dist/styles/glass/glass-atom.css +244 -0
- package/dist/styles/glass/glass-capsule.css +143 -0
- package/dist/styles/glass/glass-chip.css +215 -0
- package/dist/styles/glass/ladder.css +67 -17
- package/dist/styles/glass/liquid-enter.css +252 -0
- package/dist/styles/glass/liquid-morph.css +850 -0
- package/dist/styles/glass/material.css +70 -1
- package/dist/styles/glass/reveal.css +22 -2
- package/dist/styles/glass/rim.css +31 -9
- package/dist/styles/glass/surfaces.css +81 -150
- package/dist/styles/glass.css +21 -0
- package/dist/styles/icon-chip.css +45 -0
- package/dist/styles/index.css +26 -0
- package/dist/styles/jubilance.css +65 -0
- package/dist/styles/motion/morph-field.css +229 -0
- package/dist/styles/paper.css +230 -14
- package/dist/styles/scroll-choreography.css +135 -78
- package/dist/styles/scroll-chrome.css +123 -0
- package/dist/styles/scroll-driven.css +38 -0
- package/dist/styles/segmented-tabs.css +110 -40
- package/dist/styles/select.css +151 -0
- package/dist/styles/theme/bridges.css +22 -0
- package/dist/styles/theme/radius.css +18 -1
- package/dist/styles/tokens/color-radius.css +14 -4
- package/dist/styles/tokens/dark-arm.css +94 -12
- package/dist/styles/tokens/glass-deep.css +33 -4
- package/dist/styles/tokens/glass-fx.css +122 -1
- package/dist/styles/tokens/glass.css +226 -34
- package/dist/styles/tokens/light-dark.css +3 -3
- package/dist/styles/tokens/offsets.css +27 -0
- package/dist/styles/tokens/property-regs.css +277 -0
- package/dist/styles/tokens/scale-paper.css +86 -30
- package/dist/styles/tokens/scheme-motion.css +106 -133
- package/dist/styles/tokens/scheme-spring.css +239 -0
- package/dist/styles/tokens/scroll-tokens.css +15 -15
- package/dist/styles/tokens/shadow.css +73 -13
- package/dist/styles/tokens/sizing-config.css +110 -0
- package/dist/styles/tokens/sizing.css +55 -104
- package/dist/styles/tokens.css +14 -2
- 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 +84 -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 +199 -182
- package/dist/timeline.js +241 -206
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +14 -41
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +2 -2
- package/dist/uniformBridgeWGPU-BCse1SHU.js +1268 -0
- package/dist/{useAnimatedNumber-BfUq2bUM.js → useAnimatedNumber-BntskVdQ.js} +1 -1
- package/dist/{useConfiguratorState-DNlOh6c8.js → useConfiguratorState-22BcULzF.js} +41 -38
- package/dist/useControlSize-DAZ062x7.js +9 -0
- package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
- package/dist/{useDragMorph-DgxnsVJz.js → useDragMorph-DGLSewwB.js} +4 -4
- package/dist/useDragVelocity-CjcfX3dA.js +57 -0
- package/dist/useFuzzySearch-0fTYOhS4.js +177 -0
- package/dist/useGooMorph-Cs13NgYL.js +104 -0
- package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
- package/dist/useHaptic-CPz5BT9I.js +134 -0
- package/dist/{useLiquidFlex-mZPMiNXh.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
- package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
- package/dist/useMorphField-ogBM7ubT.js +141 -0
- package/dist/usePointerVelocityField-BrkqZFhj.js +91 -0
- package/dist/useScrollChrome-JuImi1DM.js +258 -0
- package/dist/{useSpringMount-q1amq1SJ.js → useSpringMount-DFxtzmkR.js} +1 -1
- package/dist/useSpringPress-VM9RgVq3.js +36 -0
- package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
- package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
- 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 +107 -74
- package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
- package/package.json +140 -9
- package/src/styles/animations.css +13 -3
- package/src/styles/cards.css +271 -2
- package/src/styles/completion-seal.css +131 -0
- package/src/styles/configurator.css +221 -1
- package/src/styles/critical-partition.mjs +66 -11
- package/src/styles/dock/adaptive-legibility.css +119 -0
- package/src/styles/dock/cta-seat.css +87 -0
- package/src/styles/dock/density.css +167 -6
- package/src/styles/dock/fission-bridge.css +552 -0
- package/src/styles/dock/layers.css +90 -78
- package/src/styles/dock/morph-bridge.css +67 -18
- package/src/styles/dock/morph.css +57 -118
- package/src/styles/dock/overflow.css +12 -0
- package/src/styles/dock/search.css +68 -0
- package/src/styles/dock/shape.css +250 -0
- package/src/styles/dock/shell.css +24 -8
- package/src/styles/dock/stack-rail.css +352 -0
- package/src/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/src/styles/dock-controls/icon-button.css +46 -0
- package/src/styles/dock-controls/triggers.css +23 -1
- package/src/styles/dock-controls.css +18 -0
- package/src/styles/dock.css +27 -2
- package/src/styles/drawer.css +164 -0
- package/src/styles/glass/accent-tone.css +66 -0
- package/src/styles/glass/control-surfaces.css +167 -0
- package/src/styles/glass/glass-atom.css +244 -0
- package/src/styles/glass/glass-capsule.css +143 -0
- package/src/styles/glass/glass-chip.css +215 -0
- package/src/styles/glass/ladder.css +67 -17
- package/src/styles/glass/liquid-enter.css +252 -0
- package/src/styles/glass/liquid-morph.css +850 -0
- package/src/styles/glass/material.css +70 -1
- package/src/styles/glass/reveal.css +22 -2
- package/src/styles/glass/rim.css +31 -9
- package/src/styles/glass/surfaces.css +81 -150
- package/src/styles/glass.css +21 -0
- package/src/styles/icon-chip.css +45 -0
- package/src/styles/index.css +26 -0
- package/src/styles/jubilance.css +65 -0
- package/src/styles/motion/morph-field.css +229 -0
- package/src/styles/paper.css +230 -14
- package/src/styles/scroll-choreography.css +135 -78
- package/src/styles/scroll-chrome.css +123 -0
- package/src/styles/scroll-driven.css +38 -0
- package/src/styles/segmented-tabs.css +110 -36
- package/src/styles/select.css +151 -0
- package/src/styles/theme/bridges.css +22 -0
- package/src/styles/theme/radius.css +18 -1
- package/src/styles/tokens/color-radius.css +14 -4
- package/src/styles/tokens/dark-arm.css +94 -12
- package/src/styles/tokens/glass-deep.css +33 -4
- package/src/styles/tokens/glass-fx.css +122 -1
- package/src/styles/tokens/glass.css +226 -34
- package/src/styles/tokens/light-dark.css +3 -3
- package/src/styles/tokens/offsets.css +27 -0
- package/src/styles/tokens/property-regs.css +277 -0
- package/src/styles/tokens/scale-paper.css +86 -30
- package/src/styles/tokens/scheme-motion.css +106 -133
- package/src/styles/tokens/scheme-spring.css +239 -0
- package/src/styles/tokens/scroll-tokens.css +15 -15
- package/src/styles/tokens/shadow.css +73 -13
- package/src/styles/tokens/sizing-config.css +110 -0
- package/src/styles/tokens/sizing.css +55 -104
- package/src/styles/tokens.css +14 -2
- 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 +84 -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/DialogContent-DcKK8k9i.js +0 -103
- 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/PaperBackdrop-Vf3tlpvd.js +0 -31
- package/dist/SelectScrollDownButton-CrA8F0iV.js +0 -252
- package/dist/Separator-pKF0oA4M.js +0 -37
- package/dist/Switch-CwYNf8bo.js +0 -47
- package/dist/TooltipProvider-rzvnXz60.js +0 -104
- package/dist/badge-D9XWW4GT.js +0 -53
- package/dist/button-DYCUa-tH.js +0 -126
- package/dist/color-DweYl7pE.js +0 -86
- package/dist/components/custom/concentric/composables/ringField.d.ts +0 -44
- 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/dockContext-BNfyPLe9.js +0 -17
- package/dist/procedural-color.wgsl-CToRHugY.js +0 -224
- package/dist/resolveCanvasColor-CUyHr5Uu.js +0 -11
- package/dist/slider-DVb4HXU-.js +0 -142
- package/dist/springPresets-CFQGQfdl.js +0 -40
- package/dist/styles/dock/rail-extend.css +0 -397
- package/dist/useLiquidPress-kfb4KX79.js +0 -39
- 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/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
- /package/dist/{InstrumentChassis-Bx0F_q5g.js → InstrumentChassis-UUJX0-mW.js} +0 -0
- /package/dist/{Label-C2ejNWeC.js → Label-B_HPqi_q.js} +0 -0
- /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-DfAf7o15.js} +0 -0
- /package/dist/{SelectGroup-DwwjicPY.js → SelectGroup-Dcczq44n.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
- /package/dist/{compile-CQEFRTmx.js → compile-INR_tPk_.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants-BWj7DkMn.js} +0 -0
- /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
- /package/dist/{math-BINYmg5z.js → math-5RcIgCB4.js} +0 -0
- /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
- /package/dist/{prng-Za0Rmgag.js → prng-B5tIXTtj.js} +0 -0
- /package/dist/{useGlobalDark-C28t0VWJ.js → useGlobalDark-B4HO9LXG.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
- /package/dist/{useInterval-CvK1mL92.js → useInterval-BVUI-sez.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BEut54Tk.js} +0 -0
- /package/dist/{useResizeObserver-Bpoi7tRE.js → useResizeObserver-DdEn3v2f.js} +0 -0
- /package/dist/{useResolveTokenColor-vAylyR0x.js → useResolveTokenColor-ChOnCckA.js} +0 -0
- /package/dist/{useScrollProgress-D7bYU2RK.js → useScrollProgress-A0M6qRl7.js} +0 -0
- /package/dist/{useSortable-DHjtZSEd.js → useSortable-DQV_UNDw.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-Bma3UlKA.js} +0 -0
- /package/dist/{useTimer-BHJOKr35.js → useTimer-BBLGPXR8.js} +0 -0
- /package/dist/{useUserInvalidAria-y5namzeE.js → useUserInvalidAria-EmmwWPOl.js} +0 -0
- /package/dist/{useViewportReady-anbac3m6.js → useViewportReady-C9pYnn7K.js} +0 -0
- /package/dist/{vReveal-Czsb7zQC.js → vReveal-CT1KtwZA.js} +0 -0
- /package/dist/{vSpecular-CQFmLNzA.js → vSpecular-EX7loENl.js} +0 -0
package/dist/fourier-field.js
CHANGED
|
@@ -1,180 +1,995 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-gLzyemvl.js";
|
|
2
|
+
import { n as t } from "./useResolveTokenColor-ChOnCckA.js";
|
|
3
|
+
import { t as n } from "./usePointerVelocityField-BrkqZFhj.js";
|
|
4
|
+
import { n as r, o as i, r as a, s as o } from "./procedural-color.wgsl-C1Y5PkM6.js";
|
|
5
|
+
import { a as s, t as c } from "./useGpuSubstrate-Ceet70xq.js";
|
|
6
|
+
import { c as l, t as u } from "./color-B9jZdhJX.js";
|
|
7
|
+
import { t as d } from "./useGlobalDark-B4HO9LXG.js";
|
|
8
|
+
import { n as f, t as p } from "./prng-B5tIXTtj.js";
|
|
9
|
+
import { a as m, i as h, n as g, r as _, t as v } from "./math-5RcIgCB4.js";
|
|
10
|
+
import { computed as y, createElementBlock as b, createElementVNode as x, defineComponent as S, normalizeClass as C, onMounted as w, onScopeDispose as T, openBlock as E, shallowRef as D, useTemplateRef as O, watch as k } from "vue";
|
|
11
|
+
//#region src/components/custom/fourier-field/constants.ts
|
|
12
|
+
var A = 64, j = 384, M = .15, N = .12, P = .55, F = .35, I = [{
|
|
13
|
+
L: .62,
|
|
14
|
+
C: .19,
|
|
15
|
+
h: 34
|
|
16
|
+
}, {
|
|
17
|
+
L: .86,
|
|
18
|
+
C: .06,
|
|
19
|
+
h: 70
|
|
20
|
+
}], L = {
|
|
21
|
+
source: "elliptic",
|
|
22
|
+
harmonics: 6,
|
|
23
|
+
showEpicycles: !0,
|
|
24
|
+
epicycleArms: 6,
|
|
25
|
+
rainbowChain: !0,
|
|
26
|
+
trailArc: .43,
|
|
27
|
+
trailWidth: 3,
|
|
28
|
+
intensity: 1,
|
|
29
|
+
harmonicScale: .24,
|
|
30
|
+
speed: 1,
|
|
31
|
+
palette: I,
|
|
32
|
+
respectReducedMotion: !0,
|
|
33
|
+
interactive: !0,
|
|
34
|
+
squashGain: P,
|
|
35
|
+
celGain: F
|
|
36
|
+
}, R = "\nconst MAX_PHASORS: i32 = 64;\nconst TAU: f32 = 6.283185307179586;\n\nstruct Phasor {\n // (re, im, index, _pad)\n data: vec4<f32>,\n};\n\n// ── Compute uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──\nstruct ComputeUniforms {\n // c0: (headT, trailArc, _pad, _pad)\n c0: vec4<f32>,\n // ints: (harmonicN, epicycleArmN, sampleCount, phasorCount)\n ints: vec4<i32>,\n};\n\n@group(0) @binding(0) var<uniform> u: ComputeUniforms;\n@group(0) @binding(1) var<storage, read> phasors: array<Phasor>;\n// curveSamples[i] = (x, y, age, _pad)\n@group(0) @binding(2) var<storage, read_write> curveSamples: array<vec4<f32>>;\n// chainTips[k] = (x, y, _pad, _pad) — the running tip after stacking phasor k\n@group(0) @binding(3) var<storage, read_write> chainTips: array<vec4<f32>>;\n\n// The PARTIAL-SUM curve point at parameter t over the first n phasors — the WGSL\n// transcription of math.ts:78-95 (partialSumAt). EXACTLY:\n// c += vec2(re·cos − im·sin, re·sin + im·cos) with angle = TAU·index·t.\nfn partialSumAt(t: f32, n: i32) -> vec2<f32> {\n var c = vec2<f32>(0.0, 0.0);\n let phasorCount = u.ints.w;\n let lim = min(n, phasorCount);\n for (var i = 0; i < MAX_PHASORS; i = i + 1) {\n if (i >= lim) { break; }\n let p = phasors[i].data;\n let re = p.x;\n let im = p.y;\n let index = p.z;\n let angle = TAU * index * t;\n let cs = cos(angle);\n let sn = sin(angle);\n c = c + vec2<f32>(re * cs - im * sn, re * sn + im * cs);\n }\n return c;\n}\n\n// The epicycle chain tip after stacking the first k phasors at head_t — the WGSL\n// transcription of math.ts:41-60 (positionsAt, read at the running tip). The running tip\n// after phasor (k−1) is exactly the partial sum over the first k terms.\nfn epicycleChainTip(t: f32, k: i32) -> vec2<f32> {\n return partialSumAt(t, k);\n}\n\n@compute @workgroup_size(64)\nfn cs_main(@builtin(global_invocation_id) gid: vec3<u32>) {\n let i = i32(gid.x);\n let headT = u.c0.x;\n let trailArc = u.c0.y;\n let harmonicN = u.ints.x;\n let armN = u.ints.y;\n let sampleCount = u.ints.z;\n\n // ── The comet body samples ──\n if (i < sampleCount) {\n // age: 0 at the oldest tail (i = sampleCount−1), 1 at the head (i = 0).\n let denom = max(f32(sampleCount - 1), 1.0);\n let frac = f32(i) / denom; // 0 = head, 1 = tail\n let age = 1.0 - frac; // 1 = head, 0 = tail\n // sample back along the period from the head by trailArc.\n var t = headT - trailArc * frac;\n t = t - floor(t); // fract → [0,1)\n let pt = partialSumAt(t, harmonicN);\n curveSamples[i] = vec4<f32>(pt.x, pt.y, age, 0.0);\n }\n\n // ── The epicycle chain tips (k = 0..armN, capped to harmonicN) ──\n // chainTips[0] is the origin; chainTips[k] is the tip after phasor (k−1).\n let armLim = min(armN, harmonicN);\n if (i <= armLim && i <= MAX_PHASORS) {\n let tip = epicycleChainTip(headT, i);\n chainTips[i] = vec4<f32>(tip.x, tip.y, 0.0, 0.0);\n }\n}\n", z = `
|
|
37
|
+
const PI: f32 = 3.141592653589793;
|
|
38
|
+
const TAU: f32 = 6.283185307179586;
|
|
39
|
+
const MAX_CURVE_SAMPLES: i32 = 384;
|
|
40
|
+
const MAX_PHASORS: i32 = 64;
|
|
41
|
+
const MAX_FOURIER_STOPS: i32 = 4;
|
|
42
|
+
// BD.W-FOURIER-LOOM §2b — the degenerate-tangent guard (must equal FOURIER_TANGENT_EPS in
|
|
43
|
+
// constants.ts + the GL CPU bead path so a cusp resolves IDENTICALLY across both engines).
|
|
44
|
+
const TANGENT_EPS: f32 = 1e-4;
|
|
45
|
+
// The speed yardstick: the head speed (model units between curveSamples[0] and [1]) is
|
|
46
|
+
// normalized against this many trail half-widths so ŝ ∈ [0,1] is scale-free + parity-safe.
|
|
47
|
+
const SPEED_REF_HALFWIDTHS: f32 = 6.0;
|
|
48
|
+
|
|
49
|
+
// ── Render uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
|
|
50
|
+
struct RenderUniforms {
|
|
51
|
+
// r0: (centerX, centerY, scale, aspect) — model→clip fit transform
|
|
52
|
+
r0: vec4<f32>,
|
|
53
|
+
// r1: (trailWidth, peakAlpha, headGlowAlpha, trailFadeExp)
|
|
54
|
+
r1: vec4<f32>,
|
|
55
|
+
// r2: (trailFloor, intensity, showEpicycles, rainbowChain)
|
|
56
|
+
r2: vec4<f32>,
|
|
57
|
+
// r3: (squashGain, celGain, _pad, _pad) — FOURIER-LOOM §2b/§3b
|
|
58
|
+
r3: vec4<f32>,
|
|
59
|
+
// ints: (sampleCount, armCount, stopCount, _pad)
|
|
60
|
+
ints: vec4<i32>,
|
|
61
|
+
// palette stops: linear-sRGB rgb + _pad
|
|
62
|
+
palette: array<vec4<f32>, 4>,
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
|
|
65
|
+
@group(0) @binding(0) var<uniform> u: RenderUniforms;
|
|
66
|
+
// curveSamples[i] = (x, y, age, _pad) in MODEL space
|
|
67
|
+
@group(0) @binding(1) var<storage, read> curveSamples: array<vec4<f32>>;
|
|
68
|
+
// chainTips[k] = (x, y, _pad, _pad) in MODEL space
|
|
69
|
+
@group(0) @binding(2) var<storage, read> chainTips: array<vec4<f32>>;
|
|
70
|
+
|
|
71
|
+
${r}
|
|
72
|
+
${a}
|
|
73
|
+
|
|
74
|
+
// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
|
|
75
|
+
fn samplePaletteLin(t: f32) -> vec3<f32> {
|
|
76
|
+
let stopCount = u.ints.z;
|
|
77
|
+
if (stopCount <= 1) { return u.palette[0].rgb; }
|
|
78
|
+
let n = f32(stopCount);
|
|
79
|
+
let ft = clamp(t, 0.0, 1.0) * (n - 1.0);
|
|
80
|
+
let i0 = i32(floor(ft));
|
|
81
|
+
let i1 = min(i0 + 1, stopCount - 1);
|
|
82
|
+
let f = ft - f32(i0);
|
|
83
|
+
let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i0].rgb);
|
|
84
|
+
let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i1].rgb);
|
|
85
|
+
return oklabToLinearSrgb(mix(labA, labB, f));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// A warm-anchored chain hue sweep over the palette base — the rainbow chain register.
|
|
89
|
+
// Tilts the base hue by a tight warm-ward band so the chain stays colourful but warm.
|
|
90
|
+
fn chainColorLin(seg: f32, rainbow: bool) -> vec3<f32> {
|
|
91
|
+
let baseLin = u.palette[0].rgb;
|
|
92
|
+
if (!rainbow) { return baseLin; }
|
|
93
|
+
let lab = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * baseLin);
|
|
94
|
+
let lch = oklabToOklch(lab);
|
|
95
|
+
// warm-anchored: a touch cool at the root climbing warm toward the tips.
|
|
96
|
+
let hueShift = mix(-0.45, 1.15, clamp(seg, 0.0, 1.0)); // radians (~ -26°..+66°)
|
|
97
|
+
let h = lch.z + hueShift;
|
|
98
|
+
let lifted = vec3<f32>(0.66, max(lch.y, 0.14), h);
|
|
99
|
+
return oklabToLinearSrgb(oklchToOklab(lifted));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Distance from point p to segment ab (model space).
|
|
103
|
+
fn segDist(p: vec2<f32>, a: vec2<f32>, b: vec2<f32>) -> f32 {
|
|
104
|
+
let pa = p - a;
|
|
105
|
+
let ba = b - a;
|
|
106
|
+
let h = clamp(dot(pa, ba) / max(dot(ba, ba), 1e-8), 0.0, 1.0);
|
|
107
|
+
return length(pa - ba * h);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// BD.W-FOURIER-LOOM §2b — the head travel frame: the unit tangent T from curveSamples[0]
|
|
111
|
+
// (head) vs [1] (one step back) + the normalized speed ŝ ∈ [0,1]. The cusp guard returns
|
|
112
|
+
// the +x axis as the stable fallback when s ≤ TANGENT_EPS, identical to the GL CPU path.
|
|
113
|
+
struct HeadFrame { T: vec2<f32>, sHat: f32, };
|
|
114
|
+
fn headFrame(head: vec2<f32>, headBack: vec2<f32>, halfW: f32) -> HeadFrame {
|
|
115
|
+
let d = head - headBack;
|
|
116
|
+
let s = length(d);
|
|
117
|
+
var out: HeadFrame;
|
|
118
|
+
if (s <= TANGENT_EPS) {
|
|
119
|
+
out.T = vec2<f32>(1.0, 0.0);
|
|
120
|
+
out.sHat = 0.0;
|
|
121
|
+
return out;
|
|
122
|
+
}
|
|
123
|
+
out.T = d / s;
|
|
124
|
+
let refScale = max(halfW * SPEED_REF_HALFWIDTHS, 1e-6);
|
|
125
|
+
out.sHat = clamp(s / refScale, 0.0, 1.0);
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// The volume-preserving anisotropic head distance: project (p − head) onto T and T⊥, stretch
|
|
130
|
+
// the tangent extent by (1 + k·ŝ) and squeeze the normal extent by 1/(1 + k·ŝ), then length.
|
|
131
|
+
// k = 0 (or ŝ = 0) collapses to the round disc length(p − head) — byte-frozen at rest.
|
|
132
|
+
fn headAniso(p: vec2<f32>, head: vec2<f32>, fr: HeadFrame, k: f32) -> f32 {
|
|
133
|
+
let g = 1.0 + k * fr.sHat;
|
|
134
|
+
let n = vec2<f32>(-fr.T.y, fr.T.x);
|
|
135
|
+
let rel = p - head;
|
|
136
|
+
let along = dot(rel, fr.T) / g;
|
|
137
|
+
let across = dot(rel, n) * g;
|
|
138
|
+
return length(vec2<f32>(along, across));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
struct VSOut {
|
|
142
|
+
@builtin(position) pos: vec4<f32>,
|
|
143
|
+
@location(0) model: vec2<f32>, // model-space coordinate of this fragment
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
@vertex
|
|
147
|
+
fn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {
|
|
148
|
+
// Full-screen triangle (covers the viewport with 3 verts).
|
|
149
|
+
var p = array<vec2<f32>, 3>(
|
|
150
|
+
vec2<f32>(-1.0, -3.0), vec2<f32>(-1.0, 1.0), vec2<f32>(3.0, 1.0),
|
|
151
|
+
);
|
|
152
|
+
let clip = p[vi];
|
|
153
|
+
// Inverse of the model→clip fit: clip = (model − center)·scale, aspect-corrected x.
|
|
154
|
+
// → model = center + clip·(1/scale), x un-aspect-corrected.
|
|
155
|
+
let center = u.r0.xy;
|
|
156
|
+
let scale = max(u.r0.z, 1e-6);
|
|
157
|
+
let aspect = max(u.r0.w, 1e-4);
|
|
158
|
+
let model = center + vec2<f32>(clip.x * aspect, clip.y) / scale;
|
|
159
|
+
|
|
160
|
+
var out: VSOut;
|
|
161
|
+
out.pos = vec4<f32>(clip, 0.0, 1.0);
|
|
162
|
+
out.model = model;
|
|
163
|
+
return out;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@fragment
|
|
167
|
+
fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
|
|
168
|
+
let p = in.model;
|
|
169
|
+
// AA feather: one device pixel in model units (fwidth of the model coord).
|
|
170
|
+
let aa = max(fwidth(p.x) + fwidth(p.y), 1e-5) * 0.75;
|
|
171
|
+
|
|
172
|
+
let trailWidth = u.r1.x; // already in model units (packed CPU-side)
|
|
173
|
+
let peak = u.r1.y * u.r2.y; // peakAlpha · intensity
|
|
174
|
+
let headGlow = u.r1.z * u.r2.y;
|
|
175
|
+
let fadeExp = u.r1.w;
|
|
176
|
+
let trailFloor = u.r2.x;
|
|
177
|
+
let sampleCount = u.ints.x;
|
|
178
|
+
let armCount = u.ints.y;
|
|
179
|
+
let showEpicycles = u.r2.z > 0.5;
|
|
180
|
+
let rainbow = u.r2.w > 0.5;
|
|
181
|
+
let squashGain = u.r3.x; // FOURIER-LOOM §2b
|
|
182
|
+
let celGain = u.r3.y; // FOURIER-LOOM §3b
|
|
183
|
+
let halfW = trailWidth * 0.5;
|
|
184
|
+
|
|
185
|
+
// BD.W-FOURIER-LOOM §2b — the head travel frame (the SAME curveSamples[0]/[1] both engines
|
|
186
|
+
// read → parity by construction). The cel offset (§3b) rides −T (opposite travel).
|
|
187
|
+
var headFr: HeadFrame;
|
|
188
|
+
headFr.T = vec2<f32>(1.0, 0.0);
|
|
189
|
+
headFr.sHat = 0.0;
|
|
190
|
+
if (sampleCount >= 2) {
|
|
191
|
+
headFr = headFrame(curveSamples[0].xy, curveSamples[1].xy, halfW);
|
|
192
|
+
}
|
|
193
|
+
let celOff = -headFr.T * halfW * 1.4; // the ink lags behind the travel
|
|
194
|
+
|
|
195
|
+
var accum = vec4<f32>(0.0); // premultiplied accumulation
|
|
196
|
+
|
|
197
|
+
// ── §3b — the cartoon CEL-SHADOW: a darker offset copy of the chain + rope, opposite
|
|
198
|
+
// travel, painted FIRST (it sits UNDER the lit chain). PRM-static (the frozen-T travel
|
|
199
|
+
// frame is a fixed offset, no live sweep). celGain = 0 → no pass (byte-frozen). ──
|
|
200
|
+
if (celGain > 0.001) {
|
|
201
|
+
let ink = vec3<f32>(0.0); // pure ink — the technicolor 2-tone shadow
|
|
202
|
+
let celA = clamp(celGain, 0.0, 1.0);
|
|
203
|
+
// the rope cel (one offset distance-to-curve band).
|
|
204
|
+
for (var i = 0; i < MAX_CURVE_SAMPLES; i = i + 1) {
|
|
205
|
+
if (i >= sampleCount - 1) { break; }
|
|
206
|
+
let sa = curveSamples[i].xy + celOff;
|
|
207
|
+
let sb = curveSamples[i + 1].xy + celOff;
|
|
208
|
+
let d = segDist(p, sa, sb);
|
|
209
|
+
let cover = 1.0 - smoothstep(halfW, halfW + aa, d);
|
|
210
|
+
if (cover < 0.002) { continue; }
|
|
211
|
+
let m = cover * celA * peak;
|
|
212
|
+
accum = vec4<f32>(ink * m, m) + accum * (1.0 - m);
|
|
213
|
+
}
|
|
214
|
+
// the chain cel (arms only — the bold scaffold ink).
|
|
215
|
+
if (showEpicycles && armCount >= 1) {
|
|
216
|
+
for (var k = 0; k < MAX_PHASORS; k = k + 1) {
|
|
217
|
+
if (k >= armCount) { break; }
|
|
218
|
+
let a = chainTips[k].xy + celOff;
|
|
219
|
+
let b = chainTips[k + 1].xy + celOff;
|
|
220
|
+
let dArm = segDist(p, a, b);
|
|
221
|
+
let armMask = 1.0 - smoothstep(halfW * 0.55, halfW * 0.55 + aa, dArm);
|
|
222
|
+
let m = armMask * celA * peak * 0.7;
|
|
223
|
+
accum = vec4<f32>(ink * m, m) + accum * (1.0 - m);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ── Epicycle scaffolding (orbit rings + arms + joint dots) UNDER the curve ──
|
|
229
|
+
if (showEpicycles && armCount >= 1) {
|
|
230
|
+
for (var k = 0; k < MAX_PHASORS; k = k + 1) {
|
|
231
|
+
if (k >= armCount) { break; }
|
|
232
|
+
let a = chainTips[k].xy;
|
|
233
|
+
let b = chainTips[k + 1].xy;
|
|
234
|
+
let seg = f32(k) / max(f32(armCount - 1), 1.0);
|
|
235
|
+
let lin = chainColorLin(seg, rainbow);
|
|
236
|
+
// orbit RING around a (radius = arm length).
|
|
237
|
+
let radius = length(b - a);
|
|
238
|
+
let dRing = abs(length(p - a) - radius);
|
|
239
|
+
let ringW = max(halfW * 0.45, aa);
|
|
240
|
+
let ringMask = (1.0 - smoothstep(ringW, ringW + aa, dRing)) * 0.5;
|
|
241
|
+
// ARM segment a→b.
|
|
242
|
+
let dArm = segDist(p, a, b);
|
|
243
|
+
let armMask = 1.0 - smoothstep(halfW * 0.55, halfW * 0.55 + aa, dArm);
|
|
244
|
+
// joint DOT at a.
|
|
245
|
+
let dotR = max(halfW * 0.7, aa * 2.0);
|
|
246
|
+
let dDot = length(p - a);
|
|
247
|
+
let dotMask = 1.0 - smoothstep(dotR, dotR + aa, dDot);
|
|
248
|
+
let m = clamp(max(max(ringMask, armMask), dotMask), 0.0, 1.0) * peak * 0.7;
|
|
249
|
+
let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
|
|
250
|
+
// over-composite (premultiplied).
|
|
251
|
+
accum = vec4<f32>(rgb * m, m) + accum * (1.0 - m);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// ── The comet TRAIL — min-distance to the curve polyline, per-segment age fade ──
|
|
256
|
+
for (var i = 0; i < MAX_CURVE_SAMPLES; i = i + 1) {
|
|
257
|
+
if (i >= sampleCount - 1) { break; }
|
|
258
|
+
let sa = curveSamples[i];
|
|
259
|
+
let sb = curveSamples[i + 1];
|
|
260
|
+
let d = segDist(p, sa.xy, sb.xy);
|
|
261
|
+
let cover = 1.0 - smoothstep(halfW, halfW + aa, d);
|
|
262
|
+
if (cover < 0.002) { continue; }
|
|
263
|
+
let age = max(sa.z, sb.z); // 1 at head, 0 at tail
|
|
264
|
+
var a = peak * pow(age, fadeExp);
|
|
265
|
+
a = max(a, peak * trailFloor);
|
|
266
|
+
a = a * cover;
|
|
267
|
+
let lin = samplePaletteLin(1.0 - age * 0.4); // warm core, lighter tail
|
|
268
|
+
let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
|
|
269
|
+
accum = vec4<f32>(rgb * a, a) + accum * (1.0 - a);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// ── The comet HEAD — squash-and-stretch (§2b) halo + saturated core + white specular.
|
|
273
|
+
// dHead is the volume-preserving anisotropic distance off the travel frame; at rest
|
|
274
|
+
// (sHat=0) or squashGain=0 it collapses to the round disc length(p − head). ──
|
|
275
|
+
if (sampleCount >= 1) {
|
|
276
|
+
let head = curveSamples[0].xy;
|
|
277
|
+
let dHead = headAniso(p, head, headFr, squashGain);
|
|
278
|
+
let coreR = halfW * 1.5;
|
|
279
|
+
let haloR = coreR * 3.0;
|
|
280
|
+
let headLin = samplePaletteLin(0.0);
|
|
281
|
+
let headRgb = clamp(linearToSrgb(headLin), vec3<f32>(0.0), vec3<f32>(1.0));
|
|
282
|
+
// soft halo
|
|
283
|
+
let halo = (1.0 - smoothstep(0.0, haloR, dHead)) * headGlow * 0.35;
|
|
284
|
+
accum = vec4<f32>(headRgb * halo, halo) + accum * (1.0 - halo);
|
|
285
|
+
// saturated core
|
|
286
|
+
let core = (1.0 - smoothstep(coreR, coreR + aa, dHead)) * headGlow;
|
|
287
|
+
accum = vec4<f32>(headRgb * core, core) + accum * (1.0 - core);
|
|
288
|
+
// white specular
|
|
289
|
+
let spec = (1.0 - smoothstep(coreR * 0.4, coreR * 0.4 + aa, dHead)) * headGlow * 0.9;
|
|
290
|
+
accum = vec4<f32>(vec3<f32>(1.0) * spec, spec) + accum * (1.0 - spec);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return accum;
|
|
294
|
+
}
|
|
295
|
+
`, B = {
|
|
296
|
+
c0: 0,
|
|
297
|
+
ints: 4
|
|
298
|
+
};
|
|
299
|
+
function V() {
|
|
300
|
+
let e = /* @__PURE__ */ new ArrayBuffer(32);
|
|
301
|
+
return {
|
|
302
|
+
buffer: e,
|
|
303
|
+
f32: new Float32Array(e),
|
|
304
|
+
i32: new Int32Array(e)
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
function H(e, t, n, r, i, a, o) {
|
|
308
|
+
let { f32: s, i32: c } = e;
|
|
309
|
+
return s[B.c0 + 0] = t, s[B.c0 + 1] = n, s[B.c0 + 2] = 0, s[B.c0 + 3] = 0, c[B.ints + 0] = r, c[B.ints + 1] = i, c[B.ints + 2] = a, c[B.ints + 3] = o, e;
|
|
310
|
+
}
|
|
311
|
+
var U = 144, W = {
|
|
312
|
+
r0: 0,
|
|
313
|
+
r1: 4,
|
|
314
|
+
r2: 8,
|
|
315
|
+
r3: 12,
|
|
316
|
+
ints: 16,
|
|
317
|
+
palette: 20
|
|
318
|
+
};
|
|
319
|
+
function G() {
|
|
320
|
+
let e = new ArrayBuffer(U);
|
|
321
|
+
return {
|
|
322
|
+
buffer: e,
|
|
323
|
+
f32: new Float32Array(e),
|
|
324
|
+
i32: new Int32Array(e)
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function K(e) {
|
|
328
|
+
let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity, a = e;
|
|
329
|
+
for (let e = 0; e < 720; e++) {
|
|
330
|
+
let o = m(a, e / 720), [s, c] = o[o.length - 1];
|
|
331
|
+
s < t && (t = s), c < n && (n = c), s > r && (r = s), c > i && (i = c);
|
|
75
332
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
333
|
+
if (!isFinite(t)) return {
|
|
334
|
+
centerX: 0,
|
|
335
|
+
centerY: 0,
|
|
336
|
+
scale: 1
|
|
337
|
+
};
|
|
338
|
+
let o = Math.max(.001, r - t), s = Math.max(.001, i - n), c = 2 * .82 / Math.max(o, s);
|
|
339
|
+
return {
|
|
340
|
+
centerX: (t + r) / 2,
|
|
341
|
+
centerY: (n + i) / 2,
|
|
342
|
+
scale: c
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function ee(e, t, n, r) {
|
|
346
|
+
let i = Math.max(r, 1e-4), a = (e - n.centerX) * n.scale / i, o = (t - n.centerY) * n.scale;
|
|
347
|
+
return {
|
|
348
|
+
x: a * .5 + .5,
|
|
349
|
+
y: 1 - (o * .5 + .5)
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
function q(e, t, n) {
|
|
353
|
+
let r = Math.max(n, 1) / 2;
|
|
354
|
+
return e / Math.max(t, 1e-6) / r;
|
|
355
|
+
}
|
|
356
|
+
function te(e, t, n, r, i, a, o, s, c, u, d, f, p, m, h, g) {
|
|
357
|
+
let { f32: _, i32: v } = e;
|
|
358
|
+
_[W.r0 + 0] = t.centerX, _[W.r0 + 1] = t.centerY, _[W.r0 + 2] = t.scale, _[W.r0 + 3] = n, _[W.r1 + 0] = r, _[W.r1 + 1] = i, _[W.r1 + 2] = a, _[W.r1 + 3] = o, _[W.r2 + 0] = s, _[W.r2 + 1] = c, _[W.r2 + 2] = +!!u, _[W.r2 + 3] = +!!d, _[W.r3 + 0] = f, _[W.r3 + 1] = p, _[W.r3 + 2] = 0, _[W.r3 + 3] = 0;
|
|
359
|
+
let y = Math.min(g.length, 4);
|
|
360
|
+
v[W.ints + 0] = m, v[W.ints + 1] = h, v[W.ints + 2] = y, v[W.ints + 3] = 0;
|
|
361
|
+
for (let e = 0; e < 4; e++) {
|
|
362
|
+
let t = W.palette + e * 4, n = l(g[Math.min(e, y - 1)] ?? g[0]);
|
|
363
|
+
_[t + 0] = n[0], _[t + 1] = n[1], _[t + 2] = n[2], _[t + 3] = 0;
|
|
98
364
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
365
|
+
return e;
|
|
366
|
+
}
|
|
367
|
+
function ne(e) {
|
|
368
|
+
let t = Math.min(e.length, 64), n = new Float32Array(256);
|
|
369
|
+
for (let r = 0; r < t; r++) {
|
|
370
|
+
let t = e[r], i = r * 4;
|
|
371
|
+
n[i + 0] = t.coefficient[0], n[i + 1] = t.coefficient[1], n[i + 2] = t.index, n[i + 3] = 0;
|
|
104
372
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
373
|
+
return n;
|
|
374
|
+
}
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/components/custom/fourier-field/composables/fourierFieldWGPUSetup.ts
|
|
377
|
+
var J = 64, Y = 128, X = 8, re = 1, Z = 2, Q = 4, ie = 64, ae = .92, oe = .95, se = 1.35, ce = .34;
|
|
378
|
+
function le(e) {
|
|
379
|
+
let { canvas: t, config: n, getSpectrum: r, getPalette: i, getHeadT: a, shouldContinue: o, onFrame: c } = e, l = e.getPointerLean;
|
|
380
|
+
return function(e, u, d) {
|
|
381
|
+
let f = e.createShaderModule({
|
|
382
|
+
label: "[FourierField] fourier-field.compute.wgsl",
|
|
383
|
+
code: R
|
|
384
|
+
}), p = e.createShaderModule({
|
|
385
|
+
label: "[FourierField] fourier-field.render.wgsl",
|
|
386
|
+
code: z
|
|
387
|
+
}), m = e.createBuffer({
|
|
388
|
+
label: "[FourierField] phasors",
|
|
389
|
+
size: 1024,
|
|
390
|
+
usage: Y | X
|
|
391
|
+
}), h = e.createBuffer({
|
|
392
|
+
label: "[FourierField] curve-samples",
|
|
393
|
+
size: 384 * 16,
|
|
394
|
+
usage: Y
|
|
395
|
+
}), g = e.createBuffer({
|
|
396
|
+
label: "[FourierField] chain-tips",
|
|
397
|
+
size: 1040,
|
|
398
|
+
usage: Y
|
|
399
|
+
}), _ = e.createBuffer({
|
|
400
|
+
label: "[FourierField] compute-uniforms",
|
|
401
|
+
size: V().buffer.byteLength,
|
|
402
|
+
usage: J | X
|
|
403
|
+
}), v = e.createBuffer({
|
|
404
|
+
label: "[FourierField] render-uniforms",
|
|
405
|
+
size: G().buffer.byteLength,
|
|
406
|
+
usage: J | X
|
|
407
|
+
}), y = e.createBindGroupLayout({
|
|
408
|
+
label: "[FourierField] compute-bgl",
|
|
409
|
+
entries: [
|
|
410
|
+
{
|
|
411
|
+
binding: 0,
|
|
412
|
+
visibility: Q,
|
|
413
|
+
buffer: { type: "uniform" }
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
binding: 1,
|
|
417
|
+
visibility: Q,
|
|
418
|
+
buffer: { type: "read-only-storage" }
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
binding: 2,
|
|
422
|
+
visibility: Q,
|
|
423
|
+
buffer: { type: "storage" }
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
binding: 3,
|
|
427
|
+
visibility: Q,
|
|
428
|
+
buffer: { type: "storage" }
|
|
131
429
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
430
|
+
]
|
|
431
|
+
}), b = e.createComputePipeline({
|
|
432
|
+
label: "[FourierField] compute-pipeline",
|
|
433
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [y] }),
|
|
434
|
+
compute: {
|
|
435
|
+
module: f,
|
|
436
|
+
entryPoint: "cs_main"
|
|
437
|
+
}
|
|
438
|
+
}), x = e.createBindGroup({
|
|
439
|
+
label: "[FourierField] compute-bg",
|
|
440
|
+
layout: y,
|
|
441
|
+
entries: [
|
|
442
|
+
{
|
|
443
|
+
binding: 0,
|
|
444
|
+
resource: { buffer: _ }
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
binding: 1,
|
|
448
|
+
resource: { buffer: m }
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
binding: 2,
|
|
452
|
+
resource: { buffer: h }
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
binding: 3,
|
|
456
|
+
resource: { buffer: g }
|
|
137
457
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
458
|
+
]
|
|
459
|
+
}), S = e.createBindGroupLayout({
|
|
460
|
+
label: "[FourierField] render-bgl",
|
|
461
|
+
entries: [
|
|
462
|
+
{
|
|
463
|
+
binding: 0,
|
|
464
|
+
visibility: re | Z,
|
|
465
|
+
buffer: { type: "uniform" }
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
binding: 1,
|
|
469
|
+
visibility: Z,
|
|
470
|
+
buffer: { type: "read-only-storage" }
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
binding: 2,
|
|
474
|
+
visibility: Z,
|
|
475
|
+
buffer: { type: "read-only-storage" }
|
|
142
476
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
477
|
+
]
|
|
478
|
+
}), C = e.createRenderPipeline({
|
|
479
|
+
label: "[FourierField] render-pipeline",
|
|
480
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [S] }),
|
|
481
|
+
vertex: {
|
|
482
|
+
module: p,
|
|
483
|
+
entryPoint: "vs_main"
|
|
484
|
+
},
|
|
485
|
+
fragment: {
|
|
486
|
+
module: p,
|
|
487
|
+
entryPoint: "fs_main",
|
|
488
|
+
targets: [{
|
|
489
|
+
format: d,
|
|
490
|
+
blend: {
|
|
491
|
+
color: {
|
|
492
|
+
srcFactor: "one",
|
|
493
|
+
dstFactor: "one-minus-src-alpha",
|
|
494
|
+
operation: "add"
|
|
495
|
+
},
|
|
496
|
+
alpha: {
|
|
497
|
+
srcFactor: "one",
|
|
498
|
+
dstFactor: "one-minus-src-alpha",
|
|
499
|
+
operation: "add"
|
|
500
|
+
}
|
|
149
501
|
}
|
|
502
|
+
}]
|
|
503
|
+
},
|
|
504
|
+
primitive: { topology: "triangle-list" }
|
|
505
|
+
}), w = e.createBindGroup({
|
|
506
|
+
label: "[FourierField] render-bg",
|
|
507
|
+
layout: S,
|
|
508
|
+
entries: [
|
|
509
|
+
{
|
|
510
|
+
binding: 0,
|
|
511
|
+
resource: { buffer: v }
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
binding: 1,
|
|
515
|
+
resource: { buffer: h }
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
binding: 2,
|
|
519
|
+
resource: { buffer: g }
|
|
150
520
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
521
|
+
]
|
|
522
|
+
}), T = V(), E = G(), D = null, O = {
|
|
523
|
+
centerX: 0,
|
|
524
|
+
centerY: 0,
|
|
525
|
+
scale: 1
|
|
526
|
+
}, k = 0;
|
|
527
|
+
function A() {
|
|
528
|
+
let t = r();
|
|
529
|
+
t !== D && (D = t, k = Math.min(t.length, 64), O = K(t), e.queue.writeBuffer(m, 0, ne(t)));
|
|
530
|
+
}
|
|
531
|
+
function j() {
|
|
532
|
+
let e = s(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
|
|
533
|
+
(t.width !== i || t.height !== a) && (t.width = i, t.height = a);
|
|
534
|
+
}
|
|
535
|
+
function M(r) {
|
|
536
|
+
c?.(r), A();
|
|
537
|
+
let o = a(), s = Math.max(1, Math.min(Math.round(n.harmonics), k)), d = n.showEpicycles ? Math.max(1, Math.min(Math.round(n.epicycleArms), s)) : 0;
|
|
538
|
+
H(T, o, n.trailArc, s, d, 384, k), e.queue.writeBuffer(_, 0, T.buffer);
|
|
539
|
+
let f = Math.min(t.clientWidth || 320, t.clientHeight || 320), p = (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), m = q(n.trailWidth, O.scale, f), h = l?.() ?? {
|
|
540
|
+
x: 0,
|
|
541
|
+
y: 0
|
|
542
|
+
};
|
|
543
|
+
te(E, h.x !== 0 || h.y !== 0 ? {
|
|
544
|
+
...O,
|
|
545
|
+
centerX: O.centerX - h.x,
|
|
546
|
+
centerY: O.centerY - h.y
|
|
547
|
+
} : O, p, m, ae, oe, se, ce, n.intensity, n.showEpicycles, n.rainbowChain, n.squashGain, n.celGain, 384, d, i()), e.queue.writeBuffer(v, 0, E.buffer);
|
|
548
|
+
let g = e.createCommandEncoder({ label: "[FourierField] frame" }), y = g.beginComputePass();
|
|
549
|
+
y.setPipeline(b), y.setBindGroup(0, x), y.dispatchWorkgroups(Math.ceil(384 / ie)), y.end();
|
|
550
|
+
let S = u.getCurrentTexture().createView(), D = g.beginRenderPass({ colorAttachments: [{
|
|
551
|
+
view: S,
|
|
552
|
+
clearValue: {
|
|
553
|
+
r: 0,
|
|
554
|
+
g: 0,
|
|
555
|
+
b: 0,
|
|
556
|
+
a: 0
|
|
557
|
+
},
|
|
558
|
+
loadOp: "clear",
|
|
559
|
+
storeOp: "store"
|
|
560
|
+
}] });
|
|
561
|
+
D.setPipeline(C), D.setBindGroup(0, w), D.draw(3, 1, 0, 0), D.end(), e.queue.submit([g.finish()]);
|
|
562
|
+
}
|
|
563
|
+
return {
|
|
564
|
+
frame: M,
|
|
565
|
+
shouldContinue: o,
|
|
566
|
+
resize: j,
|
|
567
|
+
teardown: () => {
|
|
568
|
+
m.destroy(), h.destroy(), g.destroy(), _.destroy(), v.destroy();
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region src/components/custom/fourier-field/shaders/fourier-field.glsl.ts
|
|
575
|
+
var ue = "#version 300 es\nin vec2 aPosition;\nout vec2 vClip;\nvoid main() {\n vClip = aPosition;\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}\n", de = `#version 300 es
|
|
576
|
+
precision highp float;
|
|
577
|
+
|
|
578
|
+
#define MAX_CURVE_SAMPLES 256
|
|
579
|
+
#define MAX_PHASORS 64
|
|
580
|
+
// BD.W-FOURIER-LOOM §2b — MUST equal the WGSL twin + FOURIER_TANGENT_EPS (constants.ts).
|
|
581
|
+
#define TANGENT_EPS 1e-4
|
|
582
|
+
#define SPEED_REF_HALFWIDTHS 6.0
|
|
583
|
+
|
|
584
|
+
in vec2 vClip;
|
|
585
|
+
out vec4 fragColor;
|
|
586
|
+
|
|
587
|
+
uniform vec4 uFit; // (centerX, centerY, scale, aspect)
|
|
588
|
+
uniform vec4 uTrail; // (trailWidth, peakAlpha, headGlowAlpha, trailFadeExp)
|
|
589
|
+
uniform vec4 uEnv; // (trailFloor, intensity, showEpicycles, rainbowChain)
|
|
590
|
+
uniform vec4 uLoom; // (squashGain, celGain, _pad, _pad) — FOURIER-LOOM §2b/§3b
|
|
591
|
+
uniform int uSampleCount;
|
|
592
|
+
uniform int uArmCount;
|
|
593
|
+
uniform int uStopCount;
|
|
594
|
+
uniform vec3 uPalette[4]; // linear-sRGB stops
|
|
595
|
+
// curveSamples[i] = (x, y, age) in MODEL space; chainTips[k] = (x, y) in MODEL space.
|
|
596
|
+
uniform vec3 uCurve[MAX_CURVE_SAMPLES];
|
|
597
|
+
uniform vec2 uChain[MAX_PHASORS];
|
|
598
|
+
|
|
599
|
+
const float PI = 3.141592653589793;
|
|
600
|
+
|
|
601
|
+
${i}
|
|
602
|
+
${o}
|
|
603
|
+
|
|
604
|
+
// Negative-safe cube root (the WGSL chunk's cbrt3 twin; the GLSL chunk inlines it).
|
|
605
|
+
vec3 cbrt3(vec3 v) { return sign(v) * pow(abs(v), vec3(1.0 / 3.0)); }
|
|
606
|
+
|
|
607
|
+
vec3 samplePaletteLin(float t) {
|
|
608
|
+
if (uStopCount <= 1) return uPalette[0];
|
|
609
|
+
float n = float(uStopCount);
|
|
610
|
+
float ft = clamp(t, 0.0, 1.0) * (n - 1.0);
|
|
611
|
+
int i0 = int(floor(ft));
|
|
612
|
+
int i1 = min(i0 + 1, uStopCount - 1);
|
|
613
|
+
float f = ft - float(i0);
|
|
614
|
+
vec3 labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * uPalette[i0]);
|
|
615
|
+
vec3 labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * uPalette[i1]);
|
|
616
|
+
return oklabToLinearSrgb(mix(labA, labB, f));
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
vec3 chainColorLin(float seg, bool rainbow) {
|
|
620
|
+
vec3 baseLin = uPalette[0];
|
|
621
|
+
if (!rainbow) return baseLin;
|
|
622
|
+
vec3 lab = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * baseLin);
|
|
623
|
+
vec3 lch = oklabToOklch(lab);
|
|
624
|
+
float hueShift = mix(-0.45, 1.15, clamp(seg, 0.0, 1.0));
|
|
625
|
+
vec3 lifted = vec3(0.66, max(lch.y, 0.14), lch.z + hueShift);
|
|
626
|
+
return oklabToLinearSrgb(oklchToOklab(lifted));
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
float segDist(vec2 p, vec2 a, vec2 b) {
|
|
630
|
+
vec2 pa = p - a;
|
|
631
|
+
vec2 ba = b - a;
|
|
632
|
+
float h = clamp(dot(pa, ba) / max(dot(ba, ba), 1e-8), 0.0, 1.0);
|
|
633
|
+
return length(pa - ba * h);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// BD.W-FOURIER-LOOM §2b — the head travel frame (T, ŝ), the GLSL twin of the WGSL headFrame.
|
|
637
|
+
// The cusp guard returns +x as the stable fallback when s ≤ TANGENT_EPS — identical to the
|
|
638
|
+
// WGSL twin + the CPU bead path.
|
|
639
|
+
struct HeadFrame { vec2 T; float sHat; };
|
|
640
|
+
HeadFrame headFrame(vec2 head, vec2 headBack, float halfW) {
|
|
641
|
+
vec2 d = head - headBack;
|
|
642
|
+
float s = length(d);
|
|
643
|
+
HeadFrame fr;
|
|
644
|
+
if (s <= TANGENT_EPS) { fr.T = vec2(1.0, 0.0); fr.sHat = 0.0; return fr; }
|
|
645
|
+
fr.T = d / s;
|
|
646
|
+
float refScale = max(halfW * SPEED_REF_HALFWIDTHS, 1e-6);
|
|
647
|
+
fr.sHat = clamp(s / refScale, 0.0, 1.0);
|
|
648
|
+
return fr;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
// The volume-preserving anisotropic head distance (the WGSL headAniso twin).
|
|
652
|
+
float headAniso(vec2 p, vec2 head, HeadFrame fr, float k) {
|
|
653
|
+
float g = 1.0 + k * fr.sHat;
|
|
654
|
+
vec2 n = vec2(-fr.T.y, fr.T.x);
|
|
655
|
+
vec2 rel = p - head;
|
|
656
|
+
float along = dot(rel, fr.T) / g;
|
|
657
|
+
float across = dot(rel, n) * g;
|
|
658
|
+
return length(vec2(along, across));
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
void main() {
|
|
662
|
+
vec2 center = uFit.xy;
|
|
663
|
+
float scale = max(uFit.z, 1e-6);
|
|
664
|
+
float aspect = max(uFit.w, 1e-4);
|
|
665
|
+
// clip → model (the inverse of model→clip fit).
|
|
666
|
+
vec2 p = center + vec2(vClip.x * aspect, vClip.y) / scale;
|
|
667
|
+
|
|
668
|
+
float aa = max(fwidth(p.x) + fwidth(p.y), 1e-5) * 0.75;
|
|
669
|
+
float trailWidth = uTrail.x; // already in model units (packed CPU-side)
|
|
670
|
+
float peak = uTrail.y * uEnv.y;
|
|
671
|
+
float headGlow = uTrail.z * uEnv.y;
|
|
672
|
+
float fadeExp = uTrail.w;
|
|
673
|
+
float trailFloor = uEnv.x;
|
|
674
|
+
bool showEpicycles = uEnv.z > 0.5;
|
|
675
|
+
bool rainbow = uEnv.w > 0.5;
|
|
676
|
+
float squashGain = uLoom.x; // FOURIER-LOOM §2b
|
|
677
|
+
float celGain = uLoom.y; // FOURIER-LOOM §3b
|
|
678
|
+
float halfW = trailWidth * 0.5;
|
|
679
|
+
|
|
680
|
+
// §2b — the head travel frame (SAME uCurve[0]/[1] the WGSL twin reads → parity).
|
|
681
|
+
HeadFrame headFr;
|
|
682
|
+
headFr.T = vec2(1.0, 0.0);
|
|
683
|
+
headFr.sHat = 0.0;
|
|
684
|
+
if (uSampleCount >= 2) {
|
|
685
|
+
headFr = headFrame(uCurve[0].xy, uCurve[1].xy, halfW);
|
|
686
|
+
}
|
|
687
|
+
vec2 celOff = -headFr.T * halfW * 1.4;
|
|
688
|
+
|
|
689
|
+
vec4 accum = vec4(0.0);
|
|
690
|
+
|
|
691
|
+
// §3b — the cartoon CEL-SHADOW: a darker offset copy of the rope + chain, opposite travel,
|
|
692
|
+
// painted FIRST (under the lit chain). PRM-static; celGain = 0 → no pass (byte-frozen).
|
|
693
|
+
if (celGain > 0.001) {
|
|
694
|
+
vec3 ink = vec3(0.0);
|
|
695
|
+
float celA = clamp(celGain, 0.0, 1.0);
|
|
696
|
+
for (int i = 0; i < MAX_CURVE_SAMPLES; i++) {
|
|
697
|
+
if (i >= uSampleCount - 1) break;
|
|
698
|
+
vec2 sa = uCurve[i].xy + celOff;
|
|
699
|
+
vec2 sb = uCurve[i + 1].xy + celOff;
|
|
700
|
+
float d = segDist(p, sa, sb);
|
|
701
|
+
float cover = 1.0 - smoothstep(halfW, halfW + aa, d);
|
|
702
|
+
if (cover < 0.002) continue;
|
|
703
|
+
float m = cover * celA * peak;
|
|
704
|
+
accum = vec4(ink * m, m) + accum * (1.0 - m);
|
|
705
|
+
}
|
|
706
|
+
if (showEpicycles && uArmCount >= 1) {
|
|
707
|
+
for (int k = 0; k < MAX_PHASORS; k++) {
|
|
708
|
+
if (k >= uArmCount) break;
|
|
709
|
+
vec2 a = uChain[k] + celOff;
|
|
710
|
+
vec2 b = uChain[k + 1] + celOff;
|
|
711
|
+
float dArm = segDist(p, a, b);
|
|
712
|
+
float armMask = 1.0 - smoothstep(halfW * 0.55, halfW * 0.55 + aa, dArm);
|
|
713
|
+
float m = armMask * celA * peak * 0.7;
|
|
714
|
+
accum = vec4(ink * m, m) + accum * (1.0 - m);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
if (showEpicycles && uArmCount >= 1) {
|
|
720
|
+
for (int k = 0; k < MAX_PHASORS; k++) {
|
|
721
|
+
if (k >= uArmCount) break;
|
|
722
|
+
vec2 a = uChain[k];
|
|
723
|
+
vec2 b = uChain[k + 1];
|
|
724
|
+
float seg = float(k) / max(float(uArmCount - 1), 1.0);
|
|
725
|
+
vec3 lin = chainColorLin(seg, rainbow);
|
|
726
|
+
float radius = length(b - a);
|
|
727
|
+
float dRing = abs(length(p - a) - radius);
|
|
728
|
+
float ringW = max(halfW * 0.45, aa);
|
|
729
|
+
float ringMask = (1.0 - smoothstep(ringW, ringW + aa, dRing)) * 0.5;
|
|
730
|
+
float dArm = segDist(p, a, b);
|
|
731
|
+
float armMask = 1.0 - smoothstep(halfW * 0.55, halfW * 0.55 + aa, dArm);
|
|
732
|
+
float dotR = max(halfW * 0.7, aa * 2.0);
|
|
733
|
+
float dDot = length(p - a);
|
|
734
|
+
float dotMask = 1.0 - smoothstep(dotR, dotR + aa, dDot);
|
|
735
|
+
float m = clamp(max(max(ringMask, armMask), dotMask), 0.0, 1.0) * peak * 0.7;
|
|
736
|
+
vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
|
|
737
|
+
accum = vec4(rgb * m, m) + accum * (1.0 - m);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
for (int i = 0; i < MAX_CURVE_SAMPLES; i++) {
|
|
742
|
+
if (i >= uSampleCount - 1) break;
|
|
743
|
+
vec3 sa = uCurve[i];
|
|
744
|
+
vec3 sb = uCurve[i + 1];
|
|
745
|
+
float d = segDist(p, sa.xy, sb.xy);
|
|
746
|
+
float cover = 1.0 - smoothstep(halfW, halfW + aa, d);
|
|
747
|
+
if (cover < 0.002) continue;
|
|
748
|
+
float age = max(sa.z, sb.z);
|
|
749
|
+
float a = peak * pow(age, fadeExp);
|
|
750
|
+
a = max(a, peak * trailFloor) * cover;
|
|
751
|
+
vec3 lin = samplePaletteLin(1.0 - age * 0.4);
|
|
752
|
+
vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
|
|
753
|
+
accum = vec4(rgb * a, a) + accum * (1.0 - a);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
if (uSampleCount >= 1) {
|
|
757
|
+
vec2 head = uCurve[0].xy;
|
|
758
|
+
// §2b — the squash-and-stretch anisotropic head (collapses to the round disc at rest).
|
|
759
|
+
float dHead = headAniso(p, head, headFr, squashGain);
|
|
760
|
+
float coreR = halfW * 1.5;
|
|
761
|
+
float haloR = coreR * 3.0;
|
|
762
|
+
vec3 headRgb = clamp(linearToSrgb(samplePaletteLin(0.0)), vec3(0.0), vec3(1.0));
|
|
763
|
+
float halo = (1.0 - smoothstep(0.0, haloR, dHead)) * headGlow * 0.35;
|
|
764
|
+
accum = vec4(headRgb * halo, halo) + accum * (1.0 - halo);
|
|
765
|
+
float core = (1.0 - smoothstep(coreR, coreR + aa, dHead)) * headGlow;
|
|
766
|
+
accum = vec4(headRgb * core, core) + accum * (1.0 - core);
|
|
767
|
+
float spec = (1.0 - smoothstep(coreR * 0.4, coreR * 0.4 + aa, dHead)) * headGlow * 0.9;
|
|
768
|
+
accum = vec4(vec3(1.0) * spec, spec) + accum * (1.0 - spec);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
fragColor = accum;
|
|
772
|
+
}
|
|
773
|
+
`, fe = 256, $ = 64, pe = .92, me = .95, he = 1.35, ge = .34;
|
|
774
|
+
function _e(e, t, n) {
|
|
775
|
+
let r = e.createShader(t);
|
|
776
|
+
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
777
|
+
let t = e.getShaderInfoLog(r);
|
|
778
|
+
throw e.deleteShader(r), Error(`[FourierField] shader compile failed: ${t}`);
|
|
779
|
+
}
|
|
780
|
+
return r;
|
|
781
|
+
}
|
|
782
|
+
function ve(e) {
|
|
783
|
+
let { canvas: t, config: n, getSpectrum: r, getPalette: i, getHeadT: a, shouldContinue: o, onFrame: c } = e, u = e.getPointerLean;
|
|
784
|
+
return function(e) {
|
|
785
|
+
let d = _e(e, e.VERTEX_SHADER, ue), f = _e(e, e.FRAGMENT_SHADER, de), p = e.createProgram();
|
|
786
|
+
if (e.attachShader(p, d), e.attachShader(p, f), e.linkProgram(p), !e.getProgramParameter(p, e.LINK_STATUS)) throw Error(`[FourierField] link failed: ${e.getProgramInfoLog(p)}`);
|
|
787
|
+
e.deleteShader(d), e.deleteShader(f);
|
|
788
|
+
let m = e.createVertexArray();
|
|
789
|
+
e.bindVertexArray(m);
|
|
790
|
+
let g = e.createBuffer();
|
|
791
|
+
e.bindBuffer(e.ARRAY_BUFFER, g), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
792
|
+
-1,
|
|
793
|
+
-1,
|
|
794
|
+
3,
|
|
795
|
+
-1,
|
|
796
|
+
-1,
|
|
797
|
+
3
|
|
798
|
+
]), e.STATIC_DRAW);
|
|
799
|
+
let _ = e.getAttribLocation(p, "aPosition");
|
|
800
|
+
e.enableVertexAttribArray(_), e.vertexAttribPointer(_, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
|
|
801
|
+
let v = (t) => e.getUniformLocation(p, t), y = v("uFit"), b = v("uTrail"), x = v("uEnv"), S = v("uLoom"), C = v("uSampleCount"), w = v("uArmCount"), T = v("uStopCount"), E = v("uPalette[0]"), D = v("uCurve[0]"), O = v("uChain[0]"), k = new Float32Array(fe * 3), A = new Float32Array(($ + 1) * 2), j = new Float32Array(12), M = null, N = {
|
|
802
|
+
centerX: 0,
|
|
803
|
+
centerY: 0,
|
|
804
|
+
scale: 1
|
|
805
|
+
}, P = 0;
|
|
806
|
+
function F() {
|
|
807
|
+
let e = r();
|
|
808
|
+
e !== M && (M = e, P = Math.min(e.length, $), N = K(e));
|
|
809
|
+
}
|
|
810
|
+
function I() {
|
|
811
|
+
let n = s(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), o = Math.max(1, Math.round(i * n));
|
|
812
|
+
(t.width !== a || t.height !== o) && (t.width = a, t.height = o), e.viewport(0, 0, t.width, t.height);
|
|
813
|
+
}
|
|
814
|
+
function L(r) {
|
|
815
|
+
c?.(r), F();
|
|
816
|
+
let o = M;
|
|
817
|
+
if (!o) return;
|
|
818
|
+
let s = a(), d = Math.max(1, Math.min(Math.round(n.harmonics), P)), f = n.showEpicycles ? Math.max(1, Math.min(Math.round(n.epicycleArms), d)) : 0, g = fe, _ = Math.max(g - 1, 1);
|
|
819
|
+
for (let e = 0; e < g; e++) {
|
|
820
|
+
let t = e / _, r = 1 - t, i = s - n.trailArc * t;
|
|
821
|
+
i -= Math.floor(i);
|
|
822
|
+
let [a, c] = h(o, i, d), l = e * 3;
|
|
823
|
+
k[l + 0] = a, k[l + 1] = c, k[l + 2] = r;
|
|
824
|
+
}
|
|
825
|
+
let v = Math.min(f, d);
|
|
826
|
+
for (let e = 0; e <= $; e++) {
|
|
827
|
+
let t = e * 2;
|
|
828
|
+
if (e <= v) {
|
|
829
|
+
let [n, r] = h(o, s, e);
|
|
830
|
+
A[t + 0] = n, A[t + 1] = r;
|
|
831
|
+
} else A[t + 0] = 0, A[t + 1] = 0;
|
|
832
|
+
}
|
|
833
|
+
let I = t.clientWidth || 320, L = t.clientHeight || 320, R = Math.min(I, L), z = I / Math.max(L, 1), B = q(n.trailWidth, N.scale, R), V = i(), H = Math.min(V.length, 4);
|
|
834
|
+
for (let e = 0; e < 4; e++) {
|
|
835
|
+
let t = l(V[Math.min(e, H - 1)] ?? V[0]);
|
|
836
|
+
j[e * 3 + 0] = t[0], j[e * 3 + 1] = t[1], j[e * 3 + 2] = t[2];
|
|
837
|
+
}
|
|
838
|
+
e.useProgram(p), e.bindVertexArray(m), 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);
|
|
839
|
+
let U = u?.() ?? {
|
|
840
|
+
x: 0,
|
|
841
|
+
y: 0
|
|
842
|
+
};
|
|
843
|
+
e.uniform4f(y, N.centerX - U.x, N.centerY - U.y, N.scale, z), e.uniform4f(b, B, pe, me, he), e.uniform4f(x, ge, n.intensity, +!!n.showEpicycles, +!!n.rainbowChain), e.uniform4f(S, n.squashGain, n.celGain, 0, 0), e.uniform1i(C, g), e.uniform1i(w, f), e.uniform1i(T, H), e.uniform3fv(E, j), e.uniform3fv(D, k), e.uniform2fv(O, A), e.drawArrays(e.TRIANGLES, 0, 3);
|
|
844
|
+
}
|
|
845
|
+
return {
|
|
846
|
+
frame: L,
|
|
847
|
+
shouldContinue: o,
|
|
848
|
+
resize: I,
|
|
849
|
+
teardown: () => {
|
|
850
|
+
e.deleteProgram(p), e.deleteBuffer(g), e.deleteVertexArray(m);
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region src/components/custom/fourier-field/composables/useFourierField.ts
|
|
857
|
+
function ye(e, t) {
|
|
858
|
+
let { config: r, getSpectrum: i, getPalette: a } = t, o = t.mode ?? "live", s = t.frozenT ?? .34, l = t.periodS ?? 16, u = 0, d = -1, f = 0, p = 0;
|
|
859
|
+
function m(e) {
|
|
860
|
+
if (f === 0 && p === 0) return;
|
|
861
|
+
let t = -64 * f - 2 * .62 * 8 * p;
|
|
862
|
+
p += t * e, f += p * e, Math.abs(f) < 1e-4 && Math.abs(p) < 1e-4 && (f = 0, p = 0);
|
|
863
|
+
}
|
|
864
|
+
let g = n({ respectReducedMotion: r.respectReducedMotion }), _ = () => (t.freeze?.() ?? !1) || (F?.reducedMotion ?? !1);
|
|
865
|
+
function v(e) {
|
|
866
|
+
y(e), t.onHeadFrame?.(E());
|
|
867
|
+
}
|
|
868
|
+
function y(e) {
|
|
869
|
+
let t = d >= 0 ? (e - d) * 1e3 : 16.7;
|
|
870
|
+
if (d = e, g.tick(t), _()) {
|
|
871
|
+
u = s, f = 0, p = 0;
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
let n = Math.min(Math.max(t / 1e3, 0), .05);
|
|
875
|
+
if (r.interactive && g.active.value) {
|
|
876
|
+
let e = r.speed / l + g.velocity.value.x * M + f;
|
|
877
|
+
u = (u + e * n) % 1, u < 0 && (u += 1);
|
|
878
|
+
let t = g.burst.value * 4;
|
|
879
|
+
t !== 0 && (f = t, p = 0), m(n);
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
let i = r.speed / l + f;
|
|
883
|
+
u = (u + i * n) % 1, u < 0 && (u += 1), m(n);
|
|
884
|
+
}
|
|
885
|
+
let b = () => u, x = null, S = {
|
|
886
|
+
centerX: 0,
|
|
887
|
+
centerY: 0,
|
|
888
|
+
scale: 1
|
|
889
|
+
}, C = () => {
|
|
890
|
+
let e = i();
|
|
891
|
+
return e !== x && (x = e, S = K(e)), S;
|
|
892
|
+
}, w = () => {
|
|
893
|
+
let e = i(), t = Math.max(1, Math.min(Math.round(r.harmonics), e.length, 64)), [n, a] = h(e, u, t);
|
|
894
|
+
return {
|
|
895
|
+
x: n,
|
|
896
|
+
y: a
|
|
897
|
+
};
|
|
898
|
+
}, E = () => {
|
|
899
|
+
let t = e.value;
|
|
900
|
+
if (!t) return null;
|
|
901
|
+
let n = t.clientWidth || 0, r = t.clientHeight || 0;
|
|
902
|
+
if (n <= 0 || r <= 0) return null;
|
|
903
|
+
let i = n / r, a = w(), o = C(), s = D(), c = s.x !== 0 || s.y !== 0 ? {
|
|
904
|
+
...o,
|
|
905
|
+
centerX: o.centerX - s.x,
|
|
906
|
+
centerY: o.centerY - s.y
|
|
907
|
+
} : o;
|
|
908
|
+
return ee(a.x, a.y, c, i);
|
|
909
|
+
}, D = () => {
|
|
910
|
+
if (!r.interactive || !g.active.value) return {
|
|
911
|
+
x: 0,
|
|
912
|
+
y: 0
|
|
913
|
+
};
|
|
914
|
+
let e = g.smoothedPosition.value;
|
|
915
|
+
return {
|
|
916
|
+
x: (e.x * 2 - 1) * N,
|
|
917
|
+
y: (e.y * 2 - 1) * N
|
|
918
|
+
};
|
|
919
|
+
}, O = (e) => {
|
|
920
|
+
g.onPointerMove(e), r.interactive && F?.wake();
|
|
921
|
+
}, k = () => {
|
|
922
|
+
g.onPointerEnter(), r.interactive && F?.wake();
|
|
923
|
+
}, A = (e) => e.parentElement ?? e;
|
|
924
|
+
function j(e) {
|
|
925
|
+
let t = A(e);
|
|
926
|
+
t.addEventListener("pointermove", O), t.addEventListener("pointerenter", k), t.addEventListener("pointerleave", g.onPointerLeave);
|
|
927
|
+
}
|
|
928
|
+
function P(e) {
|
|
929
|
+
let t = A(e);
|
|
930
|
+
t.removeEventListener("pointermove", O), t.removeEventListener("pointerenter", k), t.removeEventListener("pointerleave", g.onPointerLeave);
|
|
931
|
+
}
|
|
932
|
+
let F = null, I = () => {
|
|
933
|
+
let t = e.value;
|
|
934
|
+
return t ? (F || (j(t), F = c(t, {
|
|
935
|
+
mode: o,
|
|
936
|
+
respectReducedMotion: r.respectReducedMotion,
|
|
937
|
+
setupWGPU: le({
|
|
938
|
+
canvas: t,
|
|
939
|
+
config: r,
|
|
940
|
+
getSpectrum: i,
|
|
941
|
+
getPalette: a,
|
|
942
|
+
getHeadT: b,
|
|
943
|
+
shouldContinue: () => !0,
|
|
944
|
+
onFrame: v,
|
|
945
|
+
getPointerLean: D
|
|
946
|
+
}),
|
|
947
|
+
setupGL: ve({
|
|
948
|
+
canvas: t,
|
|
949
|
+
config: r,
|
|
950
|
+
getSpectrum: i,
|
|
951
|
+
getPalette: a,
|
|
952
|
+
getHeadT: b,
|
|
953
|
+
shouldContinue: () => !0,
|
|
954
|
+
onFrame: v,
|
|
955
|
+
getPointerLean: D
|
|
956
|
+
})
|
|
957
|
+
}), F.armAsync()), F) : null;
|
|
958
|
+
};
|
|
959
|
+
queueMicrotask(() => I());
|
|
960
|
+
let L = {
|
|
961
|
+
get backend() {
|
|
962
|
+
return I()?.backend ?? "webgpu";
|
|
963
|
+
},
|
|
964
|
+
pause: () => I()?.suspend("manual"),
|
|
965
|
+
resume: () => I()?.resume("manual"),
|
|
966
|
+
wake: () => I()?.wake(),
|
|
967
|
+
renderAt: (e) => I()?.renderAt(e),
|
|
968
|
+
get reducedMotion() {
|
|
969
|
+
return F?.reducedMotion ?? !1;
|
|
970
|
+
},
|
|
971
|
+
get headT() {
|
|
972
|
+
return u;
|
|
973
|
+
},
|
|
974
|
+
setHeadT: (e) => {
|
|
975
|
+
u = (e % 1 + 1) % 1, I()?.wake();
|
|
976
|
+
},
|
|
977
|
+
headUnit: E,
|
|
978
|
+
dispose: () => {
|
|
979
|
+
let t = e.value;
|
|
980
|
+
t && P(t), g.dispose(), F?.dispose();
|
|
981
|
+
}
|
|
982
|
+
};
|
|
983
|
+
return T(() => L.dispose()), L;
|
|
171
984
|
}
|
|
172
985
|
//#endregion
|
|
173
986
|
//#region src/components/custom/fourier-field/FourierField.vue
|
|
174
|
-
var
|
|
987
|
+
var be = /* @__PURE__ */ e(/* @__PURE__ */ S({
|
|
175
988
|
__name: "FourierField",
|
|
176
989
|
props: {
|
|
177
|
-
|
|
990
|
+
config: {},
|
|
991
|
+
spectrum: {},
|
|
992
|
+
getPalette: {},
|
|
178
993
|
color: {},
|
|
179
994
|
colorResolver: {},
|
|
180
995
|
seed: { default: "" },
|
|
@@ -182,25 +997,101 @@ var C = /* @__PURE__ */ t(/* @__PURE__ */ h({
|
|
|
182
997
|
type: Boolean,
|
|
183
998
|
default: !1
|
|
184
999
|
},
|
|
185
|
-
intensity: {
|
|
186
|
-
clock: {}
|
|
1000
|
+
intensity: {}
|
|
187
1001
|
},
|
|
188
|
-
setup(e) {
|
|
189
|
-
let
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
1002
|
+
setup(e, { expose: n }) {
|
|
1003
|
+
let r = e, i = O("hostRef"), a = O("canvasRef"), { isDark: o } = d(), s = y(() => {
|
|
1004
|
+
let e = r.config ?? L, t = r.intensity == null ? e.intensity : Math.max(0, Math.min(2, r.intensity)), n = r.config ? e.interactive : !1;
|
|
1005
|
+
return {
|
|
1006
|
+
...e,
|
|
1007
|
+
intensity: t,
|
|
1008
|
+
interactive: n
|
|
1009
|
+
};
|
|
1010
|
+
}), c = y(() => r.spectrum && r.spectrum.length > 0 ? r.spectrum : _(f(p((r.freeze ? "fourier-field/frozen" : r.seed || "fourier-field") + r.seed)), {
|
|
1011
|
+
harmonics: Math.min(s.value.harmonics + 4, 62),
|
|
1012
|
+
harmonicScale: s.value.harmonicScale
|
|
1013
|
+
})), l = () => c.value;
|
|
1014
|
+
function m(e) {
|
|
1015
|
+
if (!e.includes("var(") && !e.includes("light-dark(")) return e;
|
|
1016
|
+
let n = i.value;
|
|
1017
|
+
if (typeof window > "u" || !n) return e;
|
|
1018
|
+
if (e.includes("var(")) return t(e, n);
|
|
1019
|
+
let r = n.style.color;
|
|
1020
|
+
n.style.color = e;
|
|
1021
|
+
let a = getComputedStyle(n).color;
|
|
1022
|
+
return n.style.color = r, a || e;
|
|
1023
|
+
}
|
|
1024
|
+
let h = D(s.value.palette);
|
|
1025
|
+
function g() {
|
|
1026
|
+
if (r.getPalette) {
|
|
1027
|
+
h.value = r.getPalette();
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
if (o.value, r.color) {
|
|
1031
|
+
let e = m(r.color);
|
|
1032
|
+
if (e.includes("var(") || e.includes("light-dark(")) return;
|
|
1033
|
+
let t = u(e);
|
|
1034
|
+
h.value = [{
|
|
1035
|
+
L: Math.max(.5, t.L),
|
|
1036
|
+
C: Math.max(.12, t.C),
|
|
1037
|
+
h: t.h
|
|
1038
|
+
}, {
|
|
1039
|
+
L: Math.min(.9, t.L + .22),
|
|
1040
|
+
C: t.C * .4,
|
|
1041
|
+
h: t.h + 18
|
|
1042
|
+
}];
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
h.value = s.value.palette;
|
|
1046
|
+
}
|
|
1047
|
+
let v = () => h.value, S = new Proxy({}, {
|
|
1048
|
+
get: (e, t) => Reflect.get(s.value, t),
|
|
1049
|
+
has: (e, t) => Reflect.has(s.value, t),
|
|
1050
|
+
ownKeys: () => Reflect.ownKeys(s.value),
|
|
1051
|
+
getOwnPropertyDescriptor: (e, t) => Reflect.getOwnPropertyDescriptor(s.value, t)
|
|
1052
|
+
});
|
|
1053
|
+
function T(e) {
|
|
1054
|
+
let t = i.value;
|
|
1055
|
+
!t || !e || t.style.setProperty("--ff-head-xy", `${e.x.toFixed(4)} ${e.y.toFixed(4)}`);
|
|
1056
|
+
}
|
|
1057
|
+
let A = ye(a, {
|
|
1058
|
+
config: S,
|
|
1059
|
+
getSpectrum: l,
|
|
1060
|
+
getPalette: v,
|
|
1061
|
+
freeze: () => r.freeze,
|
|
1062
|
+
onHeadFrame: T
|
|
1063
|
+
});
|
|
1064
|
+
function j() {
|
|
1065
|
+
let e = i.value;
|
|
1066
|
+
if (!e) return;
|
|
1067
|
+
let t = h.value[0];
|
|
1068
|
+
t && e.style.setProperty("--ff-head-hue", `${t.h.toFixed(1)}`);
|
|
1069
|
+
}
|
|
1070
|
+
return k(() => r.config, () => A.wake(), { deep: !0 }), k([
|
|
1071
|
+
() => r.color,
|
|
1072
|
+
() => r.getPalette,
|
|
1073
|
+
o
|
|
1074
|
+
], g, { immediate: !0 }), k(h, j), w(() => {
|
|
1075
|
+
g(), j();
|
|
1076
|
+
}), k(o, () => A.wake()), k(() => r.freeze, () => A.wake()), n({
|
|
1077
|
+
backend: () => A.backend,
|
|
1078
|
+
pause: A.pause,
|
|
1079
|
+
resume: A.resume,
|
|
1080
|
+
wake: A.wake,
|
|
1081
|
+
renderAt: A.renderAt,
|
|
1082
|
+
setHeadT: A.setHeadT,
|
|
1083
|
+
headUnit: A.headUnit
|
|
1084
|
+
}), (e, t) => (E(), b("div", {
|
|
194
1085
|
ref_key: "hostRef",
|
|
195
|
-
ref:
|
|
196
|
-
class: "fourier-field"
|
|
197
|
-
}, [
|
|
1086
|
+
ref: i,
|
|
1087
|
+
class: C(["fourier-field", { "fourier-field--interactive": s.value.interactive }])
|
|
1088
|
+
}, [x("canvas", {
|
|
198
1089
|
ref_key: "canvasRef",
|
|
199
|
-
ref:
|
|
1090
|
+
ref: a,
|
|
200
1091
|
class: "fourier-field-canvas",
|
|
201
1092
|
"aria-hidden": "true"
|
|
202
|
-
}, null, 512)],
|
|
1093
|
+
}, null, 512)], 2));
|
|
203
1094
|
}
|
|
204
|
-
}), [["__scopeId", "data-v-
|
|
1095
|
+
}), [["__scopeId", "data-v-4914c4f3"]]);
|
|
205
1096
|
//#endregion
|
|
206
|
-
export {
|
|
1097
|
+
export { L as DEFAULT_FOURIER_CONFIG, be as FourierField, j as MAX_CURVE_SAMPLES, A as MAX_PHASORS, I as WARM_IDENTITY_PALETTE, v as comp, g as dftFromPoints, _ as makeEllipticSpectrum, h as partialSumAt, m as positionsAt, ye as useFourierField };
|