@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,139 +1,40 @@
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 { computed as l, createElementBlock as u, createElementVNode as d, defineComponent as f, normalizeStyle as p, onScopeDispose as m, openBlock as h, useTemplateRef as g, watch as _ } from "vue";
7
- //#region src/components/custom/concentric/composables/ringField.ts
8
- var v = 9.81, y = Math.PI * 2;
9
- function b(e, t, n, r) {
10
- let i = Math.cos(t.rotAlpha), a = Math.sin(t.rotAlpha), o = e.x - t.x, s = e.y - t.y, c = i * o + a * s, l = -a * o + i * s, u = c / Math.max(n, 1e-4), d = l / Math.max(r, 1e-4);
11
- return Math.sqrt(u * u + d * d);
12
- }
13
- function x(e, t, n, r) {
14
- let i = (e.x - t.x) / Math.max(n, 1e-4), a = (e.y - t.y) / Math.max(r, 1e-4);
15
- return Math.sqrt(i * i + a * a);
16
- }
17
- function S(e, t, n, r) {
18
- let i = Math.cos(t.rotAlpha), a = Math.sin(t.rotAlpha), o = e.x - t.x, s = e.y - t.y, c = i * o + a * s, l = -a * o + i * s, u = Math.max(n, 1e-4), d = Math.max(r, 1e-4), f = c / u, p = l / d, m = Math.sqrt(f * f + p * p), h = f / u, g = p / d;
19
- return Math.sqrt(h * h + g * g) / Math.max(m, 1e-4);
20
- }
21
- function C(e, t, n, r, i, a, o) {
22
- let s = 0;
23
- for (let c of n) {
24
- let n = b(e, c, i, a), l = 0;
25
- for (let e of r) {
26
- let r = y / Math.max(e.wavelength, 1e-4), i = Math.sqrt(v * r) * o, a = r * n - i * t + e.phase;
27
- l += e.amplitude * Math.sin(a);
28
- }
29
- s += l * c.weight;
30
- }
31
- return s;
32
- }
33
- function w(e, t, n, r, i, a, o, s, c, l = .08) {
34
- let u = 0, d = 0;
35
- for (let f of n) {
36
- let n = b(e, f, i, a), p = S(e, f, i, a);
37
- for (let e of r) {
38
- let r = y / Math.max(e.wavelength, 1e-4), i = Math.sqrt(v * r) * o, a = r * n - i * t + e.phase, m = Math.sin(a), h = Math.abs(Math.cos(a)), g = Math.max(r * p, 1e-4), _ = Math.abs(m) / Math.max(h * g, 1e-4) * g / Math.max(l, 1e-4), b = 1 - T(s, s + c, _), x = e.amplitude * f.weight;
39
- u = Math.max(u, b * x), d += m * x;
40
- }
41
- }
42
- return {
43
- ink: E(u),
44
- env: d
45
- };
46
- }
47
- function T(e, t, n) {
48
- let r = E((n - e) / Math.max(t - e, 1e-6));
49
- return r * r * (3 - 2 * r);
50
- }
51
- function E(e) {
52
- return e < 0 ? 0 : e > 1 ? 1 : e;
53
- }
54
- function D(e, t = 1, n = 0) {
55
- let r = [], i = Math.max(1, Math.min(2, t));
56
- for (let t = 0; t < i; t++) r.push({
57
- amplitude: t === 0 ? 1 : .45,
58
- wavelength: e / (t + 1),
59
- phase: (n + t * 1.618033) % y
60
- });
61
- return r;
62
- }
63
- //#endregion
64
- //#region src/components/custom/concentric/constants.ts
65
- var O = 8, k = 4, A = 4;
66
- function j(e) {
67
- return e === "static-contour" ? 1 : e === "both" ? 2 : 0;
68
- }
69
- var M = [
70
- {
71
- L: .94,
72
- C: .025,
73
- h: 80
74
- },
75
- {
76
- L: .82,
77
- C: .075,
78
- h: 62
79
- },
80
- {
81
- L: .66,
82
- C: .105,
83
- h: 44
84
- }
85
- ];
86
- function N(e = .24, t = .04) {
87
- return [D(e, 1, 0)[0], D(e * (1 + t), 1, 1.7)[0]];
88
- }
89
- var P = N(), F = [{
90
- x: -.28,
91
- y: -.18,
92
- weight: 1,
93
- rotAlpha: .35
94
- }, {
95
- x: .3,
96
- y: .22,
97
- weight: .85,
98
- rotAlpha: -.55
99
- }], I = {
100
- centers: F,
101
- ringComponents: P,
102
- axisRatio: [1, .62],
103
- speed: .5,
104
- lineWidth: 1.4,
105
- lineSoftness: 1,
106
- renderMode: "traveling-rings",
107
- contourLevels: 12,
108
- beatDetune: .04,
109
- palette: M,
110
- background: "transparent",
111
- interactive: !1,
112
- respectReducedMotion: !0
113
- }, L = `
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 { t as o } from "./flow.glsl-DqEGRpl4.js";
5
+ import { a as s, t as c } from "./useGpuSubstrate-Ceet70xq.js";
6
+ import { c as l } from "./color-B9jZdhJX.js";
7
+ import { t as u } from "./useGlobalDark-B4HO9LXG.js";
8
+ import { c as d, d as f, f as p, l as m, n as h, p as g, s as _, u as v } from "./paperGrid-CXCSMbZ1.js";
9
+ import { computed as y, createElementBlock as b, createElementVNode as x, defineComponent as S, normalizeStyle as C, onScopeDispose as w, openBlock as T, useTemplateRef as E, watch as D } from "vue";
10
+ //#region src/components/custom/concentric/shaders/concentric.wgsl.ts
11
+ var O = `
114
12
  const PI: f32 = 3.141592653589793;
115
13
  const TAU: f32 = 6.283185307179586;
116
- const RING_GRAVITY: f32 = 9.81;
117
- const MAX_RINGS: i32 = 8;
118
- const MAX_CENTERS: i32 = 4;
119
14
  const MAX_RING_STOPS: i32 = 4;
120
15
 
121
16
  // ── Concentric uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
122
17
  struct ConcentricUniforms {
123
- // u0: (uTime, uSpeed, uAxisA, uAxisB)
18
+ // u0: (uTime, uSpeed, uCellSize, _pad)
124
19
  u0: vec4<f32>,
125
- // ints: (uCenterCount, uRingCount, uStopCount, uRenderMode) // 0 rings · 1 contour · 2 both
20
+ // ints: (_pad, _pad, uStopCount, _pad)
126
21
  ints: vec4<i32>,
127
22
  // bg: (background.rgb (linear), hasBackground)
128
23
  bg: vec4<f32>,
129
- // norm: (uFieldNorm, uAspect, _pad, _pad) — field → [0,1] scale
24
+ // norm: (uFieldNorm, uAspect, lightDirX, lightDirY)
130
25
  norm: vec4<f32>,
131
- // line: (lineHalfWidth, aaSoftness, contourLevels, _pad) — stroke geometry (field units)
26
+ // line: (lineHalfWidth, aaSoftness, contourLevels, indexEvery)
132
27
  line: vec4<f32>,
133
- // each ring row: (amplitude, wavelength, phase, _pad)
134
- rings: array<vec4<f32>, 8>,
135
- // each center row: (x, y, weight, rotAlpha)
136
- centers: array<vec4<f32>, 4>,
28
+ // wave: (waveDirX, waveDirY, waveK, waveOmega)
29
+ wave: vec4<f32>,
30
+ // wave2: (waveSigma, twistMax, shearMax, amp)
31
+ wave2: vec4<f32>,
32
+ // topo: (heightOctaves, heightSeed, swellAmp, perturbAmp)
33
+ topo: vec4<f32>,
34
+ // cursor: (cursorX, cursorY, cursorWell, interactive)
35
+ cursor: vec4<f32>,
36
+ // tune: (toneGain, shadeAmp, indexMul, inkDarken)
37
+ tune: vec4<f32>,
137
38
  // each palette stop: linear-sRGB rgb + _pad
138
39
  palette: array<vec4<f32>, 4>,
139
40
  };
