@mkbabb/glass-ui 4.1.0 → 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.
Files changed (430) hide show
  1. package/dist/{CardAction-8whJrLWt.js → CardAction-DlVP2evz.js} +58 -54
  2. package/dist/{CommandShortcut-D3yxgHNn.js → CommandShortcut-By-VQcLO.js} +3 -3
  3. package/dist/{ConfiguratorRow-CaP7U3ZA.js → ConfiguratorRow-YMXdINHx.js} +3 -3
  4. package/dist/{ContextMenuContent-B3ZsheLV.js → ContextMenuContent-CMWn6huB.js} +1 -1
  5. package/dist/{ContextMenuSubContent-DDRID3qC.js → ContextMenuSubContent-DvwWCUc0.js} +1 -1
  6. package/dist/{DataTable-Bc9kUtu_.js → DataTable-C4tG3eIJ.js} +4 -4
  7. package/dist/DialogContent-D8U9ZfWS.js +121 -0
  8. package/dist/{DialogScrollContent-TTuovQst.js → DialogScrollContent-BMekN7gq.js} +1 -1
  9. package/dist/{FadingScroll-DLRbH5Xr.js → FadingScroll-P8B30rAD.js} +1 -1
  10. package/dist/{HoverCardContent-Bel1gdLZ.js → HoverCardContent-DAmGYglo.js} +1 -1
  11. package/dist/{HoverPopover-BcIxvyqZ.js → HoverPopover-DYpBOzzF.js} +1 -1
  12. package/dist/{IconChip-DhbdGdFQ.js → IconChip-CQa7XZYc.js} +7 -5
  13. package/dist/{IconTooltip-B0zimd2H.js → IconTooltip-_df8M3xm.js} +1 -1
  14. package/dist/{Input-Cg9DF62r.js → Input-CyU4_hIC.js} +2 -2
  15. package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
  16. package/dist/{Notification-CphK7AAm.js → Notification-BlSPJhtZ.js} +1 -1
  17. package/dist/{NumberFieldContent-D8cXeyO4.js → NumberFieldContent-Z3VxGu_6.js} +3 -3
  18. package/dist/PagerDots-CYlqVFd4.js +196 -0
  19. package/dist/PaperBackdrop-DYWgrnh8.js +42 -0
  20. package/dist/{PopoverContent-DL7E6vJP.js → PopoverContent-BuKyHZSz.js} +2 -2
  21. package/dist/{Progress-CnqB7gLm.js → Progress-C9SsdwIZ.js} +1 -1
  22. package/dist/{ScrollingText-CTZbA_cG.js → ScrollingText-DY3W1Jfh.js} +2 -2
  23. package/dist/{SelectScrollDownButton-DAKCBEdW.js → SelectScrollDownButton-3mFHX_R-.js} +15 -12
  24. package/dist/{Switch-B8RscmRu.js → Switch-uf-UKPA2.js} +1 -1
  25. package/dist/{Toaster-D9qIHjBI.js → Toaster-ozrsR4mP.js} +1 -1
  26. package/dist/{ToggleGroupItem-BLtr3TJq.js → ToggleGroupItem-BpzaVzNm.js} +4 -4
  27. package/dist/{TooltipProvider-BJ_Y5EGX.js → TooltipProvider-QQVM_80r.js} +1 -1
  28. package/dist/animated-digit.js +2 -2
  29. package/dist/api/index.d.ts +1 -0
  30. package/dist/api/types-extra.d.ts +3 -1
  31. package/dist/api.js +2 -2
  32. package/dist/aurora.js +163 -131
  33. package/dist/badge-Bt14yURi.js +72 -0
  34. package/dist/badge.js +1 -1
  35. package/dist/border-progress.js +1 -1
  36. package/dist/button-D1W9PrzI.js +130 -0
  37. package/dist/button.js +1 -1
  38. package/dist/canvas.js +1 -1
  39. package/dist/card.js +1 -1
  40. package/dist/carousel.js +227 -98
  41. package/dist/chipVariants-BJQ0I2kB.js +18 -0
  42. package/dist/collapsible.js +1 -1
  43. package/dist/color.js +1 -1
  44. package/dist/command.js +1 -1
  45. package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
  46. package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +1 -1
  47. package/dist/components/custom/aurora/constants/presets.d.ts +29 -0
  48. package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
  49. package/dist/components/custom/aurora/index.d.ts +1 -1
  50. package/dist/components/custom/concentric/Concentric.vue.d.ts +15 -12
  51. package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +8 -3
  52. package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +8 -4
  53. package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
  54. package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -4
  55. package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
  56. package/dist/components/custom/concentric/constants.d.ts +62 -41
  57. package/dist/components/custom/concentric/index.d.ts +2 -2
  58. package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +2 -2
  59. package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -1
  60. package/dist/components/custom/configurator/Configurator.vue.d.ts +23 -2
  61. package/dist/components/custom/configurator/index.d.ts +1 -1
  62. package/dist/components/custom/dock/DockDropdownTrigger.vue.d.ts +4 -3
  63. package/dist/components/custom/dock/DockIconButton.vue.d.ts +10 -0
  64. package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
  65. package/dist/components/custom/dock/DockStack.vue.d.ts +35 -22
  66. package/dist/components/custom/dock/GlassDock.vue.d.ts +19 -3
  67. package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
  68. package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +76 -145
  69. package/dist/components/custom/dock/composables/index.d.ts +1 -0
  70. package/dist/components/custom/dock/composables/railProjection.d.ts +45 -0
  71. package/dist/components/custom/dock/composables/useDockContextSilhouette.d.ts +192 -0
  72. package/dist/components/custom/dock/composables/useDockFission.d.ts +158 -0
  73. package/dist/components/custom/dock/composables/useDockItemDrag.d.ts +18 -0
  74. package/dist/components/custom/dock/composables/useDockShellProps.d.ts +38 -0
  75. package/dist/components/custom/dock/constants.d.ts +14 -3
  76. package/dist/components/custom/dock/index.d.ts +3 -0
  77. package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +21 -0
  78. package/dist/components/custom/dot-flow-field/composables/flowGLProgram.d.ts +8 -0
  79. package/dist/components/custom/dot-flow-field/composables/flowSetupGL.d.ts +9 -0
  80. package/dist/components/custom/dot-flow-field/composables/flowSetupGLFlow.d.ts +12 -0
  81. package/dist/components/custom/dot-flow-field/composables/flowSetupWGPU.d.ts +7 -0
  82. package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +28 -2
  83. package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -17
  84. package/dist/components/custom/dot-flow-field/constants.d.ts +51 -0
  85. package/dist/components/custom/dot-flow-field/index.d.ts +1 -1
  86. package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -1
  87. package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +29 -0
  88. package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -1
  89. package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +10 -1
  90. package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +7 -0
  91. package/dist/components/custom/dot-matrix/constants.d.ts +14 -0
  92. package/dist/components/custom/dot-matrix/index.d.ts +1 -1
  93. package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +2 -2
  94. package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -1
  95. package/dist/components/custom/fourier-field/FourierField.vue.d.ts +4 -0
  96. package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +9 -0
  97. package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +11 -0
  98. package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +16 -1
  99. package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +22 -1
  100. package/dist/components/custom/fourier-field/constants.d.ts +53 -0
  101. package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +1 -1
  102. package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -1
  103. package/dist/components/custom/goo-blob/composables/easing.d.ts +1 -0
  104. package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +1 -0
  105. package/dist/components/custom/goo-blob/constants.d.ts +26 -1
  106. package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
  107. package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -1
  108. package/dist/components/custom/goo-blob/types.d.ts +50 -1
  109. package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +32 -3
  110. package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +14 -4
  111. package/dist/components/custom/goo-dot-matrix/constants.d.ts +55 -16
  112. package/dist/components/custom/goo-dot-matrix/index.d.ts +1 -1
  113. package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +2 -0
  114. package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +1 -0
  115. package/dist/components/custom/goo-filter/GooFilter.vue.d.ts +22 -0
  116. package/dist/components/custom/goo-filter/index.d.ts +1 -0
  117. package/dist/components/custom/handmark/brush.d.ts +17 -17
  118. package/dist/components/custom/handmark/constants.d.ts +28 -8
  119. package/dist/components/custom/handmark/geometry.d.ts +34 -1
  120. package/dist/components/custom/handmark/index.d.ts +1 -1
  121. package/dist/components/custom/icon-chip/types.d.ts +10 -0
  122. package/dist/components/custom/paper-backdrop/PaperBackdrop.vue.d.ts +18 -0
  123. package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +44 -29
  124. package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +2 -0
  125. package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +3 -1
  126. package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +2 -2
  127. package/dist/components/custom/paper-grid/constants.d.ts +44 -6
  128. package/dist/components/custom/paper-grid/index.d.ts +2 -2
  129. package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +1 -1
  130. package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -1
  131. package/dist/components/custom/selectable-chip/chipVariants.d.ts +39 -0
  132. package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +12 -20
  133. package/dist/components/custom/tabs/constants.d.ts +16 -8
  134. package/dist/components/custom/timeline/ScrubberTimeline.vue.d.ts +16 -0
  135. package/dist/components/custom/timeline/geometry.d.ts +0 -8
  136. package/dist/components/custom/toggle-chip/index.d.ts +15 -4
  137. package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +12 -10
  138. package/dist/components/ui/_shared/useSurfaceAxis.d.ts +17 -3
  139. package/dist/components/ui/badge/Badge.vue.d.ts +14 -0
  140. package/dist/components/ui/badge/index.d.ts +1 -0
  141. package/dist/components/ui/button/Button.vue.d.ts +1 -0
  142. package/dist/components/ui/card/Card.vue.d.ts +1 -1
  143. package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
  144. package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
  145. package/dist/components/ui/dialog/DialogContent.vue.d.ts +9 -0
  146. package/dist/components/ui/drawer/Drawer.vue.d.ts +33 -14
  147. package/dist/components/ui/drawer/constants.d.ts +8 -6
  148. package/dist/components/ui/drawer/index.d.ts +12 -2
  149. package/dist/components/ui/select/SelectContent.vue.d.ts +9 -0
  150. package/dist/components/ui/slider/Slider.vue.d.ts +9 -0
  151. package/dist/composables/dom/index.d.ts +1 -0
  152. package/dist/composables/dom/useDragVelocity.d.ts +46 -0
  153. package/dist/composables/glass/wave/index.d.ts +4 -0
  154. package/dist/composables/glass/wave/waveField.d.ts +115 -0
  155. package/dist/composables/glass/wave/waveField.glsl.d.ts +1 -0
  156. package/dist/composables/glass/wave/waveField.wgsl.d.ts +1 -0
  157. package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +95 -2
  158. package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
  159. package/dist/composables/glass/webgpu/index.d.ts +1 -0
  160. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +37 -0
  161. package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +49 -2
  162. package/dist/composables/glass/webgpu/webgpuDevice.d.ts +1 -1
  163. package/dist/composables/motion/core/index.d.ts +4 -0
  164. package/dist/composables/motion/core/useHaptic.d.ts +48 -0
  165. package/dist/composables/motion/core/writeVelocityWeight.d.ts +31 -0
  166. package/dist/composables/motion/index.d.ts +2 -0
  167. package/dist/composables/motion/springPresets.d.ts +16 -17
  168. package/dist/composables/motion/suite.d.ts +2 -2
  169. package/dist/composables/motion/useBloomUp.d.ts +97 -0
  170. package/dist/composables/motion/useCelebrationBurst.d.ts +50 -0
  171. package/dist/composables/motion/useDockCtaReceive.d.ts +10 -28
  172. package/dist/composables/motion/useGooMorph.d.ts +72 -0
  173. package/dist/composables/motion/useLiquidFlex.d.ts +18 -0
  174. package/dist/composables/motion/useLiquidMorph.d.ts +108 -0
  175. package/dist/composables/motion/useLiquidPress.d.ts +12 -0
  176. package/dist/composables/motion/useLiquidReveal.d.ts +7 -4
  177. package/dist/composables/motion/useMorphField.d.ts +157 -0
  178. package/dist/composables/motion/useScrollPin.d.ts +49 -0
  179. package/dist/composables/motion/useScrollScene.d.ts +67 -0
  180. package/dist/concentric.js +532 -563
  181. package/dist/configurator.js +2 -2
  182. package/dist/confirm-dialog.js +3 -3
  183. package/dist/constellation.js +4 -4
  184. package/dist/context-menu.js +2 -2
  185. package/dist/controls.js +2 -2
  186. package/dist/createCanvasLifecycle-CuCrGRfq.js +173 -0
  187. package/dist/dark.js +1 -1
  188. package/dist/data-table.js +1 -1
  189. package/dist/deck.js +1 -1
  190. package/dist/dialog.js +3 -3
  191. package/dist/dock.js +1163 -618
  192. package/dist/dockContext-gFVS2gMg.js +18 -0
  193. package/dist/dom.js +7 -6
  194. package/dist/dot-flow-field.js +1114 -523
  195. package/dist/dot-matrix.js +348 -204
  196. package/dist/drawer.js +106 -96
  197. package/dist/{dropdown-menu-aJmV5SqE.js → dropdown-menu-CCfcCQ68.js} +3 -3
  198. package/dist/dropdown-menu.js +1 -1
  199. package/dist/easing.js +3 -3
  200. package/dist/expandable-container.js +2 -2
  201. package/dist/fading-scroll.js +1 -1
  202. package/dist/forms.js +6 -6
  203. package/dist/fourier-field.js +441 -197
  204. package/dist/fourier-math.js +1 -1
  205. package/dist/glass-panel.js +2 -2
  206. package/dist/glass-ui.css +1 -1
  207. package/dist/glass-ui.js +139 -135
  208. package/dist/goo-blob.js +11 -9
  209. package/dist/goo-dot-matrix.js +418 -198
  210. package/dist/handmark.js +137 -94
  211. package/dist/header-ribbon.js +1 -1
  212. package/dist/hover-card.js +1 -1
  213. package/dist/hover-popover.js +1 -1
  214. package/dist/icon-chip.js +1 -1
  215. package/dist/icon-tooltip.js +1 -1
  216. package/dist/index.d.ts +3 -0
  217. package/dist/instrument-chassis.js +1 -1
  218. package/dist/keyboard.js +1 -1
  219. package/dist/label.js +1 -1
  220. package/dist/labeled-field.js +7 -7
  221. package/dist/metric-badge.js +1 -1
  222. package/dist/metric-cell.js +1 -1
  223. package/dist/metric-stack.js +1 -1
  224. package/dist/motion-core.js +42 -39
  225. package/dist/motion-curves.js +20 -14
  226. package/dist/motion.js +226 -26
  227. package/dist/notification.js +1 -1
  228. package/dist/number-field.js +1 -1
  229. package/dist/pager-dots.js +1 -1
  230. package/dist/paper-backdrop.js +1 -1
  231. package/dist/paper-grid.js +315 -342
  232. package/dist/paperGrid-CXCSMbZ1.js +191 -0
  233. package/dist/popover.js +1 -1
  234. package/dist/{presets-CvOUqtdY.js → presets-QvYgnFIZ.js} +13 -12
  235. package/dist/progress.js +1 -1
  236. package/dist/pulse.js +1 -1
  237. package/dist/reactive.js +2 -2
  238. package/dist/{resolveCanvasColor-yPyIpJt9.js → resolveCanvasColor-DsSJk06I.js} +5 -5
  239. package/dist/scrolling-text.js +1 -1
  240. package/dist/search.js +7 -7
  241. package/dist/select.js +3 -3
  242. package/dist/selectable-chip.js +18 -35
  243. package/dist/separator.js +1 -1
  244. package/dist/{sheet-B2flBfLH.js → sheet-DUCIoOe0.js} +3 -3
  245. package/dist/sheet.js +1 -1
  246. package/dist/sidebar.js +1 -1
  247. package/dist/slider-CcICPe3u.js +149 -0
  248. package/dist/slider.js +1 -1
  249. package/dist/sortable-list.js +3 -3
  250. package/dist/{spectrum-walk-BVzA7Biz.js → spectrum-walk-cBNSx_zm.js} +1 -1
  251. package/dist/springPresets-DfoQ6XRY.js +64 -0
  252. package/dist/stacked-icons.js +54 -39
  253. package/dist/styles/cards.css +202 -2
  254. package/dist/styles/components.css +1 -3
  255. package/dist/styles/configurator.css +172 -7
  256. package/dist/styles/critical-partition.mjs +35 -2
  257. package/dist/styles/deferred.css +2 -0
  258. package/dist/styles/dock/adaptive-legibility.css +119 -0
  259. package/dist/styles/dock/density.css +18 -10
  260. package/dist/styles/dock/fission-bridge.css +552 -0
  261. package/dist/styles/dock/layers.css +88 -124
  262. package/dist/styles/dock/morph-bridge.css +15 -2
  263. package/dist/styles/dock/morph.css +45 -114
  264. package/dist/styles/dock/shape.css +137 -11
  265. package/dist/styles/dock/shell.css +1 -3
  266. package/dist/styles/dock/stack-rail.css +95 -7
  267. package/dist/styles/dock-controls/icon-button.css +34 -2
  268. package/dist/styles/dock-controls/triggers.css +23 -1
  269. package/dist/styles/dock-controls.css +18 -0
  270. package/dist/styles/dock.css +16 -1
  271. package/dist/styles/drawer.css +166 -0
  272. package/dist/styles/glass/glass-atom.css +244 -0
  273. package/dist/styles/glass/glass-capsule.css +143 -0
  274. package/dist/styles/glass/glass-chip.css +215 -0
  275. package/dist/styles/glass/liquid-enter.css +252 -0
  276. package/dist/styles/glass/liquid-morph.css +850 -0
  277. package/dist/styles/glass/material.css +70 -1
  278. package/dist/styles/glass/reveal.css +22 -2
  279. package/dist/styles/glass/rim.css +13 -1
  280. package/dist/styles/glass/surfaces.css +18 -8
  281. package/dist/styles/glass.css +11 -0
  282. package/dist/styles/icon-chip.css +45 -0
  283. package/dist/styles/index.css +11 -0
  284. package/dist/styles/jubilance.css +65 -0
  285. package/dist/styles/motion/morph-field.css +229 -0
  286. package/dist/styles/paper.css +230 -14
  287. package/dist/styles/scroll-choreography.css +135 -78
  288. package/dist/styles/segmented-tabs.css +85 -51
  289. package/dist/styles/select.css +151 -0
  290. package/dist/styles/tokens/color-radius.css +1 -1
  291. package/dist/styles/tokens/dark-arm.css +57 -8
  292. package/dist/styles/tokens/glass-deep.css +8 -4
  293. package/dist/styles/tokens/glass-fx.css +80 -2
  294. package/dist/styles/tokens/glass.css +140 -8
  295. package/dist/styles/tokens/light-dark.css +2 -2
  296. package/dist/styles/tokens/property-regs.css +144 -0
  297. package/dist/styles/tokens/scale-paper.css +20 -8
  298. package/dist/styles/tokens/scheme-motion.css +92 -157
  299. package/dist/styles/tokens/scheme-spring.css +239 -0
  300. package/dist/styles/tokens/scroll-tokens.css +15 -15
  301. package/dist/styles/tokens/shadow.css +73 -13
  302. package/dist/styles/tokens.css +9 -2
  303. package/dist/styles/utilities/btn.css +70 -0
  304. package/dist/switch.js +1 -1
  305. package/dist/tabs.js +198 -181
  306. package/dist/timeline.js +241 -206
  307. package/dist/toast.js +1 -1
  308. package/dist/toggle-chip.js +14 -41
  309. package/dist/toggle-group.js +1 -1
  310. package/dist/tooltip.js +1 -1
  311. package/dist/typewriter.js +1 -1
  312. package/dist/{uniformBridgeWGPU-CtAKl45L.js → uniformBridgeWGPU-BCse1SHU.js} +191 -127
  313. package/dist/{useAnimatedNumber-CLrxicG9.js → useAnimatedNumber-BntskVdQ.js} +1 -1
  314. package/dist/{useConfiguratorState-4xblKfwd.js → useConfiguratorState-22BcULzF.js} +37 -35
  315. package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
  316. package/dist/{useDragMorph-BUgAC-zK.js → useDragMorph-DGLSewwB.js} +2 -2
  317. package/dist/useDragVelocity-CjcfX3dA.js +57 -0
  318. package/dist/useGooMorph-Cs13NgYL.js +104 -0
  319. package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
  320. package/dist/{useViewTransition-CUI1nAgn.js → useHaptic-CPz5BT9I.js} +40 -1
  321. package/dist/{useLiquidFlex-UmA6LMZu.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
  322. package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
  323. package/dist/useMorphField-ogBM7ubT.js +141 -0
  324. package/dist/{useScrollChrome-D66AVP7C.js → useScrollChrome-JuImi1DM.js} +2 -2
  325. package/dist/{useSpringMount-BWDnKIwh.js → useSpringMount-DFxtzmkR.js} +1 -1
  326. package/dist/{useSpringPress-B1-Czp-V.js → useSpringPress-VM9RgVq3.js} +1 -1
  327. package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
  328. package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
  329. package/dist/virtual.js +1 -1
  330. package/dist/watercolor-dot.js +16 -26
  331. package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
  332. package/package.json +14 -3
  333. package/src/styles/cards.css +202 -2
  334. package/src/styles/configurator.css +172 -7
  335. package/src/styles/critical-partition.mjs +35 -2
  336. package/src/styles/dock/adaptive-legibility.css +119 -0
  337. package/src/styles/dock/density.css +18 -10
  338. package/src/styles/dock/fission-bridge.css +552 -0
  339. package/src/styles/dock/layers.css +88 -124
  340. package/src/styles/dock/morph-bridge.css +15 -2
  341. package/src/styles/dock/morph.css +45 -114
  342. package/src/styles/dock/shape.css +137 -11
  343. package/src/styles/dock/shell.css +1 -3
  344. package/src/styles/dock/stack-rail.css +95 -7
  345. package/src/styles/dock-controls/icon-button.css +34 -2
  346. package/src/styles/dock-controls/triggers.css +23 -1
  347. package/src/styles/dock-controls.css +18 -0
  348. package/src/styles/dock.css +16 -1
  349. package/src/styles/drawer.css +164 -0
  350. package/src/styles/glass/glass-atom.css +244 -0
  351. package/src/styles/glass/glass-capsule.css +143 -0
  352. package/src/styles/glass/glass-chip.css +215 -0
  353. package/src/styles/glass/liquid-enter.css +252 -0
  354. package/src/styles/glass/liquid-morph.css +850 -0
  355. package/src/styles/glass/material.css +70 -1
  356. package/src/styles/glass/reveal.css +22 -2
  357. package/src/styles/glass/rim.css +13 -1
  358. package/src/styles/glass/surfaces.css +18 -8
  359. package/src/styles/glass.css +11 -0
  360. package/src/styles/icon-chip.css +45 -0
  361. package/src/styles/index.css +11 -0
  362. package/src/styles/jubilance.css +65 -0
  363. package/src/styles/motion/morph-field.css +229 -0
  364. package/src/styles/paper.css +230 -14
  365. package/src/styles/scroll-choreography.css +135 -78
  366. package/src/styles/segmented-tabs.css +85 -47
  367. package/src/styles/select.css +151 -0
  368. package/src/styles/tokens/color-radius.css +1 -1
  369. package/src/styles/tokens/dark-arm.css +57 -8
  370. package/src/styles/tokens/glass-deep.css +8 -4
  371. package/src/styles/tokens/glass-fx.css +80 -2
  372. package/src/styles/tokens/glass.css +140 -8
  373. package/src/styles/tokens/light-dark.css +2 -2
  374. package/src/styles/tokens/property-regs.css +144 -0
  375. package/src/styles/tokens/scale-paper.css +20 -8
  376. package/src/styles/tokens/scheme-motion.css +92 -157
  377. package/src/styles/tokens/scheme-spring.css +239 -0
  378. package/src/styles/tokens/scroll-tokens.css +15 -15
  379. package/src/styles/tokens/shadow.css +73 -13
  380. package/src/styles/tokens.css +9 -2
  381. package/src/styles/utilities/btn.css +70 -0
  382. package/dist/DialogContent-6JtTB5x2.js +0 -106
  383. package/dist/PagerDots-Cjx96la-.js +0 -98
  384. package/dist/PaperBackdrop-CqwjnfLv.js +0 -31
  385. package/dist/badge-D9XWW4GT.js +0 -53
  386. package/dist/button-5dY1Dvhd.js +0 -125
  387. package/dist/components/custom/concentric/composables/ringField.d.ts +0 -85
  388. package/dist/createCanvasLifecycle-Gh45Ce-p.js +0 -93
  389. package/dist/dockContext-BNfyPLe9.js +0 -17
  390. package/dist/slider-2A0rPn79.js +0 -142
  391. package/dist/springPresets-Ce7OYCm9.js +0 -46
  392. package/dist/useDockCtaReceive-DfFkmgL1.js +0 -82
  393. package/dist/useGpuSubstrate-4pTcp6mX.js +0 -294
  394. package/dist/useLiquidPress-BooG97RY.js +0 -39
  395. /package/dist/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
  396. /package/dist/{DialogFooter-9phqcRIS.js → DialogFooter-DoLy0ewI.js} +0 -0
  397. /package/dist/{InstrumentChassis-CxsHSyMj.js → InstrumentChassis-UUJX0-mW.js} +0 -0
  398. /package/dist/{Label-C2ejNWeC.js → Label-B_HPqi_q.js} +0 -0
  399. /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-DfAf7o15.js} +0 -0
  400. /package/dist/{SelectGroup-BFiod7X2.js → SelectGroup-Dcczq44n.js} +0 -0
  401. /package/dist/{SelectSeparator-C2UGOkXF.js → SelectSeparator-CNRGG7Ew.js} +0 -0
  402. /package/dist/{Separator-DQcwC2TR.js → Separator-Cf9-JFgi.js} +0 -0
  403. /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
  404. /package/dist/{color-Cs0-oxYL.js → color-B9jZdhJX.js} +0 -0
  405. /package/dist/{compile-nZ1xVYTp.js → compile-INR_tPk_.js} +0 -0
  406. /package/dist/{constants--C2DkLW8.js → constants-BWj7DkMn.js} +0 -0
  407. /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
  408. /package/dist/{dotMatrixField-D_x9_1qq.js → dotMatrixField-CRO0ZFk4.js} +0 -0
  409. /package/dist/{flow.glsl-B2P7e0MT.js → flow.glsl-DqEGRpl4.js} +0 -0
  410. /package/dist/{math-Eb0w3LqU.js → math-5RcIgCB4.js} +0 -0
  411. /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
  412. /package/dist/{prng-B-d9eYX8.js → prng-B5tIXTtj.js} +0 -0
  413. /package/dist/{procedural-color.wgsl-m7Zgv35j.js → procedural-color.wgsl-C1Y5PkM6.js} +0 -0
  414. /package/dist/{scrollReader-DI1NWxUw.js → scrollReader-rc3Ns_NM.js} +0 -0
  415. /package/dist/{useControlSize-SH1UmJCi.js → useControlSize-DAZ062x7.js} +0 -0
  416. /package/dist/{useFuzzySearch-DIhcYtcw.js → useFuzzySearch-0fTYOhS4.js} +0 -0
  417. /package/dist/{useGlobalDark-CmjB9E32.js → useGlobalDark-B4HO9LXG.js} +0 -0
  418. /package/dist/{useIntersectionPause-Dbozzjgm.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
  419. /package/dist/{useInterval-CNdua40W.js → useInterval-BVUI-sez.js} +0 -0
  420. /package/dist/{useKeyboardShortcuts-BPRp33Im.js → useKeyboardShortcuts-BEut54Tk.js} +0 -0
  421. /package/dist/{usePointerVelocityField-QLsy3_kv.js → usePointerVelocityField-BrkqZFhj.js} +0 -0
  422. /package/dist/{useResizeObserver-Bpoi7tRE.js → useResizeObserver-DdEn3v2f.js} +0 -0
  423. /package/dist/{useResolveTokenColor-vAylyR0x.js → useResolveTokenColor-ChOnCckA.js} +0 -0
  424. /package/dist/{useScrollProgress-c3yxmH6a.js → useScrollProgress-A0M6qRl7.js} +0 -0
  425. /package/dist/{useSortable-BVqlJRBR.js → useSortable-DQV_UNDw.js} +0 -0
  426. /package/dist/{useTextHighlight-NmBM5V_4.js → useTextHighlight-Bma3UlKA.js} +0 -0
  427. /package/dist/{useTimer-BHJOKr35.js → useTimer-BBLGPXR8.js} +0 -0
  428. /package/dist/{useUserInvalidAria-y5namzeE.js → useUserInvalidAria-EmmwWPOl.js} +0 -0
  429. /package/dist/{useViewportReady-anbac3m6.js → useViewportReady-C9pYnn7K.js} +0 -0
  430. /package/dist/{vReveal-D9k0jADx.js → vReveal-CT1KtwZA.js} +0 -0
@@ -1,9 +1,9 @@
1
- import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
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 { a as l, c as u, d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./dotMatrixField-D_x9_1qq.js";
1
+ import { t as e } from "./_plugin-vue_export-helper-gLzyemvl.js";
2
+ import { t } from "./usePointerVelocityField-BrkqZFhj.js";
3
+ import { n, o as r, r as i, s as a } from "./procedural-color.wgsl-C1Y5PkM6.js";
4
+ import { a as o, t as s } from "./useGpuSubstrate-Ceet70xq.js";
5
+ import { c } from "./color-B9jZdhJX.js";
6
+ import { a as l, c as u, d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./dotMatrixField-CRO0ZFk4.js";
7
7
  import { computed as b, createElementBlock as x, createElementVNode as S, defineComponent as C, normalizeStyle as w, onScopeDispose as T, openBlock as E, useTemplateRef as D, watch as O } from "vue";
8
8
  //#region src/components/custom/dot-matrix/shaders/dot-matrix.wgsl.ts
9
9
  var k = `
@@ -13,6 +13,25 @@ const MAX_DOT_STOPS: i32 = 4;
13
13
  // The golden-angle constant (transcribes dotMatrixField.ts GOLDEN_ANGLE = PI*(3-sqrt5)).
14
14
  const GOLDEN_ANGLE: f32 = 2.399963229728653;
15
15
 
16
+ // ── The √φ proportion ladder (the liquid-lens constants; Aristotelian, no magic numbers) ──
17
+ const PHI: f32 = 1.618033988749895; // the golden ratio φ
18
+ const SQRT_PHI: f32 = 1.272019649514069; // √φ
19
+ const INV_SQRT_PHI: f32 = 0.7861513777574233; // 1/√φ ≈ the squash/stretch cap
20
+ const INV_PHI2: f32 = 0.3819660112501051; // 1/φ² ≈ the anticipation-lead rung
21
+ // The velocity (normalized-host/sec) → NDC/lens-frame scale: a sweep across the host reads as a
22
+ // strong-but-bounded ellipse. The lens constants ladder off √φ off this scaled vmag.
23
+ const VEL_SCALE: f32 = 0.18;
24
+ const STRETCH_GAIN: f32 = 2.4; // vmag → ellipse eccentricity gain
25
+ const WAKE_GAIN: f32 = 12.0; // the comet-tail displacement gain (spike-calibrated)
26
+ const LENS_MAGNIFY: f32 = SQRT_PHI; // the dot SWELLS √φ× under the lens core (over the 0.8 base)
27
+ const RIM_CHROMA: f32 = 1.0; // the chromatic-rim tone gain (samples the warmer amber stop)
28
+ const VIGNETTE_FLOOR: f32 = INV_PHI2; // the resting center-clear floor (dense edges, clear center)
29
+ // The cartoon 1940s offset-cast: a darkened, lower-α, offset duplicate billboard (the SAME
30
+ // instanced draw, verts 6..11). The light vector is a √φ-proportioned down-right cast.
31
+ const CAST_OFFSET: f32 = 0.9; // the cast displacement (× dot radius), down-right
32
+ const CAST_DARK: f32 = 0.0; // the cast samples pure-dark (a shadow lobe, not a tint)
33
+ const CAST_ALPHA: f32 = 0.55; // the cast's lower opacity (under the lit dot)
34
+
16
35
  struct Dot {
17
36
  // (unitPos.xyz, sphereIdx)
18
37
  data: vec4<f32>,
@@ -32,6 +51,10 @@ struct Uniforms {
32
51
  u4: vec4<f32>,
33
52
  // u5: (uSphere2OffsetX, uSphere2OffsetY, uHasBackground, _pad)
34
53
  u5: vec4<f32>,
54
+ // u6: (uLayout, uGravityStrength, uGravityRadius, uPlaneScale) // layout: 0 sphere · 1 plane
55
+ u6: vec4<f32>,
56
+ // u7: (uVelX, uVelY, uTwinkleRate, uWakeStrength) // the reclaimed travel-velocity lane
57
+ u7: vec4<f32>,
35
58
  spin: mat3x3<f32>,
36
59
  // ints: (uStopCount, uDotCount, uSpheres, _pad)
37
60
  ints: vec4<i32>,
@@ -52,6 +75,12 @@ fn facingTerm(n: vec3<f32>) -> f32 {
52
75
  return clamp(n.z * 0.5 + 0.5, 0.0, 1.0); // 1 = dead-front, 0 = dead-back
53
76
  }
54
77
 
78
+ // A 2D dot product — the local 'let dot = dots[ii].data' SHADOWS the WGSL 'dot()' builtin
79
+ // inside vs_main, so the lens math calls this helper instead (the same value, un-shadowed).
80
+ fn dot2(a: vec2<f32>, b: vec2<f32>) -> f32 {
81
+ return a.x * b.x + a.y * b.y;
82
+ }
83
+
55
84
  // Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
56
85
  fn samplePaletteLin(t: f32) -> vec3<f32> {
57
86
  let stopCount = u.ints.x;
@@ -72,6 +101,7 @@ struct VSOut {
72
101
  @location(1) bright: f32, // facing-driven brightness [0, ~1.6]
73
102
  @location(2) alpha: f32, // facing-driven opacity
74
103
  @location(3) tone: f32, // palette tone (0 = bright cream near-front, 1 = amber rim)
104
+ @location(4) cast: f32, // 1 = the cartoon offset-cast shadow billboard, 0 = the lit dot
75
105
  };
76
106
 
77
107
  @vertex
@@ -80,81 +110,166 @@ fn vs_main(
80
110
  @builtin(instance_index) ii: u32,
81
111
  ) -> VSOut {
82
112
  // Two-triangle quad corners in billboard-local space (camera-facing by construction).
113
+ // 12 verts/instance: 0..5 the LIT dot, 6..11 the cartoon offset-CAST shadow duplicate (the
114
+ // SAME instanced draw, zero new buffer — the 1940s layered-offset cast as a binding precept).
83
115
  var corners = array<vec2<f32>, 6>(
84
116
  vec2<f32>(-1.0, -1.0), vec2<f32>(1.0, -1.0), vec2<f32>(-1.0, 1.0),
85
117
  vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, -1.0), vec2<f32>(1.0, 1.0),
86
118
  );
87
- let local = corners[vi];
119
+ let isCast = vi >= 6u;
120
+ let local = corners[vi % 6u];
88
121
 
89
122
  let dot = dots[ii].data;
90
123
  var unitPos = dot.xyz; // the STATIC phyllotaxis position (JS-computed)
91
124
  let sphereIdx = dot.w;
92
125
 
93
- // The breathing radius pulse (transcribes breathRadius — 1 at rest).
94
126
  let breath = u.u4.w;
95
- // Per-sphere offset/scale (the reference two-globe composition).
96
- var sphereScale = u.u1.x; // uRadius
97
- var sphereOffset = vec2<f32>(0.0, 0.0);
98
- if (sphereIdx > 0.5) {
99
- sphereScale = u.u1.x * u.u4.z; // uRadius * uSphere2Scale
100
- sphereOffset = vec2<f32>(u.u5.x, u.u5.y); // uSphere2Offset
101
- }
102
-
103
- // The rotated surface NORMAL = spin · unitPos (the §T2 facing source). The spin matrix
104
- // is the slow tilted Y-rotation (dotMatrixField.ts spinMatrix).
105
- let n = u.spin * unitPos;
106
- let facing = facingTerm(n);
107
-
108
- // Pointer-repel/attract — a soft Gaussian dimple lifts the dot radially off the surface
109
- // near the cursor (the §T7 local perturbation). The pointer is in NDC (-1..1); a repel
110
- // (push>0) pushes the dot OUT, an attract (push<0) pulls IN. Velocity scales the push.
111
127
  let pAct = u.u3.w;
112
128
  let pointerNdc = vec2<f32>(u.u4.x * 2.0 - 1.0, 1.0 - u.u4.y * 2.0);
113
- let screenN = n.xy * sphereScale + sphereOffset;
114
- let toPointer = screenN - pointerNdc;
115
- let pd = length(toPointer);
116
- let dimple = exp(-pd * pd * 18.0) * u.u3.y * pAct; // soft Gaussian falloff × push
117
- // Lift along the rotated normal's screen projection (radially through the shell).
118
- let lift = n.xy * dimple;
119
-
120
- // Project the rotated normal to the screen (orthographic — the §T5 flat hero look),
121
- // scaled by the sphere radius + the breathing, plus the per-sphere offset + the dimple
122
- // lift + the pointer-parallax screen-center track.
123
- let parallaxOff = (pointerNdc) * u.u3.x * pAct; // uParallax · pointer · active
124
- let center2d = n.xy * sphereScale * breath + sphereOffset + lift + parallaxOff;
125
-
126
- // The depth-of-field dot-size taper (transcribes facingFade size): 0.6 + 0.4·facing,
127
- // plus the accel-burst bloom scale near the cursor.
128
- let sizeTaper = u.u2.z + u.u2.w * facing;
129
- let burstScale = 1.0 + u.u3.z * exp(-pd * pd * 12.0);
130
- let dotR = u.u1.y * sizeTaper * burstScale; // uDotSize · taper · burst
129
+ let isPlane = u.u6.x > 0.5;
130
+ let gravStrength = u.u6.y;
131
+ let gravRadius = max(u.u6.z, 1e-3);
132
+ let planeScale = u.u6.w;
133
+ // The reclaimed travel velocity → the lens-frame vector (host +y is DOWN → flip to NDC +up).
134
+ let velRaw = vec2<f32>(u.u7.x, -u.u7.y);
135
+ let vmag = length(velRaw) * VEL_SCALE;
136
+ let vdir = select(vec2<f32>(0.0, 0.0), velRaw / max(length(velRaw), 1e-5), length(velRaw) > 1e-5);
137
+ let wake = u.u7.w; // the spring-engaged active (ζ=0.7) → the wake LAGS + overshoots
138
+ let twkRate = u.u7.z;
139
+ // The per-dot twinkle phase — an on-GPU instance_index hash (no new buffer); the resting
140
+ // field becomes a LIVING warm constellation. uTime is pinned under PRM (deterministic capture).
141
+ let twkPhase = fract(sin(f32(ii) * 12.9898) * 43758.5453) * TAU;
142
+ let twk = twkRate * sin(u.u0.w * (twkRate + 0.6) + twkPhase);
143
+
144
+ var center2d: vec2<f32>;
145
+ var facing: f32;
146
+ var sizeTaper: f32;
147
+ var burstScale: f32;
148
+ var facingOpacity: f32;
149
+ var burstBright: f32;
150
+ var castLobe: f32 = 0.0; // the cartoon-cast strength (nearness·pAct), set per-register
151
+
152
+ if (isPlane) {
153
+ // ── The 2D-PLANE register → the DIRECTIONAL LIQUID LENS ──────────────────────
154
+ // A heavy liquid-glass lens dragged across a taut warm membrane: it LEADS its travel,
155
+ // STRETCHES the gathered dots along the travel axis, drags an ember comet-tail WAKE behind,
156
+ // and MAGNIFIES+refracts the lattice beneath it. (Replaces the symmetric 'toCursor*well' —
157
+ // clean break, no alias, no dual path; the reclaimed velocity makes the warp directional.)
158
+ let base2d = unitPos.xy * planeScale;
159
+
160
+ // 1. ANTICIPATION — the lens LEADS its math-center along travel (dots ahead feel it early).
161
+ let wellC = pointerNdc + vdir * wake * (gravRadius * INV_PHI2 * 0.4);
162
+ let toLens = wellC - base2d;
163
+
164
+ // 2. SQUASH / STRETCH — measure distance in a frame STRETCHED along travel (vol-preserving).
165
+ let along = dot2(toLens, vdir);
166
+ let perp = dot2(toLens, vec2<f32>(-vdir.y, vdir.x));
167
+ let stretch = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);
168
+ let dE = length(vec2<f32>(along / stretch, perp * stretch));
169
+ let well = gravStrength * exp(-(dE * dE) / (2.0 * gravRadius * gravRadius)) * pAct;
170
+ var lift = toLens * well;
171
+
172
+ // 3. COMET-TAIL WAKE — a pull streamed BEHIND the lens (overlapping action; follow-through).
173
+ let behind = max(0.0, -along);
174
+ let tail = wake * exp(-(behind * behind) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN;
175
+ lift = lift - vdir * tail * gravRadius;
176
+ // The flick BURST over-extends the gather then the spring snaps it (the cartoon take).
177
+ let burstPull = toLens * (u.u3.z * 0.4 * exp(-(dE * dE) / (gravRadius * gravRadius))) * pAct;
178
+ center2d = base2d + lift + burstPull;
131
179
 
180
+ // 4. LENS OPTICS — the ellipse nearness drives magnify + brightness + the chromatic rim.
181
+ let nearness = exp(-(dE * dE) / (2.0 * gravRadius * gravRadius));
182
+ facing = nearness;
183
+ sizeTaper = 0.8 + LENS_MAGNIFY * nearness * pAct; // the dot SWELLS (a lens magnifies)
184
+ burstScale = 1.0 + u.u3.z * 0.6 * nearness;
185
+ // the comet-tail also reads via LUMINANCE (trailing dots glow ∝ behind·vmag — the PRIMARY
186
+ // wake witness; the displacement alone is fragile, the spike proved).
187
+ let wakeGlow = behind * vmag * 1.4 * pAct;
188
+ // 5. CONTENT-DEFERENTIAL VIGNETTE — dense edges, clear center (the field FRAMES the content);
189
+ // the cursor-lens RE-DENSIFIES the center it enters (the calm-until-touched duality).
190
+ var presence = mix(VIGNETTE_FLOOR, 1.0, smoothstep(0.0, 1.0, length(base2d) / max(planeScale, 1e-3)));
191
+ presence = max(presence, nearness * pAct);
192
+ // the resting TWINKLE floor + the lens bloom; the vignette modulates the whole field.
193
+ facingOpacity = (u.u2.x + u.u2.y * (0.5 + twk + 0.6 * nearness * pAct)) * presence;
194
+ burstBright = 1.0 + (0.5 * nearness + wakeGlow + u.u3.z * 0.8 * nearness) * pAct;
195
+ castLobe = nearness * pAct; // the cartoon offset-cast under the magnified lozenge
196
+ } else {
197
+ // ── The 3D-SPHERE register (the KEPT preset — "good") ────────────────────────
198
+ var sphereScale = u.u1.x; // uRadius
199
+ var sphereOffset = vec2<f32>(0.0, 0.0);
200
+ if (sphereIdx > 0.5) {
201
+ sphereScale = u.u1.x * u.u4.z; // uRadius * uSphere2Scale
202
+ sphereOffset = vec2<f32>(u.u5.x, u.u5.y); // uSphere2Offset
203
+ }
204
+ let n = u.spin * unitPos; // the rotated surface NORMAL (the §T2 facing source)
205
+ facing = facingTerm(n);
206
+ let screenN = n.xy * sphereScale + sphereOffset;
207
+ // The SAME screen-space DIRECTIONAL LENS as the plane (one warp idiom, both registers —
208
+ // the dim-idiom, no second mechanism): the surface dots smear toward the cursor ALONG
209
+ // travel + carry a wake (a finger pressing a dot-globe through glass). Bounded by 'facing'
210
+ // so the near hemisphere leads + the silhouette can't tear.
211
+ let toLensS = pointerNdc - screenN;
212
+ let alongS = dot2(toLensS, vdir);
213
+ let perpS = dot2(toLensS, vec2<f32>(-vdir.y, vdir.x));
214
+ let stretchS = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);
215
+ let dES = length(vec2<f32>(alongS / stretchS, perpS * stretchS));
216
+ let pd = dES;
217
+ // A repel pushes OUT, an attract pulls IN (u.u3.y sign); facing bounds the near hemisphere.
218
+ let well = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * gravStrength * u.u3.y * pAct * facing;
219
+ var lift = -toLensS * well; // toward (attract) / away (repel) per the u3.y sign baked above
220
+ // The comet-tail WAKE on the near hemisphere (streams behind the cursor along travel).
221
+ let behindS = max(0.0, -alongS);
222
+ let tailS = wake * exp(-(behindS * behindS) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN * facing;
223
+ lift = lift - vdir * tailS * gravRadius * sign(u.u3.y);
224
+ let parallaxOff = pointerNdc * u.u3.x * pAct;
225
+ center2d = n.xy * sphereScale * breath + sphereOffset + lift + parallaxOff;
226
+ let nearnessS = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * facing;
227
+ sizeTaper = u.u2.z + u.u2.w * facing + LENS_MAGNIFY * 0.4 * nearnessS * pAct; // the lens magnify
228
+ burstScale = 1.0 + u.u3.z * exp(-(dES * dES) / (gravRadius * gravRadius));
229
+ let wakeGlowS = behindS * vmag * 1.0 * pAct * facing;
230
+ facingOpacity = u.u2.x + u.u2.y * facing + u.u2.y * twk * facing; // the twinkle rides the facing
231
+ burstBright = 1.0 + (u.u3.z * 0.8 * exp(-(dES * dES) / (gravRadius * gravRadius)) + wakeGlowS) * pAct;
232
+ castLobe = nearnessS * pAct; // the cartoon offset-cast under the smeared near-hemisphere
233
+ }
234
+
235
+ let dotR = u.u1.y * sizeTaper * burstScale; // uDotSize · taper · burst
132
236
  let offX = local.x * dotR;
133
237
  let offY = local.y * dotR;
134
238
 
135
- // The opacity ramp (transcribes facingFade opacity): facingLo + facingHi·facing, scaled
136
- // by the base opacity + a faint burst brightness lift near the cursor.
137
- let facingOpacity = u.u2.x + u.u2.y * facing; // facingLo + facingHi·facing
138
- let burstBright = 1.0 + u.u3.z * 0.8 * exp(-pd * pd * 12.0);
239
+ // THE CARTOON OFFSET-CAST (the 1940s layered-offset shadow, a binding precept). Verts 6..11
240
+ // are a darkened, lower-α duplicate billboard offset along a √φ light vector (down-right),
241
+ // keyed off castLobe (nearness·pAct) so the shadow lobe appears ONLY under the magnified lens
242
+ // lozenge. When castLobe ≈ 0 the cast collapses to alpha 0 (the fragment discards it).
243
+ let lightVec = normalize(vec2<f32>(SQRT_PHI, -1.0)) * CAST_OFFSET * dotR;
244
+ let castShift = select(vec2<f32>(0.0, 0.0), lightVec, isCast);
245
+ let castStrength = select(1.0, smoothstep(0.05, 0.5, castLobe), isCast);
139
246
 
140
247
  // The whole sphere + quad is built in a SQUARE space (so the globe stays circular); the
141
248
  // final clip-space x divides by aspect so a wide canvas does not squash it into an
142
249
  // ellipse (aspect ≥ 1 → x shrinks; aspect < 1 → x grows). This keeps the dot quads round
143
250
  // AND the sphere circular in PIXELS regardless of the canvas aspect.
144
251
  let aspect = max(u.u1.w, 1e-4);
145
- let clipX = (center2d.x + offX) / aspect;
146
- let clipY = center2d.y + offY;
252
+ let clipX = (center2d.x + offX + castShift.x) / aspect;
253
+ let clipY = center2d.y + offY + castShift.y;
147
254
 
148
255
  var out: VSOut;
149
256
  out.pos = vec4<f32>(clipX, clipY, 0.0, 1.0);
150
257
  out.local = local;
151
- out.bright = facingOpacity * burstBright;
152
- out.alpha = clamp(u.u1.z * facingOpacity * burstBright, 0.0, 1.0);
153
- // The palette tone reads the DEPTH (not the opacity): the near-front samples the bright
154
- // cream stop[0] (tone 0), the rim/far the darker amber stop (tone → 1), so the depth-shell
155
- // reads TONALLY on BOTH a dark AND a light ground (a light-ground globe can't lean on the
156
- // opacity fade alone — over a light card a faded dot reads brighter, inverting the shell).
157
- out.tone = clamp(1.0 - facing, 0.0, 1.0);
258
+ out.cast = select(0.0, 1.0, isCast);
259
+ if (isCast) {
260
+ // The cast is a dark shadow lobe — full dark tone, lower α, gated by the cast strength.
261
+ out.bright = CAST_DARK;
262
+ out.alpha = clamp(u.u1.z * CAST_ALPHA * facingOpacity * castStrength, 0.0, 1.0);
263
+ out.tone = 1.0;
264
+ } else {
265
+ out.bright = facingOpacity * burstBright;
266
+ out.alpha = clamp(u.u1.z * facingOpacity * burstBright, 0.0, 1.0);
267
+ // The chromatic RIM refraction (REPLACES the old depth-only '1.0 - facing' tone — EXCISED,
268
+ // no double-write, no legacy). At rest the tone reads the depth/edge; under the lens a faint
269
+ // RIM band glows the warmer-amber stop (tone → 1), the iOS-27 glass chromatic refraction.
270
+ let rim = smoothstep(0.25, 0.6, 1.0 - facing) * RIM_CHROMA;
271
+ out.tone = clamp(max(1.0 - facing, rim * facing), 0.0, 1.0);
272
+ }
158
273
  return out;
159
274
  }
160
275
 
@@ -166,6 +281,8 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
166
281
  let aa = max(fwidth(d), 1e-4);
167
282
  let coverage = 1.0 - smoothstep(-aa, aa, d);
168
283
  if (coverage < 0.002) { discard; }
284
+ // The cartoon-cast billboard collapses to nothing away from the lens — drop the dead quads.
285
+ if (in.cast > 0.5 && in.alpha < 0.003) { discard; }
169
286
 
170
287
  // The palette tints the dot by DEPTH (near-front cream → rim amber); the brightness lights
171
288
  // the core. The near hemisphere reads as the bright warm-cream stop, the rim/far fading to
@@ -176,7 +293,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
176
293
  // Premultiplied-alpha output (the translucent dot-shell additive over the clear).
177
294
  return vec4<f32>(rgb * alpha, alpha);
178
295
  }
179
- `, A = "#version 300 es\nprecision highp float;\n\n#define MAX_DOT_STOPS 4\n#define GOLDEN_ANGLE 2.399963229728653\n\n// The static quad corner (6 verts: two triangles) + the instanced per-dot data.\nin vec2 aCorner; // billboard-local [-1,1]\nin vec4 aDot; // (unitPos.xyz, sphereIdx) — instanced (divisor 1)\n\nuniform vec4 uU0; // (resX, resY, dpr, time)\nuniform vec4 uU1; // (radius, dotSize, baseOpacity, aspect)\nuniform vec4 uU2; // (facingLo, facingHi, sizeLo, sizeHi)\nuniform vec4 uU3; // (parallax, pointerPush, pointerBloom, pointerActive)\nuniform vec4 uU4; // (pointerX, pointerY, sphere2Scale, breathRadius)\nuniform vec4 uU5; // (sphere2OffsetX, sphere2OffsetY, hasBackground, _pad)\nuniform mat3 uSpin; // the slow tilted Y-rotation\n\nout vec2 vLocal; // [-1,1] billboard-local for the SDF circle\nout float vBright; // facing-driven brightness\nout float vAlpha; // facing-driven opacity\nout float vTone; // palette tone (0 = bright cream near-front, 1 = amber rim)\n\nfloat facingTerm(vec3 n) {\n return clamp(n.z * 0.5 + 0.5, 0.0, 1.0); // 1 = dead-front\n}\n\nvoid main() {\n vec3 unitPos = aDot.xyz;\n float sphereIdx = aDot.w;\n\n float breath = uU4.w;\n float sphereScale = uU1.x;\n vec2 sphereOffset = vec2(0.0);\n if (sphereIdx > 0.5) {\n sphereScale = uU1.x * uU4.z;\n sphereOffset = vec2(uU5.x, uU5.y);\n }\n\n // The rotated surface normal = spin · unitPos (the §T2 facing source).\n vec3 n = uSpin * unitPos;\n float facing = facingTerm(n);\n\n // Pointer-repel/attract dimple (the §T7 local perturbation).\n float pAct = uU3.w;\n vec2 pointerNdc = vec2(uU4.x * 2.0 - 1.0, 1.0 - uU4.y * 2.0);\n vec2 screenN = n.xy * sphereScale + sphereOffset;\n vec2 toPointer = screenN - pointerNdc;\n float pd = length(toPointer);\n float dimple = exp(-pd * pd * 18.0) * uU3.y * pAct;\n vec2 lift = n.xy * dimple;\n\n vec2 parallaxOff = pointerNdc * uU3.x * pAct;\n vec2 center2d = n.xy * sphereScale * breath + sphereOffset + lift + parallaxOff;\n\n // The depth-of-field size taper + the accel-burst bloom scale.\n float sizeTaper = uU2.z + uU2.w * facing;\n float burstScale = 1.0 + uU3.z * exp(-pd * pd * 12.0);\n float dotR = uU1.y * sizeTaper * burstScale;\n\n float offX = aCorner.x * dotR;\n float offY = aCorner.y * dotR;\n\n float facingOpacity = uU2.x + uU2.y * facing;\n float burstBright = 1.0 + uU3.z * 0.8 * exp(-pd * pd * 12.0);\n\n vLocal = aCorner;\n vBright = facingOpacity * burstBright;\n vAlpha = clamp(uU1.z * facingOpacity * burstBright, 0.0, 1.0);\n // The palette tone reads the DEPTH (near-front bright cream → rim amber) so the depth-shell\n // reads tonally on BOTH a dark AND a light ground.\n vTone = clamp(1.0 - facing, 0.0, 1.0);\n\n // The whole sphere + quad is built in a SQUARE space (so the globe stays circular); the\n // final clip-space x divides by aspect so a wide canvas does not squash it into an ellipse.\n float aspect = max(uU1.w, 1e-4);\n gl_Position = vec4((center2d.x + offX) / aspect, center2d.y + offY, 0.0, 1.0);\n}", j = `#version 300 es
296
+ `, A = "#version 300 es\nprecision highp float;\n\n#define MAX_DOT_STOPS 4\n#define GOLDEN_ANGLE 2.399963229728653\n\n// ── The √φ proportion ladder (the liquid-lens constants; the line-for-line WGSL twin) ──\n#define PI_CONST 3.141592653589793\n#define TAU 6.283185307179586\n#define PHI 1.618033988749895\n#define SQRT_PHI 1.272019649514069\n#define INV_SQRT_PHI 0.7861513777574233\n#define INV_PHI2 0.3819660112501051\n#define VEL_SCALE 0.18\n#define STRETCH_GAIN 2.4\n#define WAKE_GAIN 12.0\n#define LENS_MAGNIFY SQRT_PHI\n#define RIM_CHROMA 1.0\n#define VIGNETTE_FLOOR INV_PHI2\n#define CAST_OFFSET 0.9\n#define CAST_DARK 0.0\n#define CAST_ALPHA 0.55\n\n// The static quad corner (6 verts: two triangles) + the instanced per-dot data. The draw is\n// 12 verts/instance: gl_VertexID 0..5 the lit dot, 6..11 the cartoon offset-CAST shadow (the\n// SAME instanced draw, zero new buffer). The corner is re-derived from gl_VertexID % 6.\nin vec4 aDot; // (unitPos.xyz, sphereIdx) — instanced (divisor 1)\n\nuniform vec4 uU0; // (resX, resY, dpr, time)\nuniform vec4 uU1; // (radius, dotSize, baseOpacity, aspect)\nuniform vec4 uU2; // (facingLo, facingHi, sizeLo, sizeHi)\nuniform vec4 uU3; // (parallax, pointerPush, pointerBloom, pointerActive)\nuniform vec4 uU4; // (pointerX, pointerY, sphere2Scale, breathRadius)\nuniform vec4 uU5; // (sphere2OffsetX, sphere2OffsetY, hasBackground, _pad)\nuniform vec4 uU6; // (layout, gravityStrength, gravityRadius, planeScale)\nuniform vec4 uU7; // (velX, velY, twinkleRate, wakeStrength)\nuniform mat3 uSpin; // the slow tilted Y-rotation\n\nout vec2 vLocal; // [-1,1] billboard-local for the SDF circle\nout float vBright; // facing-driven brightness\nout float vAlpha; // facing-driven opacity\nout float vTone; // palette tone (0 = bright cream near-front, 1 = amber rim)\nout float vCast; // 1 = the cartoon offset-cast shadow billboard, 0 = the lit dot\n\nfloat facingTerm(vec3 n) {\n return clamp(n.z * 0.5 + 0.5, 0.0, 1.0); // 1 = dead-front\n}\n\nvoid main() {\n // The two-triangle quad corners (6 verts), re-derived per gl_VertexID (no aCorner buffer).\n vec2 cornerLUT[6] = vec2[6](\n vec2(-1.0, -1.0), vec2(1.0, -1.0), vec2(-1.0, 1.0),\n vec2(-1.0, 1.0), vec2(1.0, -1.0), vec2(1.0, 1.0)\n );\n bool isCast = gl_VertexID >= 6;\n vec2 aCorner = cornerLUT[gl_VertexID % 6];\n\n vec3 unitPos = aDot.xyz;\n float sphereIdx = aDot.w;\n\n float breath = uU4.w;\n float pAct = uU3.w;\n vec2 pointerNdc = vec2(uU4.x * 2.0 - 1.0, 1.0 - uU4.y * 2.0);\n bool isPlane = uU6.x > 0.5;\n float gravStrength = uU6.y;\n float gravRadius = max(uU6.z, 1e-3);\n float planeScale = uU6.w;\n // The reclaimed travel velocity → the lens-frame vector (host +y is DOWN → flip to NDC +up).\n vec2 velRaw = vec2(uU7.x, -uU7.y);\n float vmag = length(velRaw) * VEL_SCALE;\n vec2 vdir = length(velRaw) > 1e-5 ? velRaw / max(length(velRaw), 1e-5) : vec2(0.0);\n float wake = uU7.w; // the spring-engaged active (ζ=0.7) → the wake LAGS + overshoots\n float twkRate = uU7.z;\n // The per-dot twinkle phase — an on-GPU instance hash (no new buffer); uTime pinned under PRM.\n float twkPhase = fract(sin(float(gl_InstanceID) * 12.9898) * 43758.5453) * TAU;\n float twk = twkRate * sin(uU0.w * (twkRate + 0.6) + twkPhase);\n\n vec2 center2d;\n float facing;\n float sizeTaper;\n float burstScale;\n float facingOpacity;\n float burstBright;\n float castLobe = 0.0;\n\n if (isPlane) {\n // ── The 2D-PLANE register → the DIRECTIONAL LIQUID LENS ──────────────────────\n vec2 base2d = unitPos.xy * planeScale;\n\n // 1. ANTICIPATION — the lens LEADS its math-center along travel.\n vec2 wellC = pointerNdc + vdir * wake * (gravRadius * INV_PHI2 * 0.4);\n vec2 toLens = wellC - base2d;\n\n // 2. SQUASH / STRETCH — measure distance in a frame STRETCHED along travel.\n float along = dot(toLens, vdir);\n float perp = dot(toLens, vec2(-vdir.y, vdir.x));\n float stretch = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);\n float dE = length(vec2(along / stretch, perp * stretch));\n float well = gravStrength * exp(-(dE * dE) / (2.0 * gravRadius * gravRadius)) * pAct;\n vec2 lift = toLens * well;\n\n // 3. COMET-TAIL WAKE — a pull streamed BEHIND the lens (follow-through).\n float behind = max(0.0, -along);\n float tail = wake * exp(-(behind * behind) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN;\n lift -= vdir * tail * gravRadius;\n vec2 burstPull = toLens * (uU3.z * 0.4 * exp(-(dE * dE) / (gravRadius * gravRadius))) * pAct;\n center2d = base2d + lift + burstPull;\n\n // 4. LENS OPTICS — magnify + brightness + the chromatic rim.\n float nearness = exp(-(dE * dE) / (2.0 * gravRadius * gravRadius));\n facing = nearness;\n sizeTaper = 0.8 + LENS_MAGNIFY * nearness * pAct;\n burstScale = 1.0 + uU3.z * 0.6 * nearness;\n float wakeGlow = behind * vmag * 1.4 * pAct;\n // 5. CONTENT-DEFERENTIAL VIGNETTE — dense edges, clear center; the lens re-densifies it.\n float presence = mix(VIGNETTE_FLOOR, 1.0, smoothstep(0.0, 1.0, length(base2d) / max(planeScale, 1e-3)));\n presence = max(presence, nearness * pAct);\n facingOpacity = (uU2.x + uU2.y * (0.5 + twk + 0.6 * nearness * pAct)) * presence;\n burstBright = 1.0 + (0.5 * nearness + wakeGlow + uU3.z * 0.8 * nearness) * pAct;\n castLobe = nearness * pAct;\n } else {\n // ── The 3D-SPHERE register → the SAME directional lens (one warp idiom) ───────\n float sphereScale = uU1.x;\n vec2 sphereOffset = vec2(0.0);\n if (sphereIdx > 0.5) {\n sphereScale = uU1.x * uU4.z;\n sphereOffset = vec2(uU5.x, uU5.y);\n }\n vec3 n = uSpin * unitPos;\n facing = facingTerm(n);\n vec2 screenN = n.xy * sphereScale + sphereOffset;\n vec2 toLensS = pointerNdc - screenN;\n float alongS = dot(toLensS, vdir);\n float perpS = dot(toLensS, vec2(-vdir.y, vdir.x));\n float stretchS = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);\n float dES = length(vec2(alongS / stretchS, perpS * stretchS));\n float pd = dES;\n float well = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * gravStrength * uU3.y * pAct * facing;\n vec2 lift = -toLensS * well;\n float behindS = max(0.0, -alongS);\n float tailS = wake * exp(-(behindS * behindS) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN * facing;\n lift -= vdir * tailS * gravRadius * sign(uU3.y);\n vec2 parallaxOff = pointerNdc * uU3.x * pAct;\n center2d = n.xy * sphereScale * breath + sphereOffset + lift + parallaxOff;\n float nearnessS = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * facing;\n sizeTaper = uU2.z + uU2.w * facing + LENS_MAGNIFY * 0.4 * nearnessS * pAct;\n burstScale = 1.0 + uU3.z * exp(-(dES * dES) / (gravRadius * gravRadius));\n float wakeGlowS = behindS * vmag * 1.0 * pAct * facing;\n facingOpacity = uU2.x + uU2.y * facing + uU2.y * twk * facing;\n burstBright = 1.0 + (uU3.z * 0.8 * exp(-(dES * dES) / (gravRadius * gravRadius)) + wakeGlowS) * pAct;\n castLobe = nearnessS * pAct;\n }\n\n float dotR = uU1.y * sizeTaper * burstScale;\n float offX = aCorner.x * dotR;\n float offY = aCorner.y * dotR;\n\n // THE CARTOON OFFSET-CAST — verts 6..11 are a dark, lower-α duplicate offset along a √φ\n // light vector (down-right), gated by castLobe so the lobe appears only under the lens.\n vec2 lightVec = normalize(vec2(SQRT_PHI, -1.0)) * CAST_OFFSET * dotR;\n vec2 castShift = isCast ? lightVec : vec2(0.0);\n float castStrength = isCast ? smoothstep(0.05, 0.5, castLobe) : 1.0;\n\n vLocal = aCorner;\n vCast = isCast ? 1.0 : 0.0;\n if (isCast) {\n vBright = CAST_DARK;\n vAlpha = clamp(uU1.z * CAST_ALPHA * facingOpacity * castStrength, 0.0, 1.0);\n vTone = 1.0;\n } else {\n vBright = facingOpacity * burstBright;\n vAlpha = clamp(uU1.z * facingOpacity * burstBright, 0.0, 1.0);\n // The chromatic RIM refraction (REPLACES the old depth-only 1.0-facing tone — EXCISED).\n float rim = smoothstep(0.25, 0.6, 1.0 - facing) * RIM_CHROMA;\n vTone = clamp(max(1.0 - facing, rim * facing), 0.0, 1.0);\n }\n\n // The whole sphere + quad is built in a SQUARE space (so the globe stays circular); the\n // final clip-space x divides by aspect so a wide canvas does not squash it into an ellipse.\n float aspect = max(uU1.w, 1e-4);\n gl_Position = vec4((center2d.x + offX + castShift.x) / aspect, center2d.y + offY + castShift.y, 0.0, 1.0);\n}", j = `#version 300 es
180
297
  precision highp float;
181
298
 
182
299
  #define MAX_DOT_STOPS 4
@@ -185,6 +302,7 @@ in vec2 vLocal;
185
302
  in float vBright;
186
303
  in float vAlpha;
187
304
  in float vTone;
305
+ in float vCast;
188
306
  out vec4 fragColor;
189
307
 
190
308
  uniform vec4 uBg; // (background.rgb, hasBackground)
@@ -193,6 +311,11 @@ uniform vec3 uPalette[MAX_DOT_STOPS]; // linear-sRGB stops
193
311
 
194
312
  const mat2 FBM_ROT = mat2(0.8, 0.6, -0.6, 0.8);
195
313
 
314
+ // PI in scope for the spliced OKLCH hue fns (the procedural-color chunk contract:
315
+ // the consumer splices the matrices chunk + DEFINES PI FIRST — see
316
+ // procedural-color.glsl.ts §"PI being in scope"). The dot SDF main() reads only the
317
+ // OKLAB path, but the whole spliced chunk still compiles, so PI must be declared.
318
+ #define PI 3.141592653589793
196
319
  ${r}
197
320
  ${a}
198
321
 
@@ -216,6 +339,8 @@ void main() {
216
339
  float aa = max(fwidth(d), 1e-4);
217
340
  float coverage = 1.0 - smoothstep(-aa, aa, d);
218
341
  if (coverage < 0.002) discard;
342
+ // The cartoon-cast billboard collapses to nothing away from the lens — drop the dead quads.
343
+ if (vCast > 0.5 && vAlpha < 0.003) discard;
219
344
 
220
345
  vec3 lin = samplePaletteLin(vTone) * clamp(vBright, 0.0, 1.6);
221
346
  float alpha = vAlpha * coverage;
@@ -241,9 +366,13 @@ void main() {
241
366
  breathing: 0,
242
367
  palette: P,
243
368
  background: "transparent",
244
- interactive: !1,
245
- pointerMode: "repel",
369
+ layout: "plane",
370
+ interactive: !0,
371
+ pointerMode: "attract",
246
372
  parallax: .08,
373
+ gravityStrength: .62,
374
+ gravityRadius: .34,
375
+ twinkle: 0,
247
376
  respectReducedMotion: !0
248
377
  }, I = {
249
378
  x: .62,
@@ -255,22 +384,27 @@ function R() {
255
384
  y: .5,
256
385
  active: 0,
257
386
  push: 0,
258
- bloom: 0
387
+ bloom: 0,
388
+ velX: 0,
389
+ velY: 0,
390
+ accelMag: 0
259
391
  };
260
392
  }
261
- var z = 240, B = {
393
+ var z = 272, B = {
262
394
  u0: 0,
263
395
  u1: 4,
264
396
  u2: 8,
265
397
  u3: 12,
266
398
  u4: 16,
267
399
  u5: 20,
268
- spin0: 24,
269
- spin1: 28,
270
- spin2: 32,
271
- ints: 36,
272
- bg: 40,
273
- palette: 44
400
+ u6: 24,
401
+ u7: 28,
402
+ spin0: 32,
403
+ spin1: 36,
404
+ spin2: 40,
405
+ ints: 44,
406
+ bg: 48,
407
+ palette: 52
274
408
  };
275
409
  function V() {
276
410
  let e = new ArrayBuffer(z);
@@ -281,85 +415,101 @@ function V() {
281
415
  };
282
416
  }
283
417
  function H(e) {
284
- let t = Math.min(Math.max(Math.floor(e.dotCount), 1), 4e3), n = e.spheres === 2 ? 2 : 1, r = t * n, i = new Float32Array(r * 4), a = 0;
418
+ let t = Math.min(Math.max(Math.floor(e.dotCount), 1), 4e3);
419
+ if (e.layout === "plane") {
420
+ let e = new Float32Array(t * 4), n = Math.max(1, Math.round(Math.sqrt(t))), r = Math.max(1, Math.ceil(t / n)), i = 0;
421
+ for (let a = 0; a < t; a++) {
422
+ let t = a % n, o = Math.floor(a / n), s = G((a + .5) * U), c = G((a + .5) * W), l = (t + s) / n, u = (o + c) / r;
423
+ e[i + 0] = l * 2 - 1, e[i + 1] = u * 2 - 1, e[i + 2] = 0, e[i + 3] = 0, i += 4;
424
+ }
425
+ return e;
426
+ }
427
+ let n = e.spheres === 2 ? 2 : 1, r = t * n, i = new Float32Array(r * 4), a = 0;
285
428
  for (let e = 0; e < n; e++) for (let n = 0; n < t; n++) {
286
429
  let r = y(n, t);
287
430
  i[a + 0] = r.x, i[a + 1] = r.y, i[a + 2] = r.z, i[a + 3] = e, a += 4;
288
431
  }
289
432
  return i;
290
433
  }
291
- function U(e) {
292
- return Math.min(Math.max(Math.floor(e.dotCount), 1), 4e3) * (e.spheres === 2 ? 2 : 1);
434
+ var U = .7548776662466927, W = .5698402909980532;
435
+ function G(e) {
436
+ return e - Math.floor(e);
293
437
  }
294
- function W(e, t, n) {
438
+ function K(e) {
439
+ let t = Math.min(Math.max(Math.floor(e.dotCount), 1), 4e3);
440
+ return e.layout === "plane" ? t : t * (e.spheres === 2 ? 2 : 1);
441
+ }
442
+ function q(e, t, n) {
295
443
  return e * t * 2 / Math.max(n, 1);
296
444
  }
297
- function G(e, t, n, r, i, a, o, s) {
445
+ function J(e, t, n, r, i, a, o, s) {
298
446
  let { f32: l, i32: u } = e, f = Math.min(r.w, r.h) || 1, p = r.w / Math.max(r.h, 1);
299
- l[B.u0 + 0] = r.w, l[B.u0 + 1] = r.h, l[B.u0 + 2] = i, l[B.u0 + 3] = n, l[B.u1 + 0] = t.radius, l[B.u1 + 1] = W(t.dotSize, i, f), l[B.u1 + 2] = t.baseOpacity, l[B.u1 + 3] = p, l[B.u2 + 0] = .15, l[B.u2 + 1] = .85 * t.depthFade, l[B.u2 + 2] = .6, l[B.u2 + 3] = .4, l[B.u3 + 0] = t.parallax, l[B.u3 + 1] = a.push, l[B.u3 + 2] = a.bloom, l[B.u3 + 3] = a.active, l[B.u4 + 0] = a.x, l[B.u4 + 1] = a.y, l[B.u4 + 2] = L, l[B.u4 + 3] = o, l[B.u5 + 0] = I.x, l[B.u5 + 1] = I.y, l[B.u5 + 2] = t.background === "transparent" ? 0 : 1, l[B.u5 + 3] = 0;
300
- let m = d(n, t.axisTilt * Math.PI / 180, t.rotationSpeed);
301
- l[B.spin0 + 0] = m[0], l[B.spin0 + 1] = m[3], l[B.spin0 + 2] = m[6], l[B.spin0 + 3] = 0, l[B.spin1 + 0] = m[1], l[B.spin1 + 1] = m[4], l[B.spin1 + 2] = m[7], l[B.spin1 + 3] = 0, l[B.spin2 + 0] = m[2], l[B.spin2 + 1] = m[5], l[B.spin2 + 2] = m[8], l[B.spin2 + 3] = 0;
302
- let h = Math.min(s.length, 4);
303
- if (u[B.ints + 0] = h, u[B.ints + 1] = U(t), u[B.ints + 2] = t.spheres === 2 ? 2 : 1, u[B.ints + 3] = 0, t.background === "transparent") l[B.bg + 0] = 0, l[B.bg + 1] = 0, l[B.bg + 2] = 0, l[B.bg + 3] = 0;
447
+ l[B.u0 + 0] = r.w, l[B.u0 + 1] = r.h, l[B.u0 + 2] = i, l[B.u0 + 3] = n, l[B.u1 + 0] = t.radius, l[B.u1 + 1] = q(t.dotSize, i, f), l[B.u1 + 2] = t.baseOpacity, l[B.u1 + 3] = p, l[B.u2 + 0] = .15, l[B.u2 + 1] = .85 * t.depthFade, l[B.u2 + 2] = .6, l[B.u2 + 3] = .4, l[B.u3 + 0] = t.parallax, l[B.u3 + 1] = a.push, l[B.u3 + 2] = a.bloom, l[B.u3 + 3] = a.active, l[B.u4 + 0] = a.x, l[B.u4 + 1] = a.y, l[B.u4 + 2] = L, l[B.u4 + 3] = o, l[B.u5 + 0] = I.x, l[B.u5 + 1] = I.y, l[B.u5 + 2] = t.background === "transparent" ? 0 : 1, l[B.u5 + 3] = 0;
448
+ let m = 1.18 * Math.max(p, 1);
449
+ l[B.u6 + 0] = +(t.layout === "plane"), l[B.u6 + 1] = t.gravityStrength, l[B.u6 + 2] = t.gravityRadius, l[B.u6 + 3] = m, l[B.u7 + 0] = a.velX, l[B.u7 + 1] = a.velY, l[B.u7 + 2] = t.twinkle, l[B.u7 + 3] = a.active;
450
+ let h = d(n, t.axisTilt * Math.PI / 180, t.rotationSpeed);
451
+ l[B.spin0 + 0] = h[0], l[B.spin0 + 1] = h[3], l[B.spin0 + 2] = h[6], l[B.spin0 + 3] = 0, l[B.spin1 + 0] = h[1], l[B.spin1 + 1] = h[4], l[B.spin1 + 2] = h[7], l[B.spin1 + 3] = 0, l[B.spin2 + 0] = h[2], l[B.spin2 + 1] = h[5], l[B.spin2 + 2] = h[8], l[B.spin2 + 3] = 0;
452
+ let g = Math.min(s.length, 4);
453
+ if (u[B.ints + 0] = g, u[B.ints + 1] = K(t), u[B.ints + 2] = t.spheres === 2 ? 2 : 1, u[B.ints + 3] = 0, t.background === "transparent") l[B.bg + 0] = 0, l[B.bg + 1] = 0, l[B.bg + 2] = 0, l[B.bg + 3] = 0;
304
454
  else {
305
455
  let e = c(t.background);
306
456
  l[B.bg + 0] = e[0], l[B.bg + 1] = e[1], l[B.bg + 2] = e[2], l[B.bg + 3] = 1;
307
457
  }
308
458
  for (let e = 0; e < 4; e++) {
309
- let t = B.palette + e * 4, n = c(s[Math.min(e, h - 1)] ?? s[0]);
459
+ let t = B.palette + e * 4, n = c(s[Math.min(e, g - 1)] ?? s[0]);
310
460
  l[t + 0] = n[0], l[t + 1] = n[1], l[t + 2] = n[2], l[t + 3] = 0;
311
461
  }
312
462
  return e;
313
463
  }
314
464
  //#endregion
315
465
  //#region src/components/custom/dot-matrix/composables/useDotSphere.ts
316
- var K = 64, q = 128, J = 8, Y = 1, X = 2;
317
- function Z(e) {
466
+ var ee = 64, te = 128, Y = 8, X = 1, ne = 2, Z = 1.272019649514069;
467
+ function re(e) {
318
468
  return {
319
469
  w: e.width || 1,
320
470
  h: e.height || 1
321
471
  };
322
472
  }
323
- function ee(e) {
324
- let { canvas: t, config: n, getPalette: r, pointer: i, shouldContinue: a, onFrame: s } = e;
325
- return function(e, c, l) {
326
- let d = e.createShaderModule({
473
+ function ie(e) {
474
+ let { canvas: t, config: n, getPalette: r, pointer: i, shouldContinue: a, onFrame: s, getReducedMotion: c } = e;
475
+ return function(e, l, d) {
476
+ let f = e.createShaderModule({
327
477
  label: "[DotMatrix] dot-matrix.wgsl",
328
478
  code: k
329
- }), f = H(n), p = U(n), m = e.createBuffer({
479
+ }), p = H(n), m = K(n), h = e.createBuffer({
330
480
  label: "[DotMatrix] dots",
331
- size: p * 16,
332
- usage: q | J,
481
+ size: m * 16,
482
+ usage: te | Y,
333
483
  mappedAtCreation: !0
334
484
  });
335
- new Float32Array(m.getMappedRange()).set(f), m.unmap();
336
- let h = e.createBuffer({
485
+ new Float32Array(h.getMappedRange()).set(p), h.unmap();
486
+ let g = e.createBuffer({
337
487
  label: "[DotMatrix] render-uniforms",
338
488
  size: V().buffer.byteLength,
339
- usage: K | J
340
- }), g = e.createBindGroupLayout({
489
+ usage: ee | Y
490
+ }), _ = e.createBindGroupLayout({
341
491
  label: "[DotMatrix] bgl",
342
492
  entries: [{
343
493
  binding: 0,
344
- visibility: Y | X,
494
+ visibility: X | ne,
345
495
  buffer: { type: "uniform" }
346
496
  }, {
347
497
  binding: 1,
348
- visibility: Y,
498
+ visibility: X,
349
499
  buffer: { type: "read-only-storage" }
350
500
  }]
351
- }), _ = e.createRenderPipeline({
501
+ }), v = e.createRenderPipeline({
352
502
  label: "[DotMatrix] render-pipeline",
353
- layout: e.createPipelineLayout({ bindGroupLayouts: [g] }),
503
+ layout: e.createPipelineLayout({ bindGroupLayouts: [_] }),
354
504
  vertex: {
355
- module: d,
505
+ module: f,
356
506
  entryPoint: "vs_main"
357
507
  },
358
508
  fragment: {
359
- module: d,
509
+ module: f,
360
510
  entryPoint: "fs_main",
361
511
  targets: [{
362
- format: l,
512
+ format: d,
363
513
  blend: {
364
514
  color: {
365
515
  srcFactor: "one",
@@ -375,44 +525,44 @@ function ee(e) {
375
525
  }]
376
526
  },
377
527
  primitive: { topology: "triangle-list" }
378
- }), v = e.createBindGroup({
528
+ }), y = e.createBindGroup({
379
529
  label: "[DotMatrix] bg",
380
- layout: g,
530
+ layout: _,
381
531
  entries: [{
382
532
  binding: 0,
383
- resource: { buffer: h }
533
+ resource: { buffer: g }
384
534
  }, {
385
535
  binding: 1,
386
- resource: { buffer: m }
536
+ resource: { buffer: h }
387
537
  }]
388
- }), y = V();
389
- function b() {
538
+ }), b = V();
539
+ function x() {
390
540
  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));
391
541
  (t.width !== i || t.height !== a) && (t.width = i, t.height = a);
392
542
  }
393
- function x(a) {
543
+ function S(a) {
394
544
  s?.(a);
395
- let l = o(), d = u(a, n.breathing, .6);
396
- G(y, n, a, Z(t), l, i, d, r()), e.queue.writeBuffer(h, 0, y.buffer);
397
- let f = c.getCurrentTexture().createView(), m = e.createCommandEncoder({ label: "[DotMatrix] frame" }), g = m.beginRenderPass({ colorAttachments: [{
398
- view: f,
399
- clearValue: te(n),
545
+ let d = c?.() ? Z : a, f = o(), p = u(d, n.breathing, .6);
546
+ J(b, n, d, re(t), f, i, p, r()), e.queue.writeBuffer(g, 0, b.buffer);
547
+ let h = l.getCurrentTexture().createView(), _ = e.createCommandEncoder({ label: "[DotMatrix] frame" }), x = _.beginRenderPass({ colorAttachments: [{
548
+ view: h,
549
+ clearValue: ae(n),
400
550
  loadOp: "clear",
401
551
  storeOp: "store"
402
552
  }] });
403
- g.setPipeline(_), g.setBindGroup(0, v), g.draw(6, p, 0, 0), g.end(), e.queue.submit([m.finish()]);
553
+ x.setPipeline(v), x.setBindGroup(0, y), x.draw(12, m, 0, 0), x.end(), e.queue.submit([_.finish()]);
404
554
  }
405
555
  return {
406
- frame: x,
556
+ frame: S,
407
557
  shouldContinue: a,
408
- resize: b,
558
+ resize: x,
409
559
  teardown: () => {
410
- m.destroy(), h.destroy();
560
+ h.destroy(), g.destroy();
411
561
  }
412
562
  };
413
563
  };
414
564
  }
415
- function te(e) {
565
+ function ae(e) {
416
566
  if (e.background === "transparent") return {
417
567
  r: 0,
418
568
  g: 0,
@@ -435,161 +585,155 @@ function Q(e, t, n) {
435
585
  }
436
586
  return r;
437
587
  }
438
- function ne(e) {
439
- let { canvas: t, config: n, getPalette: r, pointer: i, shouldContinue: a, onFrame: s } = e;
588
+ function oe(e) {
589
+ let { canvas: t, config: n, getPalette: r, pointer: i, shouldContinue: a, onFrame: s, getReducedMotion: l } = e;
440
590
  return function(e) {
441
- let l = Q(e, e.VERTEX_SHADER, A), f = Q(e, e.FRAGMENT_SHADER, j), p = e.createProgram();
442
- if (e.attachShader(p, l), e.attachShader(p, f), e.linkProgram(p), !e.getProgramParameter(p, e.LINK_STATUS)) throw Error(`[DotMatrix] link failed: ${e.getProgramInfoLog(p)}`);
443
- e.deleteShader(l), e.deleteShader(f);
444
- let m = H(n), h = U(n), g = e.createVertexArray();
445
- e.bindVertexArray(g);
446
- let _ = e.createBuffer();
447
- e.bindBuffer(e.ARRAY_BUFFER, _), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
448
- -1,
449
- -1,
450
- 1,
451
- -1,
452
- -1,
453
- 1,
454
- -1,
455
- 1,
456
- 1,
457
- -1,
458
- 1,
459
- 1
460
- ]), e.STATIC_DRAW);
461
- let v = e.getAttribLocation(p, "aCorner");
462
- e.enableVertexAttribArray(v), e.vertexAttribPointer(v, 2, e.FLOAT, !1, 0, 0);
463
- let y = e.createBuffer();
464
- e.bindBuffer(e.ARRAY_BUFFER, y), e.bufferData(e.ARRAY_BUFFER, m, e.STATIC_DRAW);
465
- let b = e.getAttribLocation(p, "aDot");
466
- e.enableVertexAttribArray(b), e.vertexAttribPointer(b, 4, e.FLOAT, !1, 0, 0), e.vertexAttribDivisor(b, 1), e.bindVertexArray(null);
467
- let x = (t) => e.getUniformLocation(p, t), S = x("uU0"), C = x("uU1"), w = x("uU2"), T = x("uU3"), E = x("uU4"), D = x("uU5"), O = x("uSpin"), k = x("uBg"), M = x("uStopCount"), N = x("uPalette[0]");
468
- function P() {
591
+ let f = Q(e, e.VERTEX_SHADER, A), p = Q(e, e.FRAGMENT_SHADER, j), m = e.createProgram();
592
+ if (e.attachShader(m, f), e.attachShader(m, p), e.linkProgram(m), !e.getProgramParameter(m, e.LINK_STATUS)) throw Error(`[DotMatrix] link failed: ${e.getProgramInfoLog(m)}`);
593
+ e.deleteShader(f), e.deleteShader(p);
594
+ let h = H(n), g = K(n), _ = e.createVertexArray();
595
+ e.bindVertexArray(_);
596
+ let v = e.createBuffer();
597
+ e.bindBuffer(e.ARRAY_BUFFER, v), e.bufferData(e.ARRAY_BUFFER, h, e.STATIC_DRAW);
598
+ let y = e.getAttribLocation(m, "aDot");
599
+ e.enableVertexAttribArray(y), e.vertexAttribPointer(y, 4, e.FLOAT, !1, 0, 0), e.vertexAttribDivisor(y, 1), e.bindVertexArray(null);
600
+ let b = (t) => e.getUniformLocation(m, t), x = b("uU0"), S = b("uU1"), C = b("uU2"), w = b("uU3"), T = b("uU4"), E = b("uU5"), D = b("uU6"), O = b("uU7"), k = b("uSpin"), M = b("uBg"), N = b("uStopCount"), P = b("uPalette[0]");
601
+ function F() {
469
602
  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));
470
603
  (t.width !== a || t.height !== s) && (t.width = a, t.height = s), e.viewport(0, 0, t.width, t.height);
471
604
  }
472
- function F(a) {
605
+ function R(a) {
473
606
  s?.(a);
474
- let l = o(), f = t.width || 1, m = t.height || 1, _ = Math.min(f, m) || 1, v = f / Math.max(m, 1), y = u(a, n.breathing, .6);
475
- if (e.useProgram(p), e.bindVertexArray(g), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), n.background === "transparent") e.clearColor(0, 0, 0, 0);
607
+ let f = l?.() ? Z : a, p = o(), h = t.width || 1, v = t.height || 1, y = Math.min(h, v) || 1, b = h / Math.max(v, 1), A = u(f, n.breathing, .6);
608
+ if (e.useProgram(m), e.bindVertexArray(_), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), n.background === "transparent") e.clearColor(0, 0, 0, 0);
476
609
  else {
477
610
  let t = c(n.background);
478
611
  e.clearColor(t[0], t[1], t[2], 1);
479
612
  }
480
613
  e.clear(e.COLOR_BUFFER_BIT);
481
- let b = n.dotSize * l * 2 / _;
482
- e.uniform4f(S, f, m, l, a), e.uniform4f(C, n.radius, b, n.baseOpacity, v), e.uniform4f(w, .15, .85 * n.depthFade, .6, .4), e.uniform4f(T, n.parallax, i.push, i.bloom, i.active), e.uniform4f(E, i.x, i.y, L, y), e.uniform4f(D, I.x, I.y, n.background === "transparent" ? 0 : 1, 0);
483
- let x = d(a, n.axisTilt * Math.PI / 180, n.rotationSpeed);
484
- e.uniformMatrix3fv(O, !1, [
485
- x[0],
486
- x[3],
487
- x[6],
488
- x[1],
489
- x[4],
490
- x[7],
491
- x[2],
492
- x[5],
493
- x[8]
614
+ let j = n.dotSize * p * 2 / y;
615
+ e.uniform4f(x, h, v, p, f), e.uniform4f(S, n.radius, j, n.baseOpacity, b), e.uniform4f(C, .15, .85 * n.depthFade, .6, .4), e.uniform4f(w, n.parallax, i.push, i.bloom, i.active), e.uniform4f(T, i.x, i.y, L, A), e.uniform4f(E, I.x, I.y, n.background === "transparent" ? 0 : 1, 0);
616
+ let F = 1.18 * Math.max(b, 1);
617
+ e.uniform4f(D, +(n.layout === "plane"), n.gravityStrength, n.gravityRadius, F), e.uniform4f(O, i.velX, i.velY, n.twinkle, i.active);
618
+ let R = d(f, n.axisTilt * Math.PI / 180, n.rotationSpeed);
619
+ e.uniformMatrix3fv(k, !1, [
620
+ R[0],
621
+ R[3],
622
+ R[6],
623
+ R[1],
624
+ R[4],
625
+ R[7],
626
+ R[2],
627
+ R[5],
628
+ R[8]
494
629
  ]);
495
- let A = r(), j = Math.min(A.length, 4);
496
- if (e.uniform1i(M, j), n.background === "transparent") e.uniform4f(k, 0, 0, 0, 0);
630
+ let z = r(), B = Math.min(z.length, 4);
631
+ if (e.uniform1i(N, B), n.background === "transparent") e.uniform4f(M, 0, 0, 0, 0);
497
632
  else {
498
633
  let t = c(n.background);
499
- e.uniform4f(k, t[0], t[1], t[2], 1);
634
+ e.uniform4f(M, t[0], t[1], t[2], 1);
500
635
  }
501
- let P = new Float32Array(12);
636
+ let V = new Float32Array(12);
502
637
  for (let e = 0; e < 4; e++) {
503
- let t = c(A[Math.min(e, j - 1)] ?? A[0]);
504
- P[e * 3 + 0] = t[0], P[e * 3 + 1] = t[1], P[e * 3 + 2] = t[2];
638
+ let t = c(z[Math.min(e, B - 1)] ?? z[0]);
639
+ V[e * 3 + 0] = t[0], V[e * 3 + 1] = t[1], V[e * 3 + 2] = t[2];
505
640
  }
506
- e.uniform3fv(N, P), e.drawArraysInstanced(e.TRIANGLES, 0, 6, h), e.bindVertexArray(null);
641
+ e.uniform3fv(P, V), e.drawArraysInstanced(e.TRIANGLES, 0, 12, g), e.bindVertexArray(null);
507
642
  }
508
643
  return {
509
- frame: F,
644
+ frame: R,
510
645
  shouldContinue: a,
511
- resize: P,
646
+ resize: F,
512
647
  teardown: () => {
513
- e.deleteProgram(p), e.deleteVertexArray(g), e.deleteBuffer(_), e.deleteBuffer(y);
648
+ e.deleteProgram(m), e.deleteVertexArray(_), e.deleteBuffer(v);
514
649
  }
515
650
  };
516
651
  };
517
652
  }
518
653
  //#endregion
519
654
  //#region src/components/custom/dot-matrix/composables/useDotMatrix.ts
520
- function re(e) {
655
+ function se(e) {
521
656
  return e === "attract" ? -1 : 1;
522
657
  }
523
658
  function $(e, n) {
524
- let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), c = R(), l = null, u = 0;
525
- function d(e) {
526
- let t = u > 0 ? (e - u) * 1e3 : 16.7;
659
+ let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), c = R(), l = null, u = 0, d = 0, f = 0;
660
+ function p(e, t, n, r, i, a) {
661
+ let o = 2 * Math.PI / Math.max(r, .001), s = t + (o * o * (n - e) - 2 * i * o * t) * a;
662
+ return [e + s * a, s];
663
+ }
664
+ function m(e) {
665
+ let t = u > 0 ? (e - u) * 1e3 : 16.7, n = Math.min(t / 1e3, .05);
527
666
  if (u = e, o.tick(t), !r.interactive || !o.active.value) {
528
- c.active += (0 - c.active) * .12, c.push *= .9, c.bloom *= .9;
667
+ [c.active, f] = p(c.active, f, 0, .5, .7, n), [c.push, d] = p(c.push, d, 0, .5, .7, n), c.bloom *= .9, c.velX *= .9, c.velY *= .9, c.accelMag *= .9;
529
668
  return;
530
669
  }
531
- let n = o.smoothedPosition.value;
532
- c.x = n.x, c.y = n.y, c.active += (1 - c.active) * .2;
533
- let i = o.speed.value, a = re(r.pointerMode) * Math.min(.35, .08 + i * .6);
534
- c.push += (a - c.push) * .2, c.bloom = Math.max(c.bloom * .9, o.burst.value);
670
+ let i = o.smoothedPosition.value;
671
+ c.x = i.x, c.y = i.y, [c.active, f] = p(c.active, f, 1, .42, .7, n);
672
+ let a = o.speed.value, s = se(r.pointerMode) * Math.min(1, .7 + a * .6);
673
+ [c.push, d] = p(c.push, d, s, .42, .7, n), c.bloom = Math.max(c.bloom * .9, o.burst.value);
674
+ let l = o.velocity.value;
675
+ c.velX = l.x, c.velY = l.y;
676
+ let m = o.acceleration.value;
677
+ c.accelMag = Math.hypot(m.x, m.y);
535
678
  }
536
- let f = () => {
679
+ let h = () => {
537
680
  o.onPointerEnter(), r.interactive && l?.wake();
538
- }, p = (e) => {
681
+ }, g = (e) => {
539
682
  o.onPointerMove(e), r.interactive && l?.wake();
540
- }, m = (e) => e.parentElement ?? e;
541
- function h(e) {
542
- let t = m(e);
543
- t.addEventListener("pointermove", p), t.addEventListener("pointerenter", f), t.addEventListener("pointerleave", o.onPointerLeave);
683
+ }, _ = (e) => e.parentElement ?? e;
684
+ function v(e) {
685
+ let t = _(e);
686
+ t.addEventListener("pointermove", g), t.addEventListener("pointerenter", h), t.addEventListener("pointerleave", o.onPointerLeave);
544
687
  }
545
- function g(e) {
546
- let t = m(e);
547
- t.removeEventListener("pointermove", p), t.removeEventListener("pointerenter", f), t.removeEventListener("pointerleave", o.onPointerLeave);
688
+ function y(e) {
689
+ let t = _(e);
690
+ t.removeEventListener("pointermove", g), t.removeEventListener("pointerenter", h), t.removeEventListener("pointerleave", o.onPointerLeave);
548
691
  }
549
- let _ = () => {
692
+ let b = () => {
550
693
  let t = e.value;
551
694
  if (!t) return null;
552
695
  if (!l) {
553
- h(t);
696
+ v(t);
554
697
  let e = {
555
698
  canvas: t,
556
699
  config: r,
557
700
  getPalette: i,
558
701
  pointer: c,
559
702
  shouldContinue: () => !0,
560
- onFrame: d
703
+ onFrame: m,
704
+ getReducedMotion: () => l?.reducedMotion ?? !1
561
705
  };
562
706
  l = s(t, {
563
707
  mode: a,
564
708
  respectReducedMotion: r.respectReducedMotion,
565
- setupWGPU: ee(e),
566
- setupGL: ne(e)
709
+ setupWGPU: ie(e),
710
+ setupGL: oe(e)
567
711
  }), l.armAsync();
568
712
  }
569
713
  return l;
570
714
  };
571
- queueMicrotask(() => _());
572
- let v = {
715
+ queueMicrotask(() => b());
716
+ let x = {
573
717
  get backend() {
574
- return _()?.backend ?? "webgpu";
718
+ return b()?.backend ?? "webgpu";
575
719
  },
576
- pause: () => _()?.suspend("manual"),
577
- resume: () => _()?.resume("manual"),
578
- wake: () => _()?.wake(),
579
- renderAt: (e) => _()?.renderAt(e),
720
+ pause: () => b()?.suspend("manual"),
721
+ resume: () => b()?.resume("manual"),
722
+ wake: () => b()?.wake(),
723
+ renderAt: (e) => b()?.renderAt(e),
580
724
  get reducedMotion() {
581
725
  return l?.reducedMotion ?? !1;
582
726
  },
583
727
  dispose: () => {
584
728
  let t = e.value;
585
- t && g(t), o.dispose(), l?.dispose();
729
+ t && y(t), o.dispose(), l?.dispose();
586
730
  }
587
731
  };
588
- return T(() => v.dispose()), v;
732
+ return T(() => x.dispose()), x;
589
733
  }
590
734
  //#endregion
591
735
  //#region src/components/custom/dot-matrix/DotMatrix.vue
592
- var ie = /* @__PURE__ */ e(/* @__PURE__ */ C({
736
+ var ce = /* @__PURE__ */ e(/* @__PURE__ */ C({
593
737
  __name: "DotMatrix",
594
738
  props: {
595
739
  config: { default: () => F },
@@ -627,4 +771,4 @@ var ie = /* @__PURE__ */ e(/* @__PURE__ */ C({
627
771
  }
628
772
  }), [["__scopeId", "data-v-1f36e34c"]]);
629
773
  //#endregion
630
- export { F as DEFAULT_DOT_MATRIX_CONFIG, ie as DotMatrix, v as FACING_HI, m as FACING_LO, g as GOLDEN_ANGLE, f as GOLDEN_RATIO, M as MAX_DOTS, N as MAX_DOT_STOPS, l as SIZE_TAPER_BASE, h as SIZE_TAPER_GAIN, P as WARM_IDENTITY_PALETTE, _ as applyMat3, u as breathRadius, p as facingFade, y as fibonacciDot, d as spinMatrix, $ as useDotMatrix };
774
+ export { F as DEFAULT_DOT_MATRIX_CONFIG, ce as DotMatrix, v as FACING_HI, m as FACING_LO, g as GOLDEN_ANGLE, f as GOLDEN_RATIO, M as MAX_DOTS, N as MAX_DOT_STOPS, l as SIZE_TAPER_BASE, h as SIZE_TAPER_GAIN, P as WARM_IDENTITY_PALETTE, _ as applyMat3, u as breathRadius, p as facingFade, y as fibonacciDot, d as spinMatrix, $ as useDotMatrix };