@@ -143,11 +44,10 @@ struct ConcentricUniforms {
143
44
  ${n}
144
45
  ${i}
145
46
 
146
- // Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the
147
- // viewport from a single 3-vertex draw — no vertex buffer.
47
+ // Full-screen-triangle (the pilot idiom).
148
48
  struct VSOut {
149
49
  @builtin(position) pos: vec4<f32>,
150
- @location(0) uv: vec2<f32>, // domain [-1,1]², aspect-corrected x
50
+ @location(0) uv: vec2<f32>,
151
51
  };
152
52
 
153
53
  @vertex
@@ -162,130 +62,84 @@ fn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {
162
62
  return out;
163
63
  }
164
64
 
165
- // The ellipsoidal radial distance in the family's ROTATED frame R(−α): rotate (p − c) by
166
- // −α, then scale by (a,b). Transcribes ringField.ts ellipsoidalRadiusRot.
167
- fn ellipsoidalRadiusRot(p: vec2<f32>, center: vec2<f32>, rotAlpha: f32, axisA: f32, axisB: f32) -> f32 {
168
- let ca = cos(rotAlpha);
169
- let sa = sin(rotAlpha);
170
- let px = p.x - center.x;
171
- let py = p.y - center.y;
172
- let rx = ca * px + sa * py;
173
- let ry = -sa * px + ca * py;
174
- let dx = rx / max(axisA, 1e-4);
175
- let dy = ry / max(axisB, 1e-4);
176
- return sqrt(dx * dx + dy * dy);
65
+ // ── The host noise basis (the SAME quintic-faded value-noise the suite speaks) ──
66
+ fn hash21(x: f32, y: f32) -> f32 {
67
+ var px = fract(x * 0.1031);
68
+ var py = fract(y * 0.1031);
69
+ var pz = fract(x * 0.1031);
70
+ let d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
71
+ px = px + d; py = py + d; pz = pz + d;
72
+ return fract((px + py) * pz);
73
+ }
74
+ fn valueNoise(x: f32, y: f32) -> f32 {
75
+ let ix = floor(x); let iy = floor(y);
76
+ let fx = x - ix; let fy = y - iy;
77
+ let ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
78
+ let uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
79
+ let a = hash21(ix, iy);
80
+ let b = hash21(ix + 1.0, iy);
81
+ let c = hash21(ix, iy + 1.0);
82
+ let d2 = hash21(ix + 1.0, iy + 1.0);
83
+ return mix(mix(a, b, ux), mix(c, d2, ux), uy);
84
+ }
85
+ // The single-octave potential the curl operator wraps + the height field samples.
86
+ fn potentialFBM(p: vec2f) -> f32 {
87
+ var v = 0.0; var amp = 0.5; var freq = 1.0;
88
+ var px = p.x; var py = p.y;
89
+ for (var i = 0; i < 3; i = i + 1) {
90
+ v = v + amp * valueNoise(px * freq, py * freq);
91
+ let rx = 0.8 * px - 0.6 * py;
92
+ let ry = 0.6 * px + 0.8 * py;
93
+ px = rx; py = ry; freq = freq * 2.0; amp = amp * 0.5;
94
+ }
95
+ return v;
177
96
  }
178
97
 
179
- // |∇r| of the rotated ellipsoidal radius — closed-form (the IQ distance-estimation
180
- // denominator). Transcribes ringField.ts ellipsoidalGradMag.
181
- fn ellipsoidalGradMag(p: vec2<f32>, center: vec2<f32>, rotAlpha: f32, axisA: f32, axisB: f32) -> f32 {
182
- let ca = cos(rotAlpha);
183
- let sa = sin(rotAlpha);
184
- let px = p.x - center.x;
185
- let py = p.y - center.y;
186
- let rx = ca * px + sa * py;
187
- let ry = -sa * px + ca * py;
188
- let a = max(axisA, 1e-4);
189
- let b = max(axisB, 1e-4);
190
- let sx = rx / a;
191
- let sy = ry / b;
192
- let r = sqrt(sx * sx + sy * sy);
193
- let gx = sx / a;
194
- let gy = sy / b;
195
- return sqrt(gx * gx + gy * gy) / max(r, 1e-4);
196
- }
98
+ // The shared curl + wave chunks (splice AFTER valueNoise + potentialFBM are declared).
99
+ ${g}
100
+ ${p}
197
101
 
198
- // The radial-Fourier ring-interference value f(p,t) — the multi-center weighted sum of
199
- // CLEAN radial sinusoids (the BEAT ENVELOPE; transcribes ringField.ts sampleRingField).
200
- fn sampleRingField(p: vec2<f32>, t: f32) -> f32 {
201
- var acc = 0.0;
202
- let speed = u.u0.y;
203
- let axisA = u.u0.z;
204
- let axisB = u.u0.w;
205
- let centerCount = u.ints.x;
206
- let ringCount = u.ints.y;
207
- for (var j = 0; j < MAX_CENTERS; j = j + 1) {
208
- if (j >= centerCount) { break; }
209
- let cj = u.centers[j];
210
- let radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, axisA, axisB);
211
- var centerSum = 0.0;
212
- for (var i = 0; i < MAX_RINGS; i = i + 1) {
213
- if (i >= ringCount) { break; }
214
- let r = u.rings[i];
215
- let k = TAU / max(r.y, 1e-4);
216
- let omega = sqrt(RING_GRAVITY * k) * speed;
217
- let theta = k * radius - omega * t + r.z;
218
- centerSum = centerSum + r.x * sin(theta);
219
- }
220
- acc = acc + centerSum * cj.z;
221
- }
222
- return acc;
102
+ fn smoothstepEdge(e0: f32, e1: f32, x: f32) -> f32 {
103
+ let t = clamp((x - e0) / max(e1 - e0, 1e-6), 0.0, 1.0);
104
+ return t * t * (3.0 - 2.0 * t);
223
105
  }
224
106
 
225
- // The IQ gradient-normalized isoline INK + the beat ENVELOPE — the per-pixel line strength
226
- // (brightest-wins union over every family × ring crest) and the raw envelope (the hue
227
- // driver). Transcribes ringField.ts ringIsolineInk.
228
- struct InkEnv { ink: f32, env: f32, };
229
- fn ringIsolineInk(p: vec2<f32>, t: f32) -> InkEnv {
230
- var ink = 0.0;
231
- var env = 0.0;
232
- let speed = u.u0.y;
233
- let axisA = u.u0.z;
234
- let axisB = u.u0.w;
235
- let centerCount = u.ints.x;
236
- let ringCount = u.ints.y;
237
- let lineHalfW = u.line.x;
238
- let aa = u.line.y;
239
- for (var j = 0; j < MAX_CENTERS; j = j + 1) {
240
- if (j >= centerCount) { break; }
241
- let cj = u.centers[j];
242
- let radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, axisA, axisB);
243
- let gradR = ellipsoidalGradMag(p, cj.xy, cj.w, axisA, axisB);
244
- for (var i = 0; i < MAX_RINGS; i = i + 1) {
245
- if (i >= ringCount) { break; }
246
- let r = u.rings[i];
247
- let k = TAU / max(r.y, 1e-4);
248
- let omega = sqrt(RING_GRAVITY * k) * speed;
249
- let phase = k * radius - omega * t + r.z;
250
- let s = sin(phase);
251
- let cphase = abs(cos(phase));
252
- let gradPhase = max(k * gradR, 1e-4);
253
- // The IQ gradient-normalized distance-to-isoline (domain units; round-trips JS).
254
- let de = abs(s) / max(cphase * gradPhase, 1e-4);
255
- // Convert the domain-units distance to PIXELS via fwidth(phase) (the device
256
- // per-pixel phase change) so the stroke is a constant pixel width everywhere —
257
- // lineHalfW/aa are in pixels (NOT fwidthFine, Compatibility-Mode safe).
258
- let dPx = max(fwidth(phase), 1e-4);
259
- let dePx = de * gradPhase / dPx;
260
- var lineV = 1.0 - smoothstep(lineHalfW, lineHalfW + aa, dePx);
261
- // Analytic anti-aliasing: where the rings pack tighter than the pixel can resolve
262
- // (fwidth(phase) ≳ π, near a center / under DPR), FADE the line out instead of
263
- // flooding to a solid mass (IQ filterwidth — the aliasing-fade that keeps the field
264
- // thin LINES, not a bright slab where the rings converge).
265
- let aliasFade = 1.0 - smoothstep(PI * 0.6, PI * 1.2, dPx);
266
- lineV = lineV * aliasFade;
267
- let w = r.x * cj.z;
268
- ink = max(ink, lineV * w);
269
- env = env + s * w;
270
- }
107
+ // The level-set height at domain p (transcribes levelField.ts sampleHeight). The sampling
108
+ // coordinate is cell-twisted (the SAME wave that twists paper-grid cells — kinship); the
109
+ // height is a low-octave topography + the swell + the cursor peak.
110
+ fn sampleHeight(p: vec2f, t: f32) -> f32 {
111
+ // The CONTINUOUS traveling-wave flow warp (no per-cell seam — the contours flow + twist as
112
+ // the wave passes OVER and THROUGH them, the SAME wave that twists the paper-grid cells).
113
+ var g = waveFlow(p, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.y, u.wave2.w);
114
+ if (u.cursor.w > 0.5) {
115
+ g = cursorSwirl(g, u.cursor.xy, u.cursor.z * 0.6, u.u0.z * 2.5);
116
+ }
117
+ // Sample the topography at a LOW base frequency so the basins are BROAD nested loops (a
118
+ // readable contour map — not a fine speckle). heightOctaves carries the fractal detail.
119
+ var H = heightField(g * 0.9, u.topo.x, u.topo.y);
120
+ H = H + u.topo.z * waveSwell(t, u.topo.y);
121
+ if (u.cursor.w > 0.5) {
122
+ let d = p - u.cursor.xy;
123
+ let d2 = dot(d, d);
124
+ // The cursor HEAVE — a SOFT bulge (a Gaussian peak feathered by a smoothstep falloff so
125
+ // the heave is C1-smooth, NOT the hard-edged quad the old dark render showed). The well
126
+ // depth/radius already carry the velocity-HEAVE scale (packed JS-side into u.cursor.z).
127
+ let g0 = exp(-d2 / 0.22);
128
+ let fall = smoothstepEdge(0.0, 0.55, exp(-d2 / 0.6));
129
+ H = H + u.cursor.z * g0 * fall;
271
130
  }
272
- var oe: InkEnv;
273
- oe.ink = clamp(ink, 0.0, 1.0);
274
- oe.env = env;
275
- return oe;
131
+ return H;
276
132
  }
277
133
 
278
- // The topographic-contour operator: the isolines of the STATIC interference envelope at N
279
- // evenly-spaced heights. de_contour = |fract(f·N + 0.5) − 0.5| / |fwidth(f·N)| — the IQ
280
- // contour-line form. fwidth is the device pixel-derivative safety clamp on the composite
281
- // ONLY (NOT fwidthFine — Compatibility-Mode safe on Metal/WebKit).
282
- fn contourInk(envValue: f32, levels: f32) -> f32 {
283
- let fN = envValue * levels;
134
+ // The IQ gradient-free level-set contour ink — KEPT BYTE-FROZEN (the perfect GPU AA). It is
135
+ // FED the per-level half-width 'hw' (a parameter, NOT a re-derivation): de_contour =
136
+ // |fract(fN + 0.5) − 0.5| / fwidth(fN). The contour density tracks 1/|∇H| automatically.
137
+ // 'aaW' floors against a DPR-aware minimum so the index line stays CONTINUOUS where the heave
138
+ // packs contours (steep |∇H| saturates fwidth — challenge R4).
139
+ fn contourInk(fN: f32, hw: f32) -> f32 {
284
140
  let band = abs(fract(fN + 0.5) - 0.5);
285
- // fwidth is the device pixel-derivative safety clamp (NOT fwidthFine — Compatibility-Mode
286
- // safe on Metal/WebKit).
287
- let aaW = max(fwidth(fN), 1e-4);
288
- return 1.0 - smoothstep(u.line.x, u.line.x + u.line.y, band / aaW);
141
+ let aaW = max(fwidth(fN), 6e-4);
142
+ return 1.0 - smoothstepEdge(hw, hw + u.line.y, band / aaW);
289
143
  }
290
144
 
291
145
  // Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
@@ -302,125 +156,199 @@ fn samplePaletteLin(t: f32) -> vec3<f32> {
302
156
  return oklabToLinearSrgb(mix(labA, labB, f));
303
157
  }
304
158
 
159
+ // The SHARED hillshade finite-diff epsilon — pinned ONCE (mirrors levelField.HILLSHADE_EPSILON
160
+ // + the GLSL twin; a per-backend drift would red the L6 numeric parity).
161
+ const HILLSHADE_E: f32 = 0.012;
162
+
305
163
  @fragment
306
164
  fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
307
- // aspect-correct the domain x so the rings read circular under the ellipsoidal norm.
308
165
  let aspect = max(u.norm.y, 1e-4);
309
166
  let p = vec2<f32>(in.uv.x * aspect, in.uv.y);
310
- let t = u.u0.x;
311
- let mode = u.ints.w; // 0 traveling-rings · 1 static-contour · 2 both
312
- let levels = u.line.z;
313
-
314
- // The isoline strokes (the LINES) + the beat envelope (the HUE).
315
- let oe = ringIsolineInk(p, t);
316
- var ink = oe.ink;
317
- let env = oe.env;
318
-
319
- // The static-contour mode draws elevation lines of the (static) envelope.
320
- if (mode == 1) {
321
- ink = contourInk(env * u.norm.x, max(levels, 1.0));
322
- } else if (mode == 2) {
323
- ink = max(ink, contourInk(env * u.norm.x, max(levels, 1.0)));
324
- }
325
- // fwidth safety clamp on the final line composite (Compatibility-Mode safe).
326
- ink = clamp(ink, 0.0, 1.0);
327
-
328
- // The beat-envelope drives the warm-family tone across the ramp (cream↔amber↔ember) so the
329
- // crossing ring families read as warm-light interference; the saturated mid-amber reads on
330
- // BOTH the cream page and the dark page (the warm-cream identity, NOT a themed hue).
331
- let v = clamp(0.5 + env * u.norm.x, 0.0, 1.0);
332
- let lin = samplePaletteLin(v);
333
- let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
334
-
335
- let hasBg = u.bg.w;
336
- if (hasBg > 0.5) {
337
- // opaque themed ground: composite the lit line over the themed bg.
338
- let bg = clamp(linearToSrgb(u.bg.rgb), vec3<f32>(0.0), vec3<f32>(1.0));
339
- let outRgb = mix(bg, rgb, ink);
340
- return vec4<f32>(outRgb, 1.0);
341
- }
342
- // transparent ground: the LINE carries the alpha — the page reads through the troughs.
343
- let alpha = ink;
344
- return vec4<f32>(rgb * alpha, alpha);
167
+ let t = u.u0.x * u.u0.y;
168
+ let levels = max(u.line.z, 1.0);
169
+
170
+ // The level-set topography (the KEPT field — the PRIMARY path).
171
+ let H = sampleHeight(p, t);
172
+
173
+ // ── 1. HYPSOMETRIC TONE — tanh expands the compressed band so basins+ridges hit the ramp
174
+ // ENDS (the live lumVar-flat cause). samplePaletteLin is the KEPT OKLab operator.
175
+ let tone = 0.5 + 0.5 * tanh(H * u.tune.x);
176
+ var fill = samplePaletteLin(tone);
177
+
178
+ // ── 2. ANALYTIC HILLSHADE — one ∇H finite-diff at the SHARED e, dotted with the fixed cel
179
+ // light → 2.5-D relief. A read-only re-sample of sampleHeight (no second field).
180
+ let e = HILLSHADE_E;
181
+ let hx = sampleHeight(p + vec2<f32>(e, 0.0), t) - sampleHeight(p - vec2<f32>(e, 0.0), t);
182
+ let hy = sampleHeight(p + vec2<f32>(0.0, e), t) - sampleHeight(p - vec2<f32>(0.0, e), t);
183
+ let grad = vec2<f32>(hx, hy) / (2.0 * e);
184
+ let L = normalize(u.norm.zw + vec2<f32>(1e-5, 1e-5));
185
+ let shade = 0.5 + 0.5 * clamp(dot(normalize(grad + vec2<f32>(1e-5)), L), -1.0, 1.0);
186
+ fill = fill * mix(1.0 - u.tune.y, 1.0 + u.tune.y, shade);
187
+
188
+ // ── 3. TWO-TIER INDEX/MINOR CONTOUR — isIndex a pure f(level) (floor + mod + select, NOT a
189
+ // state buffer); the per-level half-width hw is FED to the byte-frozen contourInk.
190
+ let fN = H * levels + u.topo.w * sin(floor(H * levels) * 2.4 + t * 0.7);
191
+ let indexEvery = max(u.line.w, 1.0);
192
+ let lvl = floor(fN);
193
+ let isIndex = select(0.0, 1.0, fract(lvl / indexEvery) < (0.5 / indexEvery));
194
+ let hw = mix(u.line.x, u.line.x * u.tune.z, isIndex);
195
+ let ink = clamp(contourInk(fN, hw), 0.0, 1.0);
196
+
197
+ // ── 4. INK = a darker ember of the LOCAL fill (the edge-of-its-own-band signature).
198
+ let inkCol = mix(fill, fill * u.tune.w, 0.85);
199
+
200
+ // ── 5. ONE color path + OPAQUE OUT — the viz IS the colorful field, never lines-over-nothing.
201
+ // Per-mode is resolved in the CONSUMED stops + the bg token (no in-shader uMode branch).
202
+ let col = mix(fill, inkCol, ink);
203
+ return vec4<f32>(clamp(linearToSrgb(col), vec3<f32>(0.0), vec3<f32>(1.0)), 1.0);
345
204
  }
346
- `, R = 336, z = {
205
+ `, k = 4, A = [
206
+ {
207
+ L: .5,
208
+ C: .115,
209
+ h: 350
210
+ },
211
+ {
212
+ L: .66,
213
+ C: .14,
214
+ h: 38
215
+ },
216
+ {
217
+ L: .8,
218
+ C: .115,
219
+ h: 70
220
+ },
221
+ {
222
+ L: .92,
223
+ C: .06,
224
+ h: 86
225
+ }
226
+ ], j = [
227
+ {
228
+ L: .26,
229
+ C: .09,
230
+ h: 30
231
+ },
232
+ {
233
+ L: .45,
234
+ C: .15,
235
+ h: 42
236
+ },
237
+ {
238
+ L: .66,
239
+ C: .155,
240
+ h: 66
241
+ },
242
+ {
243
+ L: .84,
244
+ C: .13,
245
+ h: 84
246
+ }
247
+ ], M = {
248
+ L: .96,
249
+ C: .018,
250
+ h: 78
251
+ }, N = {
252
+ L: .16,
253
+ C: .035,
254
+ h: 32
255
+ }, P = {
256
+ speed: .6,
257
+ lineWidth: 1.8,
258
+ lineSoftness: 1,
259
+ contourLevels: 13,
260
+ cellSize: 1.2,
261
+ heightOctaves: 3,
262
+ heightSeed: 7,
263
+ swellAmp: .22,
264
+ perturbAmp: .06,
265
+ twistMax: .6,
266
+ shearMax: .24,
267
+ waveDir: [.92, .39],
268
+ waveK: .42,
269
+ waveOmega: .7,
270
+ waveSigma: .85,
271
+ cursorWell: .5,
272
+ toneGain: 1.6,
273
+ shadeAmp: .18,
274
+ lightDir: [-.6, .8],
275
+ indexEvery: 5,
276
+ indexMul: 1.9,
277
+ inkDarken: .45,
278
+ velocityHeave: .4,
279
+ palette: A,
280
+ background: M,
281
+ interactive: !0,
282
+ respectReducedMotion: !0
283
+ }, F = 224, I = {
347
284
  u0: 0,
348
285
  ints: 4,
349
286
  bg: 8,
350
287
  norm: 12,
351
288
  line: 16,
352
- rings: 20,
353
- centers: 52,
354
- palette: 68
355
- }, B = .55;
356
- function V() {
357
- let e = new ArrayBuffer(R);
289
+ wave: 20,
290
+ wave2: 24,
291
+ topo: 28,
292
+ cursor: 32,
293
+ tune: 36,
294
+ palette: 40
295
+ }, L = .55;
296
+ function R() {
297
+ let e = new ArrayBuffer(F);
358
298
  return {
359
299
  buffer: e,
360
300
  f32: new Float32Array(e),
361
301
  i32: new Int32Array(e)
362
302
  };
363
303
  }
364
- function H(e, t, n, r, i, a) {
365
- let { f32: o, i32: s } = e, [l, u] = t.axisRatio, d = a ?? t.centers;
366
- o[z.u0 + 0] = n, o[z.u0 + 1] = t.speed, o[z.u0 + 2] = l, o[z.u0 + 3] = u;
367
- let f = Math.min(d.length, 4), p = Math.min(t.ringComponents.length, 8), m = Math.min(i.length, 4);
368
- if (s[z.ints + 0] = f, s[z.ints + 1] = p, s[z.ints + 2] = m, s[z.ints + 3] = j(t.renderMode), t.background === "transparent") o[z.bg + 0] = 0, o[z.bg + 1] = 0, o[z.bg + 2] = 0, o[z.bg + 3] = 0;
304
+ function z(e, t, n, r, i, a, o, s) {
305
+ let { f32: c, i32: u } = e;
306
+ c[I.u0 + 0] = n, c[I.u0 + 1] = t.speed, c[I.u0 + 2] = t.cellSize, c[I.u0 + 3] = 0;
307
+ let d = Math.min(i.length, 4);
308
+ if (u[I.ints + 0] = 0, u[I.ints + 1] = 0, u[I.ints + 2] = d, u[I.ints + 3] = 0, t.background === "transparent") c[I.bg + 0] = 0, c[I.bg + 1] = 0, c[I.bg + 2] = 0, c[I.bg + 3] = 0;
369
309
  else {
370
- let e = c(t.background);
371
- o[z.bg + 0] = e[0], o[z.bg + 1] = e[1], o[z.bg + 2] = e[2], o[z.bg + 3] = 1;
310
+ let e = l(t.background);
311
+ c[I.bg + 0] = e[0], c[I.bg + 1] = e[1], c[I.bg + 2] = e[2], c[I.bg + 3] = 1;
372
312
  }
373
- o[z.norm + 0] = B, o[z.norm + 1] = r, o[z.norm + 2] = 0, o[z.norm + 3] = 0, o[z.line + 0] = t.lineWidth, o[z.line + 1] = t.lineSoftness, o[z.line + 2] = t.contourLevels, o[z.line + 3] = 0, U(o, z.rings, t.ringComponents), W(o, z.centers, d);
313
+ c[I.norm + 0] = L, c[I.norm + 1] = r, c[I.norm + 2] = t.lightDir[0], c[I.norm + 3] = t.lightDir[1], c[I.line + 0] = t.lineWidth, c[I.line + 1] = t.lineSoftness, c[I.line + 2] = t.contourLevels, c[I.line + 3] = t.indexEvery, c[I.wave + 0] = t.waveDir[0], c[I.wave + 1] = t.waveDir[1], c[I.wave + 2] = t.waveK, c[I.wave + 3] = t.waveOmega, c[I.wave2 + 0] = t.waveSigma, c[I.wave2 + 1] = t.twistMax, c[I.wave2 + 2] = t.shearMax, c[I.wave2 + 3] = o, c[I.topo + 0] = t.heightOctaves, c[I.topo + 1] = t.heightSeed, c[I.topo + 2] = t.swellAmp, c[I.topo + 3] = t.perturbAmp, c[I.cursor + 0] = a.x, c[I.cursor + 1] = a.y, c[I.cursor + 2] = t.cursorWell * s, c[I.cursor + 3] = +!!t.interactive, c[I.tune + 0] = t.toneGain, c[I.tune + 1] = t.shadeAmp, c[I.tune + 2] = t.indexMul, c[I.tune + 3] = t.inkDarken;
374
314
  for (let e = 0; e < 4; e++) {
375
- let t = z.palette + e * 4, n = c(i[Math.min(e, m - 1)] ?? i[0]);
376
- o[t + 0] = n[0], o[t + 1] = n[1], o[t + 2] = n[2], o[t + 3] = 0;
315
+ let t = I.palette + e * 4, n = l(i[Math.min(e, d - 1)] ?? i[0]);
316
+ c[t + 0] = n[0], c[t + 1] = n[1], c[t + 2] = n[2], c[t + 3] = 0;
377
317
  }
378
318
  return e;
379
319
  }
380
- function U(e, t, n) {
381
- for (let r = 0; r < 8; r++) {
382
- let i = t + r * 4, a = n[r];
383
- a ? (e[i + 0] = a.amplitude, e[i + 1] = a.wavelength, e[i + 2] = a.phase, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 1, e[i + 2] = 0, e[i + 3] = 0);
384
- }
385
- }
386
- function W(e, t, n) {
387
- for (let r = 0; r < 4; r++) {
388
- let i = t + r * 4, a = n[r];
389
- a ? (e[i + 0] = a.x, e[i + 1] = a.y, e[i + 2] = a.weight, e[i + 3] = a.rotAlpha) : (e[i + 0] = 0, e[i + 1] = 0, e[i + 2] = 0, e[i + 3] = 0);
390
- }
391
- }
392
320
  //#endregion
393
321
  //#region src/components/custom/concentric/composables/concentricWGPUSetup.ts
394
- var G = 64, K = 8, q = 2;
395
- function J(e) {
396
- let { canvas: t, config: n, getPalette: r, getCenters: i, shouldContinue: a, onFrame: s } = e;
397
- return function(e, c, l) {
398
- let u = e.createShaderModule({
322
+ var B = 64, V = 8, H = 2;
323
+ function U(e) {
324
+ let { canvas: t, config: n, getPalette: r, getCursor: i, getAmp: a, getWellScale: o, shouldContinue: c, onFrame: l } = e;
325
+ return function(e, u, d) {
326
+ let f = e.createShaderModule({
399
327
  label: "[Concentric] concentric.wgsl",
400
- code: L
401
- }), d = V(), f = e.createBuffer({
328
+ code: O
329
+ }), p = R(), m = e.createBuffer({
402
330
  label: "[Concentric] uniforms",
403
- size: d.buffer.byteLength,
404
- usage: G | K
405
- }), p = e.createBindGroupLayout({
331
+ size: p.buffer.byteLength,
332
+ usage: B | V
333
+ }), h = e.createBindGroupLayout({
406
334
  label: "[Concentric] bgl",
407
335
  entries: [{
408
336
  binding: 0,
409
- visibility: q,
337
+ visibility: H,
410
338
  buffer: { type: "uniform" }
411
339
  }]
412
- }), m = e.createRenderPipeline({
340
+ }), g = e.createRenderPipeline({
413
341
  label: "[Concentric] pipeline",
414
- layout: e.createPipelineLayout({ bindGroupLayouts: [p] }),
342
+ layout: e.createPipelineLayout({ bindGroupLayouts: [h] }),
415
343
  vertex: {
416
- module: u,
344
+ module: f,
417
345
  entryPoint: "vs_main"
418
346
  },
419
347
  fragment: {
420
- module: u,
348
+ module: f,
421
349
  entryPoint: "fs_main",
422
350
  targets: [{
423
- format: l,
351
+ format: d,
424
352
  blend: {
425
353
  color: {
426
354
  srcFactor: "one",
@@ -436,22 +364,22 @@ function J(e) {
436
364
  }]
437
365
  },
438
366
  primitive: { topology: "triangle-list" }
439
- }), h = e.createBindGroup({
367
+ }), _ = e.createBindGroup({
440
368
  label: "[Concentric] bg",
441
- layout: p,
369
+ layout: h,
442
370
  entries: [{
443
371
  binding: 0,
444
- resource: { buffer: f }
372
+ resource: { buffer: m }
445
373
  }]
446
374
  });
447
- function g() {
448
- let e = o(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
375
+ function v() {
376
+ 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));
449
377
  (t.width !== i || t.height !== a) && (t.width = i, t.height = a);
450
378
  }
451
- function _(a) {
452
- s?.(a), H(d, n, a, (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), r(), i()), e.queue.writeBuffer(f, 0, d.buffer);
453
- let o = e.createCommandEncoder({ label: "[Concentric] frame" }), l = c.getCurrentTexture().createView(), u = o.beginRenderPass({ colorAttachments: [{
454
- view: l,
379
+ function y(s) {
380
+ l?.(s), z(p, n, s, (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), r(), i(), a(), o()), e.queue.writeBuffer(m, 0, p.buffer);
381
+ let c = e.createCommandEncoder({ label: "[Concentric] frame" }), d = u.getCurrentTexture().createView(), f = c.beginRenderPass({ colorAttachments: [{
382
+ view: d,
455
383
  clearValue: {
456
384
  r: 0,
457
385
  g: 0,
@@ -461,28 +389,25 @@ function J(e) {
461
389
  loadOp: "clear",
462
390
  storeOp: "store"
463
391
  }] });
464
- u.setPipeline(m), u.setBindGroup(0, h), u.draw(3, 1, 0, 0), u.end(), e.queue.submit([o.finish()]);
392
+ f.setPipeline(g), f.setBindGroup(0, _), f.draw(3, 1, 0, 0), f.end(), e.queue.submit([c.finish()]);
465
393
  }
466
394
  return {
467
- frame: _,
468
- shouldContinue: a,
469
- resize: g,
395
+ frame: y,
396
+ shouldContinue: c,
397
+ resize: v,
470
398
  teardown: () => {
471
- f.destroy();
399
+ m.destroy();
472
400
  }
473
401
  };
474
402
  };
475
403
  }
476
404
  //#endregion
477
405
  //#region src/components/custom/concentric/shaders/concentric.glsl.ts
478
- var Y = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", X = `#version 300 es
406
+ var W = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", G = `#version 300 es
479
407
  precision highp float;
480
408
 
481
409
  #define PI 3.141592653589793
482
410
  #define TAU 6.283185307179586
483
- #define RING_GRAVITY 9.81
484
- #define MAX_RINGS 8
485
- #define MAX_CENTERS 4
486
411
  #define MAX_RING_STOPS 4
487
412
 
488
413
  in vec2 vUv;
@@ -490,121 +415,99 @@ out vec4 fragColor;
490
415
 
491
416
  uniform float uTime;
492
417
  uniform float uSpeed;
493
- uniform vec2 uAxis; // (a, b) ellipsoidal-norm axis ratio
494
- uniform float uFieldNorm; // field → [0,1] amplitude scale
418
+ uniform float uCellSize; // the topography cell pitch (the contour-warp granularity)
419
+ uniform float uFieldNorm; // height → [0,1] tone scale
495
420
  uniform float uAspect;
496
- uniform int uCenterCount;
497
- uniform int uRingCount;
498
421
  uniform int uStopCount;
499
- uniform int uRenderMode; // 0 traveling-rings · 1 static-contour · 2 both
500
422
  uniform float uHasBackground;
501
- uniform vec3 uLine; // (lineHalfWidth, aaSoftness, contourLevels) — stroke geometry
423
+ uniform vec4 uLine; // (lineHalfWidth, aaSoftness, contourLevels, indexEvery)
424
+ uniform vec2 uLightDir; // the fixed cel-light direction (folded norm.zw)
502
425
  uniform vec3 uBg; // themed background (linear-sRGB)
503
- uniform vec3 uRings[MAX_RINGS]; // (amplitude, wavelength, phase)
504
- uniform vec4 uCenters[MAX_CENTERS]; // (x, y, weight, rotAlpha)
426
+ uniform vec4 uWave; // (waveDirX, waveDirY, waveK, waveOmega)
427
+ uniform vec4 uWave2; // (waveSigma, twistMax, shearMax, amp)
428
+ uniform vec4 uTopo; // (heightOctaves, heightSeed, swellAmp, perturbAmp)
429
+ uniform vec4 uCursor; // (cursorX, cursorY, cursorWell, interactive)
430
+ uniform vec4 uTune; // (toneGain, shadeAmp, indexMul, inkDarken)
505
431
  uniform vec3 uPalette[MAX_RING_STOPS]; // linear-sRGB stops
506
432
 
507
433
  ${r}
508
434
  ${a}
509
435
 
510
- // rotated ellipsoidal radius — transcribes ringField.ts ellipsoidalRadiusRot.
511
- float ellipsoidalRadiusRot(vec2 p, vec2 center, float rotAlpha, float axisA, float axisB) {
512
- float ca = cos(rotAlpha);
513
- float sa = sin(rotAlpha);
514
- float px = p.x - center.x;
515
- float py = p.y - center.y;
516
- float rx = ca * px + sa * py;
517
- float ry = -sa * px + ca * py;
518
- float dx = rx / max(axisA, 1e-4);
519
- float dy = ry / max(axisB, 1e-4);
520
- return sqrt(dx * dx + dy * dy);
521
- }
436
+ // The shared curl operator (flow.glsl.ts — forward-declares potentialFBM).
437
+ ${o}
522
438
 
523
- // |∇r| of the rotated ellipsoidal radius — transcribes ringField.ts ellipsoidalGradMag.
524
- float ellipsoidalGradMag(vec2 p, vec2 center, float rotAlpha, float axisA, float axisB) {
525
- float ca = cos(rotAlpha);
526
- float sa = sin(rotAlpha);
527
- float px = p.x - center.x;
528
- float py = p.y - center.y;
529
- float rx = ca * px + sa * py;
530
- float ry = -sa * px + ca * py;
531
- float a = max(axisA, 1e-4);
532
- float b = max(axisB, 1e-4);
533
- float sx = rx / a;
534
- float sy = ry / b;
535
- float r = sqrt(sx * sx + sy * sy);
536
- float gx = sx / a;
537
- float gy = sy / b;
538
- return sqrt(gx * gx + gy * gy) / max(r, 1e-4);
439
+ // ── The host noise basis (the SAME quintic-faded value-noise the suite speaks) ──
440
+ float hash21(float x, float y) {
441
+ float px = fract(x * 0.1031);
442
+ float py = fract(y * 0.1031);
443
+ float pz = fract(x * 0.1031);
444
+ float d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
445
+ px += d; py += d; pz += d;
446
+ return fract((px + py) * pz);
447
+ }
448
+ float valueNoise(float x, float y) {
449
+ float ix = floor(x); float iy = floor(y);
450
+ float fx = x - ix; float fy = y - iy;
451
+ float ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
452
+ float uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
453
+ float a = hash21(ix, iy);
454
+ float b = hash21(ix + 1.0, iy);
455
+ float c = hash21(ix, iy + 1.0);
456
+ float d2 = hash21(ix + 1.0, iy + 1.0);
457
+ return mix(mix(a, b, ux), mix(c, d2, ux), uy);
458
+ }
459
+ // The curl chunk's forward-declared potentialFBM body.
460
+ float potentialFBM(vec2 p) {
461
+ float v = 0.0; float amp = 0.5; float freq = 1.0;
462
+ float px = p.x; float py = p.y;
463
+ for (int i = 0; i < 3; i++) {
464
+ v += amp * valueNoise(px * freq, py * freq);
465
+ float rx = 0.8 * px - 0.6 * py;
466
+ float ry = 0.6 * px + 0.8 * py;
467
+ px = rx; py = ry; freq *= 2.0; amp *= 0.5;
468
+ }
469
+ return v;
539
470
  }
540
471
 
541
- // f(p,t) — the multi-center weighted radial sum (transcribes ringField.ts sampleRingField).
542
- float sampleRingField(vec2 p, float t) {
543
- float acc = 0.0;
544
- for (int j = 0; j < MAX_CENTERS; j++) {
545
- if (j >= uCenterCount) break;
546
- vec4 cj = uCenters[j];
547
- float radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, uAxis.x, uAxis.y);
548
- float centerSum = 0.0;
549
- for (int i = 0; i < MAX_RINGS; i++) {
550
- if (i >= uRingCount) break;
551
- vec3 r = uRings[i];
552
- float k = TAU / max(r.y, 1e-4);
553
- float omega = sqrt(RING_GRAVITY * k) * uSpeed;
554
- float theta = k * radius - omega * t + r.z;
555
- centerSum += r.x * sin(theta);
556
- }
557
- acc += centerSum * cj.z;
558
- }
559
- return acc;
472
+ // The shared traveling-wave CELL-WARP chunk (spliced AFTER valueNoise + potentialFBM + curl).
473
+ ${f}
474
+
475
+ float smoothstepEdge(float e0, float e1, float x) {
476
+ float t = clamp((x - e0) / max(e1 - e0, 1e-6), 0.0, 1.0);
477
+ return t * t * (3.0 - 2.0 * t);
560
478
  }
561
479
 
562
- // The IQ gradient-normalized isoline ink + the beat envelope (transcribes ringIsolineInk).
563
- // Returns vec2(ink, env).
564
- vec2 ringIsolineInk(vec2 p, float t) {
565
- float ink = 0.0;
566
- float env = 0.0;
567
- float lineHalfW = uLine.x;
568
- float aa = uLine.y;
569
- for (int j = 0; j < MAX_CENTERS; j++) {
570
- if (j >= uCenterCount) break;
571
- vec4 cj = uCenters[j];
572
- float radius = ellipsoidalRadiusRot(p, cj.xy, cj.w, uAxis.x, uAxis.y);
573
- float gradR = ellipsoidalGradMag(p, cj.xy, cj.w, uAxis.x, uAxis.y);
574
- for (int i = 0; i < MAX_RINGS; i++) {
575
- if (i >= uRingCount) break;
576
- vec3 r = uRings[i];
577
- float k = TAU / max(r.y, 1e-4);
578
- float omega = sqrt(RING_GRAVITY * k) * uSpeed;
579
- float phase = k * radius - omega * t + r.z;
580
- float s = sin(phase);
581
- float cphase = abs(cos(phase));
582
- float gradPhase = max(k * gradR, 1e-4);
583
- // The IQ gradient-normalized distance-to-isoline (domain units; round-trips JS).
584
- float de = abs(s) / max(cphase * gradPhase, 1e-4);
585
- // Convert to PIXELS via fwidth(phase) so the stroke is a constant pixel width.
586
- float dPx = max(fwidth(phase), 1e-4);
587
- float dePx = de * gradPhase / dPx;
588
- float lineV = 1.0 - smoothstep(lineHalfW, lineHalfW + aa, dePx);
589
- // Analytic anti-aliasing: fade lines where the rings pack tighter than a pixel can
590
- // resolve (fwidth(phase) ≳ π, near a center / under DPR) so the field stays thin LINES
591
- // instead of flooding to a bright slab (IQ filterwidth).
592
- float aliasFade = 1.0 - smoothstep(PI * 0.6, PI * 1.2, dPx);
593
- lineV *= aliasFade;
594
- float w = r.x * cj.z;
595
- ink = max(ink, lineV * w);
596
- env += s * w;
597
- }
480
+ // The level-set height at domain p (transcribes levelField.ts sampleHeight).
481
+ float sampleHeight(vec2 p, float t) {
482
+ // The CONTINUOUS traveling-wave flow warp (no per-cell seam — the contours flow + twist as
483
+ // the wave passes OVER and THROUGH them, the SAME wave that twists the paper-grid cells).
484
+ vec2 g = waveFlow(p, t, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.y, uWave2.w);
485
+ if (uCursor.w > 0.5) {
486
+ g = cursorSwirl(g, uCursor.xy, uCursor.z * 0.6, uCellSize * 2.5);
487
+ }
488
+ // LOW base frequency → BROAD nested loops (a readable contour map). Octaves carry detail.
489
+ float H = heightField(g * 0.9, uTopo.x, uTopo.y);
490
+ H += uTopo.z * waveSwell(t, uTopo.y);
491
+ if (uCursor.w > 0.5) {
492
+ vec2 d = p - uCursor.xy;
493
+ float d2 = dot(d, d);
494
+ // The cursor HEAVE — a SOFT bulge (a Gaussian peak feathered by a smoothstep falloff so
495
+ // the heave is C1-smooth, NOT a hard-edged quad). The well depth/radius carry the
496
+ // velocity-HEAVE scale (packed JS-side into uCursor.z).
497
+ float g0 = exp(-d2 / 0.22);
498
+ float fall = smoothstepEdge(0.0, 0.55, exp(-d2 / 0.6));
499
+ H += uCursor.z * g0 * fall;
598
500
  }
599
- return vec2(clamp(ink, 0.0, 1.0), env);
501
+ return H;
600
502
  }
601
503
 
602
- // The topographic-contour operator (transcribes contourInk).
603
- float contourInk(float envValue, float levels) {
604
- float fN = envValue * levels;
504
+ // The IQ gradient-free level-set contour ink — KEPT BYTE-FROZEN (the perfect GPU AA). It is
505
+ // FED the per-level half-width 'hw' (a parameter, NOT a re-derivation). 'aaW' floors against a
506
+ // DPR-aware minimum so the index line stays CONTINUOUS where the heave packs contours.
507
+ float contourInk(float fN, float hw) {
605
508
  float band = abs(fract(fN + 0.5) - 0.5);
606
- float aaW = max(fwidth(fN), 1e-4);
607
- return 1.0 - smoothstep(uLine.x, uLine.x + uLine.y, band / aaW);
509
+ float aaW = max(fwidth(fN), 6e-4);
510
+ return 1.0 - smoothstepEdge(hw, hw + uLine.y, band / aaW);
608
511
  }
609
512
 
610
513
  vec3 samplePaletteLin(float t) {
@@ -621,38 +524,50 @@ vec3 samplePaletteLin(float t) {
621
524
  return oklabToLinearSrgb(mix(labA, labB, f));
622
525
  }
623
526
 
527
+ // The SHARED hillshade finite-diff epsilon — pinned ONCE (mirrors levelField.HILLSHADE_EPSILON
528
+ // + the WGSL twin; a per-backend drift would red the L6 numeric parity).
529
+ const float HILLSHADE_E = 0.012;
530
+
624
531
  void main() {
625
532
  float aspect = max(uAspect, 1e-4);
626
533
  vec2 p = vec2(vUv.x * aspect, vUv.y);
534
+ float t = uTime * uSpeed;
535
+ float levels = max(uLine.z, 1.0);
627
536
 
628
- vec2 ie = ringIsolineInk(p, uTime);
629
- float ink = ie.x;
630
- float env = ie.y;
537
+ // The level-set topography (the KEPT field — the PRIMARY path).
538
+ float H = sampleHeight(p, t);
631
539
 
632
- if (uRenderMode == 1) {
633
- ink = contourInk(env * uFieldNorm, max(uLine.z, 1.0));
634
- } else if (uRenderMode == 2) {
635
- ink = max(ink, contourInk(env * uFieldNorm, max(uLine.z, 1.0)));
636
- }
637
- ink = clamp(ink, 0.0, 1.0);
638
-
639
- // The beat-envelope drives the warm-family tone across the ramp (cream↔amber↔ember) so the
640
- // crossing families read as warm-light interference (the warm-cream identity).
641
- float v = clamp(0.5 + env * uFieldNorm, 0.0, 1.0);
642
- vec3 lin = samplePaletteLin(v);
643
- vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
644
-
645
- if (uHasBackground > 0.5) {
646
- vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));
647
- fragColor = vec4(mix(bg, rgb, ink), 1.0);
648
- return;
649
- }
650
- float alpha = ink;
651
- fragColor = vec4(rgb * alpha, alpha);
540
+ // ── 1. HYPSOMETRIC TONE — tanh expands the compressed band (basins+ridges hit the ramp ENDS).
541
+ float tone = 0.5 + 0.5 * tanh(H * uTune.x);
542
+ vec3 fill = samplePaletteLin(tone);
543
+
544
+ // ── 2. ANALYTIC HILLSHADE — one ∇H finite-diff at the SHARED e, dotted with the cel light.
545
+ float e = HILLSHADE_E;
546
+ float hx = sampleHeight(p + vec2(e, 0.0), t) - sampleHeight(p - vec2(e, 0.0), t);
547
+ float hy = sampleHeight(p + vec2(0.0, e), t) - sampleHeight(p - vec2(0.0, e), t);
548
+ vec2 grad = vec2(hx, hy) / (2.0 * e);
549
+ vec2 L = normalize(uLightDir + vec2(1e-5));
550
+ float shade = 0.5 + 0.5 * clamp(dot(normalize(grad + vec2(1e-5)), L), -1.0, 1.0);
551
+ fill *= mix(1.0 - uTune.y, 1.0 + uTune.y, shade);
552
+
553
+ // ── 3. TWO-TIER INDEX/MINOR CONTOUR — isIndex a pure f(level); hw FED to the frozen contourInk.
554
+ float fN = H * levels + uTopo.w * sin(floor(H * levels) * 2.4 + t * 0.7);
555
+ float indexEvery = max(uLine.w, 1.0);
556
+ float lvl = floor(fN);
557
+ float isIndex = fract(lvl / indexEvery) < (0.5 / indexEvery) ? 1.0 : 0.0;
558
+ float hw = mix(uLine.x, uLine.x * uTune.z, isIndex);
559
+ float ink = clamp(contourInk(fN, hw), 0.0, 1.0);
560
+
561
+ // ── 4. INK = a darker ember of the LOCAL fill (the edge-of-its-own-band signature).
562
+ vec3 inkCol = mix(fill, fill * uTune.w, 0.85);
563
+
564
+ // ── 5. ONE color path + OPAQUE OUT — the viz IS the colorful field.
565
+ vec3 col = mix(fill, inkCol, ink);
566
+ fragColor = vec4(clamp(linearToSrgb(col), vec3(0.0), vec3(1.0)), 1.0);
652
567
  }`;
653
568
  //#endregion
654
569
  //#region src/components/custom/concentric/composables/concentricGLSetup.ts
655
- function Z(e, t, n) {
570
+ function K(e, t, n) {
656
571
  let r = e.createShader(t);
657
572
  if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
658
573
  let t = e.getShaderInfoLog(r);
@@ -660,16 +575,16 @@ function Z(e, t, n) {
660
575
  }
661
576
  return r;
662
577
  }
663
- function Q(e) {
664
- let { canvas: t, config: n, getPalette: r, getCenters: i, shouldContinue: a, onFrame: s } = e;
578
+ function q(e) {
579
+ let { canvas: t, config: n, getPalette: r, getCursor: i, getAmp: a, getWellScale: o, shouldContinue: c, onFrame: u } = e;
665
580
  return function(e) {
666
- let l = Z(e, e.VERTEX_SHADER, Y), u = Z(e, e.FRAGMENT_SHADER, X), d = e.createProgram();
667
- if (e.attachShader(d, l), e.attachShader(d, u), e.linkProgram(d), !e.getProgramParameter(d, e.LINK_STATUS)) throw Error(`[Concentric] link failed: ${e.getProgramInfoLog(d)}`);
668
- e.deleteShader(l), e.deleteShader(u);
669
- let f = e.createVertexArray();
670
- e.bindVertexArray(f);
671
- let p = e.createBuffer();
672
- e.bindBuffer(e.ARRAY_BUFFER, p), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
581
+ let d = K(e, e.VERTEX_SHADER, W), f = K(e, e.FRAGMENT_SHADER, G), p = e.createProgram();
582
+ if (e.attachShader(p, d), e.attachShader(p, f), e.linkProgram(p), !e.getProgramParameter(p, e.LINK_STATUS)) throw Error(`[Concentric] link failed: ${e.getProgramInfoLog(p)}`);
583
+ e.deleteShader(d), e.deleteShader(f);
584
+ let m = e.createVertexArray();
585
+ e.bindVertexArray(m);
586
+ let h = e.createBuffer();
587
+ e.bindBuffer(e.ARRAY_BUFFER, h), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
673
588
  -1,
674
589
  -1,
675
590
  3,
@@ -677,128 +592,131 @@ function Q(e) {
677
592
  -1,
678
593
  3
679
594
  ]), e.STATIC_DRAW);
680
- let m = e.getAttribLocation(d, "aPosition");
681
- e.enableVertexAttribArray(m), e.vertexAttribPointer(m, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
682
- let h = (t) => e.getUniformLocation(d, t), g = h("uTime"), _ = h("uSpeed"), v = h("uAxis"), y = h("uFieldNorm"), b = h("uAspect"), x = h("uCenterCount"), S = h("uRingCount"), C = h("uStopCount"), w = h("uRenderMode"), T = h("uHasBackground"), E = h("uLine"), D = h("uBg"), O = h("uRings[0]"), k = h("uCenters[0]"), A = h("uPalette[0]");
683
- function M() {
684
- let n = o(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
685
- (t.width !== a || t.height !== s) && (t.width = a, t.height = s), e.viewport(0, 0, t.width, t.height);
595
+ let g = e.getAttribLocation(p, "aPosition");
596
+ e.enableVertexAttribArray(g), e.vertexAttribPointer(g, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
597
+ let _ = (t) => e.getUniformLocation(p, t), v = _("uTime"), y = _("uSpeed"), b = _("uCellSize"), x = _("uFieldNorm"), S = _("uAspect"), C = _("uStopCount"), w = _("uHasBackground"), T = _("uLine"), E = _("uLightDir"), D = _("uBg"), O = _("uWave"), k = _("uWave2"), A = _("uTopo"), j = _("uCursor"), M = _("uTune"), N = _("uPalette[0]");
598
+ function P() {
599
+ 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));
600
+ (t.width !== a || t.height !== o) && (t.width = a, t.height = o), e.viewport(0, 0, t.width, t.height);
686
601
  }
687
- function N(a) {
688
- s?.(a);
689
- let o = t.clientWidth || 320, l = t.clientHeight || 320, u = o / Math.max(l, 1);
690
- e.useProgram(d), e.bindVertexArray(f), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.uniform1f(g, a), e.uniform1f(_, n.speed), e.uniform2f(v, n.axisRatio[0], n.axisRatio[1]), e.uniform1f(y, B), e.uniform1f(b, u);
691
- let p = i(), m = Math.min(p.length, 4), h = Math.min(n.ringComponents.length, 8), M = r(), N = Math.min(M.length, 4);
692
- if (e.uniform1i(x, m), e.uniform1i(S, h), e.uniform1i(C, N), e.uniform1i(w, j(n.renderMode)), e.uniform3f(E, n.lineWidth, n.lineSoftness, n.contourLevels), n.background === "transparent") e.uniform1f(T, 0), e.uniform3f(D, 0, 0, 0);
602
+ function F(s) {
603
+ u?.(s);
604
+ let c = t.clientWidth || 320, d = t.clientHeight || 320, f = c / Math.max(d, 1);
605
+ 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), e.uniform1f(v, s), e.uniform1f(y, n.speed), e.uniform1f(b, n.cellSize), e.uniform1f(x, L), e.uniform1f(S, f);
606
+ let h = r(), g = Math.min(h.length, 4);
607
+ e.uniform1i(C, g), e.uniform4f(T, n.lineWidth, n.lineSoftness, n.contourLevels, n.indexEvery), e.uniform2f(E, n.lightDir[0], n.lightDir[1]), e.uniform4f(O, n.waveDir[0], n.waveDir[1], n.waveK, n.waveOmega), e.uniform4f(k, n.waveSigma, n.twistMax, n.shearMax, a()), e.uniform4f(A, n.heightOctaves, n.heightSeed, n.swellAmp, n.perturbAmp);
608
+ let _ = i();
609
+ if (e.uniform4f(j, _.x, _.y, n.cursorWell * o(), +!!n.interactive), e.uniform4f(M, n.toneGain, n.shadeAmp, n.indexMul, n.inkDarken), n.background === "transparent") e.uniform1f(w, 0), e.uniform3f(D, 0, 0, 0);
693
610
  else {
694
- e.uniform1f(T, 1);
695
- let t = c(n.background);
611
+ e.uniform1f(w, 1);
612
+ let t = l(n.background);
696
613
  e.uniform3f(D, t[0], t[1], t[2]);
697
614
  }
698
- let P = new Float32Array(24);
699
- for (let e = 0; e < 8; e++) {
700
- let t = n.ringComponents[e];
701
- P[e * 3 + 0] = t?.amplitude ?? 0, P[e * 3 + 1] = t?.wavelength ?? 1, P[e * 3 + 2] = t?.phase ?? 0;
702
- }
703
- e.uniform3fv(O, P);
704
- let F = new Float32Array(16);
615
+ let P = new Float32Array(12);
705
616
  for (let e = 0; e < 4; e++) {
706
- let t = p[e];
707
- F[e * 4 + 0] = t?.x ?? 0, F[e * 4 + 1] = t?.y ?? 0, F[e * 4 + 2] = t?.weight ?? 0, F[e * 4 + 3] = t?.rotAlpha ?? 0;
617
+ let t = l(h[Math.min(e, g - 1)] ?? h[0]);
618
+ P[e * 3 + 0] = t[0], P[e * 3 + 1] = t[1], P[e * 3 + 2] = t[2];
708
619
  }
709
- e.uniform4fv(k, F);
710
- let I = new Float32Array(12);
711
- for (let e = 0; e < 4; e++) {
712
- let t = c(M[Math.min(e, N - 1)] ?? M[0]);
713
- I[e * 3 + 0] = t[0], I[e * 3 + 1] = t[1], I[e * 3 + 2] = t[2];
714
- }
715
- e.uniform3fv(A, I), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
620
+ e.uniform3fv(N, P), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
716
621
  }
717
622
  return {
718
- frame: N,
719
- shouldContinue: a,
720
- resize: M,
623
+ frame: F,
624
+ shouldContinue: c,
625
+ resize: P,
721
626
  teardown: () => {
722
- e.deleteProgram(d), e.deleteVertexArray(f), e.deleteBuffer(p);
627
+ e.deleteProgram(p), e.deleteVertexArray(m), e.deleteBuffer(h);
723
628
  }
724
629
  };
725
630
  };
726
631
  }
727
632
  //#endregion
728
633
  //#region src/components/custom/concentric/composables/useConcentric.ts
729
- function $(e, n) {
730
- let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), c = r.centers.slice(), l = 0, u = () => {
731
- o.onPointerEnter(), r.interactive && v?.wake();
732
- }, d = (e) => {
733
- o.onPointerMove(e), r.interactive && v?.wake();
734
- }, f = (e) => e.parentElement ?? e;
735
- function p(e) {
736
- let t = f(e);
737
- t.addEventListener("pointermove", d), t.addEventListener("pointerenter", u), t.addEventListener("pointerleave", o.onPointerLeave);
634
+ function J(e, n) {
635
+ let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), s = {
636
+ x: 1e6,
637
+ y: 1e6
638
+ }, l = () => s, u = 0, d = () => u, f = 1, p = () => f, m = 0, h = () => {
639
+ o.onPointerEnter(), r.interactive && x?.wake();
640
+ }, g = (e) => {
641
+ o.onPointerMove(e), r.interactive && x?.wake();
642
+ }, _ = (e) => e.parentElement ?? e;
643
+ function v(e) {
644
+ let t = _(e);
645
+ t.addEventListener("pointermove", g), t.addEventListener("pointerenter", h), t.addEventListener("pointerleave", o.onPointerLeave);
738
646
  }
739
- function h(e) {
740
- let t = f(e);
741
- t.removeEventListener("pointermove", d), t.removeEventListener("pointerenter", u), t.removeEventListener("pointerleave", o.onPointerLeave);
647
+ function y(e) {
648
+ let t = _(e);
649
+ t.removeEventListener("pointermove", g), t.removeEventListener("pointerenter", h), t.removeEventListener("pointerleave", o.onPointerLeave);
742
650
  }
743
- function g(e) {
744
- let t = l > 0 ? (e - l) * 1e3 : 16.7;
745
- if (l = e, o.tick(t), c = r.centers.slice(0, 4), !r.interactive || !o.active.value || c.length >= 4) return;
746
- let n = o.smoothedPosition.value, i = o.velocity.value, a = n.x * 2 - 1, s = -(n.y * 2 - 1), u = Math.atan2(i.y, i.x), d = .35 + Math.min(.65, o.burst.value);
747
- c.push({
748
- x: a,
749
- y: s,
750
- weight: d,
751
- rotAlpha: u
752
- });
651
+ function b(t) {
652
+ let n = m > 0 ? (t - m) * 1e3 : 16.7;
653
+ if (m = t, o.tick(n), x?.reducedMotion ? (u = 0, f = 1) : (u += (1.06 - u) * .04, u > 1 && (u = 1 + (u - 1) * .85)), !r.interactive || !o.active.value) {
654
+ s = {
655
+ x: 1e6,
656
+ y: 1e6
657
+ }, f = 1;
658
+ return;
659
+ }
660
+ let i = o.smoothedPosition.value, a = o.velocity.value, c = o.acceleration.value, l = .1, d = .04, p = e.value, h = (p?.clientWidth || 320) / Math.max(p?.clientHeight || 320, 1);
661
+ s = {
662
+ x: (i.x * 2 - 1 + a.x * l + c.x * d) * h,
663
+ y: -(i.y * 2 - 1) - a.y * l - c.y * d
664
+ };
665
+ let g = Math.hypot(a.x, a.y), _ = Math.min(g / 1.2, 1), v = _ * _ * (3 - 2 * _), y = o.burst.value;
666
+ f = 1 + r.velocityHeave * v + r.velocityHeave * .6 * y;
753
667
  }
754
- let _ = () => c, v = null, y = () => {
668
+ let x = null, S = () => {
755
669
  let t = e.value;
756
- return t ? (v || (p(t), v = s(t, {
670
+ return t ? (x || (v(t), x = c(t, {
757
671
  mode: a,
758
672
  respectReducedMotion: r.respectReducedMotion,
759
- setupWGPU: J({
673
+ setupWGPU: U({
760
674
  canvas: t,
761
675
  config: r,
762
676
  getPalette: i,
763
- getCenters: _,
677
+ getCursor: l,
678
+ getAmp: d,
679
+ getWellScale: p,
764
680
  shouldContinue: () => !0,
765
- onFrame: g
681
+ onFrame: b
766
682
  }),
767
- setupGL: Q({
683
+ setupGL: q({
768
684
  canvas: t,
769
685
  config: r,
770
686
  getPalette: i,
771
- getCenters: _,
687
+ getCursor: l,
688
+ getAmp: d,
689
+ getWellScale: p,
772
690
  shouldContinue: () => !0,
773
- onFrame: g
691
+ onFrame: b
774
692
  })
775
- }), v.armAsync()), v) : null;
693
+ }), x.armAsync()), x) : null;
776
694
  };
777
- queueMicrotask(() => y());
778
- let b = {
695
+ queueMicrotask(() => S());
696
+ let C = {
779
697
  get backend() {
780
- return y()?.backend ?? "webgpu";
698
+ return S()?.backend ?? "webgpu";
781
699
  },
782
- pause: () => y()?.suspend("manual"),
783
- resume: () => y()?.resume("manual"),
784
- wake: () => y()?.wake(),
785
- renderAt: (e) => y()?.renderAt(e),
700
+ pause: () => S()?.suspend("manual"),
701
+ resume: () => S()?.resume("manual"),
702
+ wake: () => S()?.wake(),
703
+ renderAt: (e) => S()?.renderAt(e),
786
704
  get reducedMotion() {
787
- return v?.reducedMotion ?? !1;
705
+ return x?.reducedMotion ?? !1;
788
706
  },
789
707
  dispose: () => {
790
708
  let t = e.value;
791
- t && h(t), o.dispose(), v?.dispose();
709
+ t && y(t), o.dispose(), x?.dispose();
792
710
  }
793
711
  };
794
- return m(() => b.dispose()), b;
712
+ return w(() => C.dispose()), C;
795
713
  }
796
714
  //#endregion
797
715
  //#region src/components/custom/concentric/Concentric.vue
798
- var ee = /* @__PURE__ */ e(/* @__PURE__ */ f({
716
+ var Y = /* @__PURE__ */ e(/* @__PURE__ */ S({
799
717
  __name: "Concentric",
800
718
  props: {
801
- config: { default: () => I },
719
+ config: { default: () => P },
802
720
  paused: {
803
721
  type: Boolean,
804
722
  default: !1
@@ -806,24 +724,24 @@ var ee = /* @__PURE__ */ e(/* @__PURE__ */ f({
806
724
  },
807
725
  emits: ["update:paused"],
808
726
  setup(e, { expose: t }) {
809
- let n = g("canvasRef"), r = $(n, {
727
+ let n = E("canvasRef"), { isDark: r } = u(), i = y(() => e.config.palette === A), a = () => i.value && r.value ? j : e.config.palette, o = y(() => i.value ? r.value ? N : M : e.config.background), s = J(n, {
810
728
  config: e.config,
811
- getPalette: () => e.config.palette
729
+ getPalette: a
812
730
  });
813
- _(() => e.paused, (e) => e ? r.pause() : r.resume(), { immediate: !0 });
814
- let i = l(() => {
815
- let t = e.config.background;
816
- if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
731
+ D(() => e.paused, (e) => e ? s.pause() : s.resume(), { immediate: !0 });
732
+ let c = y(() => {
733
+ let e = o.value;
734
+ if (e !== "transparent") return `oklch(${e.L} ${e.C} ${e.h})`;
817
735
  });
818
736
  return t({
819
- pause: r.pause,
820
- resume: r.resume,
821
- wake: r.wake,
822
- renderAt: r.renderAt
823
- }), (e, t) => (h(), u("div", {
737
+ pause: s.pause,
738
+ resume: s.resume,
739
+ wake: s.wake,
740
+ renderAt: s.renderAt
741
+ }), (e, t) => (T(), b("div", {
824
742
  class: "concentric-wrapper",
825
- style: p(i.value ? { background: i.value } : void 0)
826
- }, [d("canvas", {
743
+ style: C(c.value ? { background: c.value } : void 0)
744
+ }, [x("canvas", {
827
745
  ref_key: "canvasRef",
828
746
  ref: n,
829
747
  class: "concentric-canvas",
@@ -831,6 +749,57 @@ var ee = /* @__PURE__ */ e(/* @__PURE__ */ f({
831
749
  "data-testid": "concentric-canvas"
832
750
  }, null, 512)], 4));
833
751
  }
834
- }), [["__scopeId", "data-v-f8bbc88a"]]);
752
+ }), [["__scopeId", "data-v-18ed696c"]]);
753
+ //#endregion
754
+ //#region src/components/custom/concentric/composables/levelField.ts
755
+ function X(e, t) {
756
+ let n = e * .1031 % 1, r = t * .1031 % 1, i = e * .1031 % 1;
757
+ n < 0 && (n += 1), r < 0 && (r += 1), i < 0 && (i += 1);
758
+ let a = n * (r + 33.33) + r * (i + 33.33) + i * (n + 33.33);
759
+ n += a, r += a, i += a;
760
+ let o = (n + r) * i % 1;
761
+ return o < 0 && (o += 1), o;
762
+ }
763
+ function Z(e, t) {
764
+ let n = Math.floor(e), r = Math.floor(t), i = e - n, a = t - r, o = i * i * i * (i * (i * 6 - 15) + 10), s = a * a * a * (a * (a * 6 - 15) + 10), c = X(n, r), l = X(n + 1, r), u = X(n, r + 1), d = X(n + 1, r + 1), f = (e, t, n) => e + (t - e) * n;
765
+ return f(f(c, l, o), f(u, d, o), s);
766
+ }
767
+ function Q(e, t, n) {
768
+ let r = m(h, e, t, n.waveDir, n.waveK, n.waveOmega, n.waveSigma, n.twistMax, n.amp);
769
+ n.interactive > .5 && (r = _(r, n.cursor, n.cursorWell * .6, n.cellSize * 2.5));
770
+ let i = d(Z, {
771
+ x: r.x * .9,
772
+ y: r.y * .9
773
+ }, n.heightOctaves, n.heightSeed);
774
+ if (i += n.swellAmp * v(t, n.heightSeed), n.interactive > .5) {
775
+ let t = e.x - n.cursor.x, r = e.y - n.cursor.y, a = t * t + r * r;
776
+ i += n.cursorWell * Math.exp(-a / .22);
777
+ }
778
+ return i;
779
+ }
780
+ var $ = .012;
781
+ function ee(e, t) {
782
+ return .5 + .5 * Math.tanh(e * t);
783
+ }
784
+ function te(e, t, n, r) {
785
+ let i = $, a = Q({
786
+ x: e.x + i,
787
+ y: e.y
788
+ }, t, n) - Q({
789
+ x: e.x - i,
790
+ y: e.y
791
+ }, t, n), o = Q({
792
+ x: e.x,
793
+ y: e.y + i
794
+ }, t, n) - Q({
795
+ x: e.x,
796
+ y: e.y - i
797
+ }, t, n), s = a / (2 * i), c = o / (2 * i), l = Math.hypot(s, c) + 1e-5, u = Math.hypot(r.x, r.y) + 1e-5, d = s / l * (r.x / u) + c / l * (r.y / u);
798
+ return .5 + .5 * Math.max(-1, Math.min(1, d));
799
+ }
800
+ function ne(e, t) {
801
+ let n = Math.floor(e);
802
+ return +(n / t - Math.floor(n / t) < .5 / t);
803
+ }
835
804
  //#endregion
836
- export { ee as Concentric, F as DEFAULT_CENTERS, I as DEFAULT_CONCENTRIC_CONFIG, P as DEFAULT_RING_COMPONENTS, k as MAX_CENTERS, O as MAX_RINGS, A as MAX_RING_STOPS, v as RING_GRAVITY, M as WARM_IDENTITY_PALETTE, N as buildDefaultRingComponents, D as buildRingFamily, S as ellipsoidalGradMag, x as ellipsoidalRadius, b as ellipsoidalRadiusRot, j as renderModeToInt, w as ringIsolineInk, C as sampleRingField, $ as useConcentric };
805
+ export { Y as Concentric, P as DEFAULT_CONCENTRIC_CONFIG, $ as HILLSHADE_EPSILON, k as MAX_RING_STOPS, N as WARM_GROUND_DARK, M as WARM_GROUND_LIGHT, A as WARM_IDENTITY_PALETTE, j as WARM_IDENTITY_PALETTE_DARK, te as hillshade, ne as isIndexLevel, Q as sampleHeight, ee as toneFromHeight, J as useConcentric };