@mkbabb/glass-ui 6.0.0 → 7.0.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 (910) hide show
  1. package/README.md +36 -34
  2. package/dist/DropdownMenuTrigger-ClIq8RJE.js +93 -0
  3. package/dist/FeedbackMark-DZq5001h.js +23 -0
  4. package/dist/Input-9BlLluik.js +77 -0
  5. package/dist/{PagerDots-BoTQ7g5l.js → PagerDots-BEq0MgtH.js} +85 -81
  6. package/dist/Surface-kFQeYrYv.js +82 -0
  7. package/dist/accent-tone-solve-Cw7WkRD9.js +14 -0
  8. package/dist/animated-digit.js +5 -5
  9. package/dist/asElement-CRnm6A2v.js +9 -0
  10. package/dist/aurora.js +831 -776
  11. package/dist/axes.js +25 -14
  12. package/dist/badge-u65NClWn.js +62 -0
  13. package/dist/badge.js +1 -1
  14. package/dist/blob-config.js +1 -1
  15. package/dist/blob.js +442 -395
  16. package/dist/button-Bu9F4uU6.js +98 -0
  17. package/dist/button.js +2 -2
  18. package/dist/canvas.js +1 -1
  19. package/dist/card-Bk96VI2R.js +234 -0
  20. package/dist/card.js +2 -2
  21. package/dist/carousel.js +109 -169
  22. package/dist/chip-DFZQr6rV.js +129 -0
  23. package/dist/chip.js +2 -81
  24. package/dist/{class-names-5jotTFzp.js → class-names-Cpy5eaBk.js} +11 -4
  25. package/dist/collapsible-BAP95XTt.js +154 -0
  26. package/dist/collapsible.js +1 -1
  27. package/dist/color.js +46 -50
  28. package/dist/{procedural-color.wgsl-B9mLK7v0.js → color.wgsl-Ct5o9dpf.js} +155 -121
  29. package/dist/command-SFqDQ65h.js +320 -0
  30. package/dist/command.js +1 -1
  31. package/dist/completion-seal.js +54 -54
  32. package/dist/components/_shared/FeedbackMark.vue.d.ts +11 -0
  33. package/dist/components/_shared/axes.d.ts +9 -3
  34. package/dist/components/_shared/class-names.d.ts +9 -8
  35. package/dist/components/_shared/control-size.d.ts +2 -0
  36. package/dist/components/_shared/disclosure-context.d.ts +7 -0
  37. package/dist/components/_shared/disclosure.css +1 -0
  38. package/dist/components/_shared/feedback.d.ts +7 -0
  39. package/dist/components/_shared/field-control.css +1 -0
  40. package/dist/components/_shared/field-surfaces.css +1 -1
  41. package/dist/components/_shared/fieldControl.d.ts +13 -0
  42. package/dist/components/_shared/floating.d.ts +14 -0
  43. package/dist/components/_shared/index.d.ts +2 -6
  44. package/dist/components/_shared/interaction.d.ts +23 -0
  45. package/dist/components/_shared/menu.css +1 -1
  46. package/dist/components/_shared/menuRowClass.d.ts +2 -0
  47. package/dist/components/_shared/primitive.d.ts +19 -0
  48. package/dist/components/_shared/resolveSurfaceClass.d.ts +3 -0
  49. package/dist/components/_shared/selection.d.ts +7 -0
  50. package/dist/components/_shared/useMotionAxis.d.ts +3 -2
  51. package/dist/components/accordion/Accordion.vue.d.ts +41 -16
  52. package/dist/components/accordion/AccordionContent.vue.d.ts +11 -9
  53. package/dist/components/accordion/AccordionItem.vue.d.ts +12 -9
  54. package/dist/components/accordion/AccordionTrigger.vue.d.ts +8 -11
  55. package/dist/components/accordion/index.d.ts +4 -4
  56. package/dist/components/alert/Alert.vue.d.ts +9 -5
  57. package/dist/components/alert/index.d.ts +17 -8
  58. package/dist/components/animated-digit/AnimatedDigit.vue.d.ts +2 -3
  59. package/dist/components/aurora/Aurora.vue.d.ts +37 -42
  60. package/dist/components/aurora/composables/atoms-fields.d.ts +13 -2
  61. package/dist/components/aurora/composables/atoms.d.ts +52 -50
  62. package/dist/components/aurora/composables/auroraFallbackGround.d.ts +13 -13
  63. package/dist/components/aurora/composables/auroraImageSource.d.ts +4 -5
  64. package/dist/components/aurora/composables/color.d.ts +15 -20
  65. package/dist/components/aurora/composables/frameLoop.d.ts +14 -11
  66. package/dist/components/aurora/composables/glSetup.d.ts +19 -2
  67. package/dist/components/aurora/composables/runtime.d.ts +56 -60
  68. package/dist/components/aurora/composables/uniformBridge.d.ts +9 -14
  69. package/dist/components/aurora/composables/uniformBridgeWGPU.d.ts +21 -22
  70. package/dist/components/aurora/composables/uniformBridgeWGPUImage.d.ts +13 -13
  71. package/dist/components/aurora/composables/useAurora.d.ts +19 -30
  72. package/dist/components/aurora/composables/wgpuSetup.d.ts +10 -8
  73. package/dist/components/aurora/constants/budget.d.ts +12 -25
  74. package/dist/components/aurora/constants/presets.d.ts +47 -58
  75. package/dist/components/aurora/constants/renderMode.d.ts +21 -36
  76. package/dist/components/aurora/constants/shaders/aurora-image.wgsl.d.ts +1 -1
  77. package/dist/components/aurora/constants/shaders/aurora-mediums.wgsl.d.ts +1 -1
  78. package/dist/components/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
  79. package/dist/components/aurora/constants/shaders/brush.glsl.d.ts +1 -1
  80. package/dist/components/aurora/constants/shaders/composition.glsl.d.ts +1 -1
  81. package/dist/components/aurora/constants/shaders/flow.glsl.d.ts +1 -1
  82. package/dist/components/aurora/constants/shaders/metal-medium.glsl.d.ts +2 -2
  83. package/dist/components/aurora/constants/shaders/oil-modes.glsl.d.ts +1 -1
  84. package/dist/components/aurora/constants/shaders/vangogh-medium.glsl.d.ts +1 -1
  85. package/dist/components/aurora/index.d.ts +2 -1
  86. package/dist/components/avatar/Avatar.vue.d.ts +72 -11
  87. package/dist/components/avatar/AvatarFallback.vue.d.ts +1 -2
  88. package/dist/components/avatar/AvatarImage.vue.d.ts +12 -8
  89. package/dist/components/avatar/index.d.ts +3 -9
  90. package/dist/components/avatar/styles.css +1 -0
  91. package/dist/components/badge/Badge.vue.d.ts +2 -9
  92. package/dist/components/badge/index.d.ts +32 -9
  93. package/dist/components/blob/Blob.vue.d.ts +5 -12
  94. package/dist/components/blob/composables/blobSimulation.d.ts +80 -0
  95. package/dist/components/blob/composables/buildMetaballProgram.d.ts +1 -1
  96. package/dist/components/blob/composables/resolveBlobSurface.d.ts +6 -0
  97. package/dist/components/blob/composables/satelliteKinematics.d.ts +3 -3
  98. package/dist/components/blob/composables/uniformBridgeWGPU.d.ts +1 -1
  99. package/dist/components/blob/composables/uploadBlobUniforms.d.ts +4 -31
  100. package/dist/components/blob/composables/useBlobMood.d.ts +5 -5
  101. package/dist/components/blob/composables/useBlobPointer.d.ts +11 -12
  102. package/dist/components/blob/composables/useMetaballRenderer.d.ts +27 -24
  103. package/dist/components/blob/composables/wgpuSetup.d.ts +7 -5
  104. package/dist/components/blob/config.d.ts +1 -1
  105. package/dist/components/blob/index.d.ts +2 -2
  106. package/dist/components/blob/presets.d.ts +2 -2
  107. package/dist/components/blob/shaders/metaball-palette.wgsl.d.ts +1 -1
  108. package/dist/components/blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
  109. package/dist/components/blob/shaders/metaball.wgsl.d.ts +1 -1
  110. package/dist/components/blob/shaders/sdf-body.glsl.d.ts +1 -1
  111. package/dist/components/blob/shaders/watercolor-edges.glsl.d.ts +1 -1
  112. package/dist/components/blob/types.d.ts +28 -60
  113. package/dist/components/button/Button.vue.d.ts +26 -20
  114. package/dist/components/button/index.d.ts +1 -9
  115. package/dist/components/button/styles.css +1 -0
  116. package/dist/components/card/Card.vue.d.ts +20 -155
  117. package/dist/components/card/CardAction.vue.d.ts +0 -7
  118. package/dist/components/card/CardContent.vue.d.ts +2 -2
  119. package/dist/components/card/CardDescription.vue.d.ts +2 -2
  120. package/dist/components/card/CardFooter.vue.d.ts +2 -2
  121. package/dist/components/card/CardHeader.vue.d.ts +3 -42
  122. package/dist/components/card/CardTitle.vue.d.ts +6 -3
  123. package/dist/components/card/card-scroll.css +1 -1
  124. package/dist/components/card/index.d.ts +1 -3
  125. package/dist/components/card/styles.css +1 -1
  126. package/dist/components/carousel/index.d.ts +0 -2
  127. package/dist/components/carousel/interface.d.ts +2 -0
  128. package/dist/components/checkbox/Checkbox.vue.d.ts +17 -9
  129. package/dist/components/checkbox/index.d.ts +1 -1
  130. package/dist/components/checkbox/styles.css +1 -0
  131. package/dist/components/chip/Chip.vue.d.ts +12 -7
  132. package/dist/components/chip/chipVariants.d.ts +20 -43
  133. package/dist/components/chip/index.d.ts +1 -1
  134. package/dist/components/chip/types.d.ts +45 -30
  135. package/dist/components/collapsible/Collapsible.vue.d.ts +22 -9
  136. package/dist/components/collapsible/CollapsibleContent.vue.d.ts +11 -5
  137. package/dist/components/collapsible/CollapsibleTrigger.vue.d.ts +12 -9
  138. package/dist/components/collapsible/index.d.ts +3 -3
  139. package/dist/components/combobox/Combobox.vue.d.ts +10 -20
  140. package/dist/components/combobox/ComboboxAnchor.vue.d.ts +2 -6
  141. package/dist/components/combobox/ComboboxEmpty.vue.d.ts +2 -6
  142. package/dist/components/combobox/ComboboxGroup.vue.d.ts +2 -7
  143. package/dist/components/combobox/ComboboxInput.vue.d.ts +7 -12
  144. package/dist/components/combobox/ComboboxItem.vue.d.ts +7 -11
  145. package/dist/components/combobox/ComboboxItemIndicator.vue.d.ts +2 -6
  146. package/dist/components/combobox/ComboboxList.vue.d.ts +14 -17
  147. package/dist/components/combobox/ComboboxTrigger.vue.d.ts +16 -0
  148. package/dist/components/combobox/index.d.ts +2 -1
  149. package/dist/components/combobox/types.d.ts +87 -0
  150. package/dist/components/command/Command.vue.d.ts +9 -23
  151. package/dist/components/command/CommandDialog.vue.d.ts +4 -9
  152. package/dist/components/command/CommandEmpty.vue.d.ts +2 -6
  153. package/dist/components/command/CommandGroup.vue.d.ts +2 -7
  154. package/dist/components/command/CommandInput.vue.d.ts +6 -7
  155. package/dist/components/command/CommandItem.vue.d.ts +7 -11
  156. package/dist/components/command/CommandList.vue.d.ts +12 -19
  157. package/dist/components/command/CommandSeparator.vue.d.ts +2 -6
  158. package/dist/components/command/CommandShortcut.vue.d.ts +2 -2
  159. package/dist/components/command/dialogContext.d.ts +6 -0
  160. package/dist/components/command/index.d.ts +10 -10
  161. package/dist/components/command/styles.css +1 -0
  162. package/dist/components/command/types.d.ts +27 -0
  163. package/dist/components/completion-seal/CompletionSeal.vue.d.ts +2 -2
  164. package/dist/components/completion-seal/constants.d.ts +2 -2
  165. package/dist/components/configurator/Configurator.vue.d.ts +6 -6
  166. package/dist/components/configurator/ConfiguratorLayer.vue.d.ts +14 -18
  167. package/dist/components/configurator/ConfiguratorRow.vue.d.ts +14 -17
  168. package/dist/components/configurator/size.d.ts +5 -7
  169. package/dist/components/configurator/styles.css +1 -1
  170. package/dist/components/constellation/Constellation.vue.d.ts +1 -1
  171. package/dist/components/constellation/composables/createConstellationField.d.ts +2 -2
  172. package/dist/components/constellation/constants.d.ts +8 -8
  173. package/dist/components/constellation/constellationField.d.ts +5 -6
  174. package/dist/components/constellation/constellationInteraction.d.ts +8 -8
  175. package/dist/components/constellation/constellationTypes.d.ts +53 -54
  176. package/dist/components/constellation/constellationWell.d.ts +2 -2
  177. package/dist/components/dark-mode-toggle/DarkModeToggle.vue.d.ts +12 -0
  178. package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -0
  179. package/dist/components/dark-mode-toggle/index.d.ts +2 -0
  180. package/dist/components/data-table/DataTable.vue.d.ts +11 -59
  181. package/dist/components/data-table/composables/useDataTableRowIdentity.d.ts +5 -23
  182. package/dist/components/data-table/index.d.ts +1 -1
  183. package/dist/components/data-table/styles.css +1 -0
  184. package/dist/components/data-table/types.d.ts +10 -12
  185. package/dist/components/deck/index.d.ts +0 -1
  186. package/dist/components/dialog/Dialog.vue.d.ts +8 -3
  187. package/dist/components/dialog/DialogClose.vue.d.ts +3 -1
  188. package/dist/components/dialog/DialogContent.vue.d.ts +27 -90
  189. package/dist/components/dialog/DialogDescription.vue.d.ts +5 -6
  190. package/dist/components/dialog/DialogTitle.vue.d.ts +5 -6
  191. package/dist/components/dialog/DialogTrigger.vue.d.ts +3 -1
  192. package/dist/components/{_shared → dialog}/ModalOverlay.vue.d.ts +18 -16
  193. package/dist/components/dialog/dialogStageContext.d.ts +7 -0
  194. package/dist/components/dialog/index.d.ts +8 -8
  195. package/dist/components/dialog/placement.css +1 -1
  196. package/dist/components/dialog/sheet-motion.d.ts +17 -0
  197. package/dist/components/dock/DockControl.vue.d.ts +9 -12
  198. package/dist/components/dock/DockCrossfade.vue.d.ts +4 -8
  199. package/dist/components/dock/DockLayer.vue.d.ts +2 -3
  200. package/dist/components/dock/DockLayerGroup.vue.d.ts +6 -6
  201. package/dist/components/dock/DockSeparator.vue.d.ts +8 -8
  202. package/dist/components/dock/composables/dockContext.d.ts +4 -14
  203. package/dist/components/dock/composables/dockCrossfadeContext.d.ts +6 -7
  204. package/dist/components/dock/composables/dockMorphMeasure.d.ts +7 -86
  205. package/dist/components/dock/composables/index.d.ts +1 -1
  206. package/dist/components/dock/composables/useDockClickIntegrity.d.ts +1 -1
  207. package/dist/components/dock/composables/useDockHold.d.ts +4 -5
  208. package/dist/components/dock/composables/useDockMorph.d.ts +26 -0
  209. package/dist/components/dock/composables/useDockOverflowFit.d.ts +4 -6
  210. package/dist/components/dock/composables/useDockSearch.d.ts +8 -8
  211. package/dist/components/dock/composables/useDockShellProps.d.ts +46 -43
  212. package/dist/components/dock/composables/useDockSpring.d.ts +7 -11
  213. package/dist/components/dock/composables/useDockState.d.ts +12 -3
  214. package/dist/components/dock/composables/useDockTouchGate.d.ts +14 -23
  215. package/dist/components/dock/constants.d.ts +5 -78
  216. package/dist/components/dock/index.d.ts +2 -7
  217. package/dist/components/dock/styles/controls.css +1 -1
  218. package/dist/components/dock/styles/crossfade.css +1 -1
  219. package/dist/components/dock/styles/density.css +1 -1
  220. package/dist/components/dock/styles/index.css +1 -1
  221. package/dist/components/dock/styles/layer-group.css +1 -1
  222. package/dist/components/dock/styles/layers.css +1 -1
  223. package/dist/components/dock/styles/morph.css +1 -1
  224. package/dist/components/dock/styles/shape.css +1 -1
  225. package/dist/components/dock/styles/shell.css +1 -1
  226. package/dist/components/drawer/Drawer.vue.d.ts +17 -20
  227. package/dist/components/drawer/DrawerContent.vue.d.ts +15 -16
  228. package/dist/components/drawer/DrawerDescription.vue.d.ts +5 -6
  229. package/dist/components/drawer/DrawerOverlay.vue.d.ts +6 -6
  230. package/dist/components/drawer/DrawerTitle.vue.d.ts +5 -6
  231. package/dist/components/drawer/composables/drawerSnapContext.d.ts +7 -1
  232. package/dist/components/drawer/composables/useDrawerSnap.d.ts +3 -1
  233. package/dist/components/drawer/constants.d.ts +7 -25
  234. package/dist/components/drawer/index.d.ts +10 -10
  235. package/dist/components/drawer/styles.css +1 -1
  236. package/dist/components/dropdown-menu/DropdownMenu.vue.d.ts +43 -16
  237. package/dist/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +22 -13
  238. package/dist/components/dropdown-menu/DropdownMenuContent.vue.d.ts +28 -19
  239. package/dist/components/dropdown-menu/DropdownMenuGroup.vue.d.ts +6 -4
  240. package/dist/components/dropdown-menu/DropdownMenuItem.vue.d.ts +21 -9
  241. package/dist/components/dropdown-menu/DropdownMenuLabel.vue.d.ts +9 -9
  242. package/dist/components/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +13 -6
  243. package/dist/components/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +18 -11
  244. package/dist/components/dropdown-menu/DropdownMenuSeparator.vue.d.ts +5 -6
  245. package/dist/components/dropdown-menu/DropdownMenuShortcut.vue.d.ts +7 -8
  246. package/dist/components/dropdown-menu/DropdownMenuSub.vue.d.ts +15 -7
  247. package/dist/components/dropdown-menu/DropdownMenuSubContent.vue.d.ts +24 -17
  248. package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +11 -9
  249. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +15 -8
  250. package/dist/components/dropdown-menu/index.d.ts +15 -15
  251. package/dist/components/dropdown-menu/styles.css +1 -0
  252. package/dist/components/dropdown-menu/useMenuTrigger.d.ts +2 -9
  253. package/dist/components/easing/composables/useEasingPicker.d.ts +5 -8
  254. package/dist/components/easing/constants.d.ts +1 -1
  255. package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +1 -25
  256. package/dist/components/expandable-container/styles.css +1 -0
  257. package/dist/components/fading-scroll/FadingScroll.vue.d.ts +4 -0
  258. package/dist/components/fading-scroll/composables/useFadingScroll.d.ts +4 -0
  259. package/dist/components/fading-scroll/constants.d.ts +1 -2
  260. package/dist/components/fourier-field/FourierField.vue.d.ts +3 -5
  261. package/dist/components/fourier-field/composables/fourierFieldGLSetup.d.ts +1 -1
  262. package/dist/components/fourier-field/composables/fourierFieldWGPUSetup.d.ts +1 -1
  263. package/dist/components/fourier-field/composables/useFourierField.d.ts +4 -4
  264. package/dist/components/fourier-field/constants.d.ts +10 -10
  265. package/dist/components/fourier-field/index.d.ts +3 -3
  266. package/dist/components/fourier-field/presets.d.ts +3 -3
  267. package/dist/components/fourier-field/shaders/fourier-field.glsl.d.ts +2 -2
  268. package/dist/components/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -1
  269. package/dist/components/handmark/HandMark.vue.d.ts +1 -1
  270. package/dist/components/handmark/brush.d.ts +1 -1
  271. package/dist/components/handmark/composables/useHandMark.d.ts +4 -4
  272. package/dist/components/handmark/constants.d.ts +10 -10
  273. package/dist/components/handmark/geometry.d.ts +8 -8
  274. package/dist/components/handmark/index.d.ts +7 -8
  275. package/dist/components/handmark/noise.d.ts +3 -3
  276. package/dist/components/handmark/types.d.ts +2 -2
  277. package/dist/components/header-ribbon/HeaderRibbon.vue.d.ts +3 -21
  278. package/dist/components/header-ribbon/styles.css +1 -0
  279. package/dist/components/header-ribbon/types.d.ts +5 -2
  280. package/dist/components/index.d.ts +0 -3
  281. package/dist/components/infinite-scroll/composables/types.d.ts +1 -1
  282. package/dist/components/input/Input.vue.d.ts +10 -35
  283. package/dist/components/input/index.d.ts +2 -1
  284. package/dist/components/input/types.d.ts +22 -0
  285. package/dist/components/instrument-chassis/InstrumentChassis.vue.d.ts +10 -84
  286. package/dist/components/instrument-chassis/index.d.ts +1 -2
  287. package/dist/components/instrument-chassis/styles.css +1 -1
  288. package/dist/components/instrument-chassis/types.d.ts +13 -0
  289. package/dist/components/label/Label.vue.d.ts +9 -14
  290. package/dist/components/label/index.d.ts +1 -1
  291. package/dist/components/labeled-field/LabeledField.vue.d.ts +10 -108
  292. package/dist/components/labeled-field/LabeledInput.vue.d.ts +3 -23
  293. package/dist/components/labeled-field/LabeledSelect.vue.d.ts +12 -18
  294. package/dist/components/labeled-field/LabeledSlider.vue.d.ts +12 -18
  295. package/dist/components/labeled-field/LabeledSwitch.vue.d.ts +14 -17
  296. package/dist/components/labeled-field/index.d.ts +1 -0
  297. package/dist/components/labeled-field/types.d.ts +50 -0
  298. package/dist/components/liquid-grid/composables/liquidGrid.d.ts +5 -5
  299. package/dist/components/liquid-grid/constants.d.ts +6 -7
  300. package/dist/components/liquid-grid/shaders/liquid-grid.glsl.d.ts +1 -1
  301. package/dist/components/liquid-grid/shaders/liquid-grid.wgsl.d.ts +1 -1
  302. package/dist/components/metric/Metric.vue.d.ts +24 -0
  303. package/dist/components/metric/MetricCell.vue.d.ts +26 -0
  304. package/dist/components/metric/MetricRow.vue.d.ts +22 -0
  305. package/dist/components/metric/MetricStack.vue.d.ts +16 -0
  306. package/dist/components/metric/coalesce-metric.d.ts +7 -28
  307. package/dist/components/metric/index.d.ts +5 -0
  308. package/dist/components/metric/styles.css +1 -0
  309. package/dist/components/metric/types.d.ts +32 -0
  310. package/dist/components/number-field/NumberField.vue.d.ts +21 -9
  311. package/dist/components/number-field/NumberFieldContent.vue.d.ts +2 -2
  312. package/dist/components/number-field/NumberFieldDecrement.vue.d.ts +6 -6
  313. package/dist/components/number-field/NumberFieldIncrement.vue.d.ts +6 -6
  314. package/dist/components/number-field/NumberFieldInput.vue.d.ts +1 -6
  315. package/dist/components/number-field/context.d.ts +6 -0
  316. package/dist/components/number-field/index.d.ts +5 -5
  317. package/dist/components/number-field/styles.css +1 -0
  318. package/dist/components/pager-dots/constants.d.ts +1 -2
  319. package/dist/components/pager-dots/index.d.ts +0 -2
  320. package/dist/components/paper-backdrop/PaperBackdrop.vue.d.ts +1 -14
  321. package/dist/components/paper-backdrop/index.d.ts +1 -1
  322. package/dist/components/popover/Popover.vue.d.ts +24 -36
  323. package/dist/components/popover/PopoverContent.vue.d.ts +23 -29
  324. package/dist/components/popover/PopoverTrigger.vue.d.ts +12 -7
  325. package/dist/components/popover/index.d.ts +3 -3
  326. package/dist/components/popover/popoverContext.d.ts +3 -4
  327. package/dist/components/progress/Progress.vue.d.ts +5 -13
  328. package/dist/components/progress/index.d.ts +1 -0
  329. package/dist/components/progress/types.d.ts +19 -0
  330. package/dist/components/pulse/Pulse.vue.d.ts +8 -47
  331. package/dist/components/pulse/index.d.ts +1 -0
  332. package/dist/components/radio-group/RadioGroup.vue.d.ts +27 -15
  333. package/dist/components/radio-group/RadioGroupItem.vue.d.ts +9 -6
  334. package/dist/components/radio-group/index.d.ts +2 -0
  335. package/dist/components/radio-group/styles.css +1 -0
  336. package/dist/components/scroll-progress-rim/styles.css +1 -1
  337. package/dist/components/search/FuzzySearch.vue.d.ts +2 -2
  338. package/dist/components/search/SearchBar.vue.d.ts +2 -2
  339. package/dist/components/search/searchVariants.d.ts +15 -17
  340. package/dist/components/select/Select.vue.d.ts +25 -14
  341. package/dist/components/select/SelectContent.vue.d.ts +26 -29
  342. package/dist/components/select/SelectGroup.vue.d.ts +7 -11
  343. package/dist/components/select/SelectItem.vue.d.ts +24 -13
  344. package/dist/components/select/SelectLabel.vue.d.ts +7 -11
  345. package/dist/components/select/SelectScrollDownButton.vue.d.ts +3 -4
  346. package/dist/components/select/SelectScrollUpButton.vue.d.ts +3 -4
  347. package/dist/components/select/SelectSeparator.vue.d.ts +5 -6
  348. package/dist/components/select/SelectTrigger.vue.d.ts +15 -41
  349. package/dist/components/select/SelectValue.vue.d.ts +13 -7
  350. package/dist/components/select/index.d.ts +16 -8
  351. package/dist/components/separator/Separator.vue.d.ts +11 -6
  352. package/dist/components/separator/index.d.ts +1 -1
  353. package/dist/components/skeleton/Skeleton.vue.d.ts +3 -31
  354. package/dist/components/slider/Slider.vue.d.ts +10 -37
  355. package/dist/components/slider/index.d.ts +1 -45
  356. package/dist/components/slider/types.d.ts +25 -0
  357. package/dist/components/sortable-list/SortableList.vue.d.ts +1 -1
  358. package/dist/components/sortable-list/composables/ghostRenderer.d.ts +1 -1
  359. package/dist/components/sortable-list/composables/touchGate.d.ts +1 -1
  360. package/dist/components/sortable-list/composables/transitionTiming.d.ts +1 -1
  361. package/dist/components/status-dot/StatusDot.vue.d.ts +7 -10
  362. package/dist/components/status-dot/index.d.ts +1 -0
  363. package/dist/components/surface/Surface.vue.d.ts +13 -21
  364. package/dist/components/surface/index.d.ts +2 -2
  365. package/dist/components/switch/Switch.vue.d.ts +20 -11
  366. package/dist/components/switch/index.d.ts +2 -1
  367. package/dist/components/switch/styles.css +1 -0
  368. package/dist/components/table/Table.vue.d.ts +1 -1
  369. package/dist/components/tabs/SegmentedTabs.vue.d.ts +21 -13
  370. package/dist/components/tabs/composables/useTabDragMorph.d.ts +6 -6
  371. package/dist/components/tabs/composables/useTabResponsive.d.ts +5 -6
  372. package/dist/components/tabs/composables/useTabRovingFocus.d.ts +16 -16
  373. package/dist/components/tabs/constants.d.ts +1 -1
  374. package/dist/components/tabs/index.d.ts +1 -1
  375. package/dist/components/tabs/styles/drag.css +1 -1
  376. package/dist/components/tabs/styles/segmented.css +1 -1
  377. package/dist/components/tags-input/TagsInput.vue.d.ts +28 -15
  378. package/dist/components/tags-input/TagsInputInput.vue.d.ts +8 -6
  379. package/dist/components/tags-input/TagsInputItem.vue.d.ts +9 -8
  380. package/dist/components/tags-input/TagsInputItemDelete.vue.d.ts +5 -6
  381. package/dist/components/tags-input/TagsInputItemText.vue.d.ts +5 -6
  382. package/dist/components/tags-input/context.d.ts +5 -0
  383. package/dist/components/tags-input/index.d.ts +5 -5
  384. package/dist/components/tags-input/styles.css +1 -0
  385. package/dist/components/textarea/Textarea.vue.d.ts +10 -55
  386. package/dist/components/textarea/index.d.ts +2 -1
  387. package/dist/components/textarea/types.d.ts +22 -0
  388. package/dist/components/timeline/ContinuousMarkers.vue.d.ts +2 -4
  389. package/dist/components/timeline/ContinuousRail.vue.d.ts +3 -6
  390. package/dist/components/timeline/ContinuousTimeline.vue.d.ts +12 -13
  391. package/dist/components/timeline/GlassTimeline.vue.d.ts +7 -8
  392. package/dist/components/timeline/ScrubberTimeline.vue.d.ts +4 -4
  393. package/dist/components/timeline/SegmentedTimeline.vue.d.ts +2 -3
  394. package/dist/components/timeline/geometry.d.ts +3 -4
  395. package/dist/components/timeline/types.d.ts +3 -3
  396. package/dist/components/toast/Toast.vue.d.ts +37 -79
  397. package/dist/components/toast/ToastAction.vue.d.ts +5 -5
  398. package/dist/components/toast/ToastClose.vue.d.ts +4 -5
  399. package/dist/components/toast/ToastDescription.vue.d.ts +4 -5
  400. package/dist/components/toast/ToastTitle.vue.d.ts +4 -5
  401. package/dist/components/toast/Toaster.vue.d.ts +1 -1
  402. package/dist/components/toast/index.d.ts +8 -9
  403. package/dist/components/toast/use-toast.d.ts +20 -163
  404. package/dist/components/toggle-group/ToggleGroup.vue.d.ts +44 -22
  405. package/dist/components/toggle-group/ToggleGroupItem.vue.d.ts +11 -9
  406. package/dist/components/toggle-group/index.d.ts +3 -2
  407. package/dist/components/toggle-group/styles.css +1 -0
  408. package/dist/components/toggle-group/toggleGroupContext.d.ts +4 -15
  409. package/dist/components/tooltip/Tooltip.vue.d.ts +20 -7
  410. package/dist/components/tooltip/TooltipContent.vue.d.ts +20 -12
  411. package/dist/components/tooltip/TooltipProvider.vue.d.ts +12 -5
  412. package/dist/components/tooltip/TooltipTrigger.vue.d.ts +12 -5
  413. package/dist/components/tooltip/index.d.ts +4 -4
  414. package/dist/components/typewriter/composables/useTypewriter.d.ts +1 -0
  415. package/dist/components/typewriter/utils/timing.d.ts +0 -2
  416. package/dist/components/watercolor-dot/WatercolorDot.vue.d.ts +5 -18
  417. package/dist/components/watercolor-dot/useWatercolorBlob.d.ts +1 -4
  418. package/dist/composables/color/accent-tone-solve.d.ts +2 -5
  419. package/dist/composables/color/index.d.ts +31 -38
  420. package/dist/composables/color/useAccentTone.d.ts +0 -3
  421. package/dist/composables/color/value.d.ts +21 -0
  422. package/dist/composables/context/createContext.d.ts +2 -2
  423. package/dist/composables/dark/index.d.ts +1 -1
  424. package/dist/composables/dark/useGlobalDark.d.ts +7 -6
  425. package/dist/composables/dom/useBreakpoint.d.ts +2 -2
  426. package/dist/composables/dom/useClipboard.d.ts +28 -52
  427. package/dist/composables/dom/useDocumentVisibility.d.ts +3 -1
  428. package/dist/composables/dom/useIdleReady.d.ts +5 -6
  429. package/dist/composables/dom/useTokenColor.d.ts +2 -2
  430. package/dist/composables/dom/useUserInvalidAria.d.ts +2 -3
  431. package/dist/composables/dom/useViewportReady.d.ts +4 -4
  432. package/dist/composables/glass/backdropLuminanceSample.d.ts +7 -6
  433. package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +7 -1
  434. package/dist/composables/glass/textureUpload.d.ts +8 -10
  435. package/dist/composables/glass/useGlassBackdropLuminance.d.ts +11 -19
  436. package/dist/composables/glass/useSpecularPointer.d.ts +6 -6
  437. package/dist/composables/glass/useSpecularTracking.d.ts +12 -15
  438. package/dist/composables/glass/wave/waveField.d.ts +2 -2
  439. package/dist/composables/glass/wave/waveField.glsl.d.ts +1 -1
  440. package/dist/composables/glass/wave/waveField.wgsl.d.ts +1 -1
  441. package/dist/composables/glass/webgl/backingSize.d.ts +5 -8
  442. package/dist/composables/glass/webgl/compile.d.ts +1 -1
  443. package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +20 -20
  444. package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +16 -28
  445. package/dist/composables/glass/webgl/visibility.d.ts +3 -4
  446. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +10 -10
  447. package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +1 -1
  448. package/dist/composables/glass/webgpu/webgpuCanvasTypes.d.ts +12 -10
  449. package/dist/composables/glass/webgpu/webgpuDevice.d.ts +15 -16
  450. package/dist/composables/motion/core/asElement.d.ts +2 -0
  451. package/dist/composables/motion/{constants.d.ts → core/constants.d.ts} +2 -3
  452. package/dist/composables/motion/core/index.d.ts +20 -23
  453. package/dist/composables/motion/core/useReducedMotion.d.ts +5 -0
  454. package/dist/composables/motion/core/useViewTransition.d.ts +44 -0
  455. package/dist/composables/motion/index.d.ts +14 -16
  456. package/dist/composables/motion/{useDockCtaReceive.d.ts → morph/useDockCtaReceive.d.ts} +2 -3
  457. package/dist/composables/motion/{useDragMorph.d.ts → morph/useDragMorph.d.ts} +7 -7
  458. package/dist/composables/motion/morph/useElementMorph.d.ts +50 -0
  459. package/dist/composables/motion/{useLeadTrail.d.ts → morph/useLeadTrail.d.ts} +6 -6
  460. package/dist/composables/motion/{useSelectionGroup.d.ts → morph/useSelectionGroup.d.ts} +7 -5
  461. package/dist/composables/motion/{useSelectionIndicator.d.ts → morph/useSelectionIndicator.d.ts} +9 -16
  462. package/dist/composables/motion/{useNumericTransition.d.ts → number/useNumericTransition.d.ts} +2 -2
  463. package/dist/composables/motion/{pointerFieldMappings.d.ts → pointer/pointerFieldMappings.d.ts} +7 -10
  464. package/dist/composables/motion/{usePointerVelocityField.d.ts → pointer/usePointerVelocityField.d.ts} +1 -1
  465. package/dist/composables/motion/{bloomUpField.d.ts → reveal/bloomUpField.d.ts} +1 -1
  466. package/dist/composables/motion/reveal/useBloomUp.d.ts +33 -0
  467. package/dist/composables/motion/{useLiquidReveal.d.ts → reveal/useLiquidReveal.d.ts} +5 -5
  468. package/dist/composables/motion/{useStagger.d.ts → reveal/useStagger.d.ts} +3 -3
  469. package/dist/composables/motion/reveal/useStaggerReveal.d.ts +28 -0
  470. package/dist/composables/motion/{useScrollChrome.d.ts → scroll/useScrollChrome.d.ts} +2 -2
  471. package/dist/composables/motion/{useScrollProgress.d.ts → scroll/useScrollProgress.d.ts} +12 -2
  472. package/dist/composables/motion/{springPresets.d.ts → spring/springPresets.d.ts} +8 -7
  473. package/dist/composables/motion/{springProjection.d.ts → spring/springProjection.d.ts} +3 -0
  474. package/dist/composables/motion/{useLiquidFlex.d.ts → spring/useLiquidFlex.d.ts} +11 -12
  475. package/dist/composables/motion/{useLiquidPress.d.ts → spring/useLiquidPress.d.ts} +3 -3
  476. package/dist/composables/motion/{useSpring.d.ts → spring/useSpring.d.ts} +5 -2
  477. package/dist/composables/motion/{useSpringMount.d.ts → spring/useSpringMount.d.ts} +8 -1
  478. package/dist/composables/sidebar/types.d.ts +3 -3
  479. package/dist/{configurator-CSENXXSy.js → configurator-M5OaIlJd.js} +11 -11
  480. package/dist/configurator.js +1 -1
  481. package/dist/{constants-DRZmNIY-.js → constants-nBz23tJE.js} +1 -1
  482. package/dist/constellation.js +125 -124
  483. package/dist/{createCanvasLifecycle-hsFkQVdl.js → createCanvasLifecycle-DbXRwjU_.js} +87 -82
  484. package/dist/dark-mode-toggle.d.ts +1 -0
  485. package/dist/dark-mode-toggle.js +43 -0
  486. package/dist/dark.js +1 -1
  487. package/dist/data-table-BygKg6ZA.js +491 -0
  488. package/dist/data-table.js +1 -1
  489. package/dist/deck.js +3 -3
  490. package/dist/dialog-TNRDkcE4.js +385 -0
  491. package/dist/dialog.js +1 -1
  492. package/dist/dock.js +523 -940
  493. package/dist/dockContext-BUTlGRNJ.js +13 -0
  494. package/dist/dom.js +52 -114
  495. package/dist/drawer.js +262 -209
  496. package/dist/dropdown-menu-BlbnvMaZ.js +507 -0
  497. package/dist/dropdown-menu.js +2 -2
  498. package/dist/easing.js +294 -278
  499. package/dist/expandable-container.js +107 -93
  500. package/dist/fading-scroll-DhxXIhm2.js +96 -0
  501. package/dist/fading-scroll.js +1 -1
  502. package/dist/field-control.css_vue_type_style_index_0_src_true_lang-CeLay9Tk.js +21 -0
  503. package/dist/floating-dB5TD88k.js +7 -0
  504. package/dist/{flow.glsl-DEGFGE11.js → flow.wgsl-Cd2GUkPx.js} +2 -2
  505. package/dist/fonts/README.md +14 -18
  506. package/dist/forms.js +279 -174
  507. package/dist/fourier-field.js +148 -148
  508. package/dist/glass-ui.css +1 -1
  509. package/dist/glass-ui.js +512 -373
  510. package/dist/handmark.js +4 -4
  511. package/dist/header-ribbon.js +37 -68
  512. package/dist/index.d.ts +9 -18
  513. package/dist/infinite-scroll.js +31 -28
  514. package/dist/instrument-chassis.js +54 -2
  515. package/dist/label-DnMqH7jr.js +55 -0
  516. package/dist/label.js +1 -1
  517. package/dist/labeled-field.js +291 -214
  518. package/dist/liquid-grid.js +141 -151
  519. package/dist/menuRowClass-Nh7CtMON.js +12 -0
  520. package/dist/metric.d.ts +1 -0
  521. package/dist/metric.js +192 -0
  522. package/dist/motion-core.js +73 -165
  523. package/dist/motion.js +104 -161
  524. package/dist/number-field-Boe09SvX.js +154 -0
  525. package/dist/number-field.js +1 -1
  526. package/dist/pager-dots.js +2 -2
  527. package/dist/paper-backdrop.js +16 -24
  528. package/dist/{pointerFieldMappings-CZojkgKj.js → pointerFieldMappings-DP5tla5z.js} +4 -7
  529. package/dist/popover-BQGYXZyO.js +244 -0
  530. package/dist/popover.js +1 -1
  531. package/dist/{presets-CxeNvxuO.js → presets-5myqNv59.js} +1 -1
  532. package/dist/primitive-B2t2jdqM.js +11 -0
  533. package/dist/progress-DClbhRAT.js +88 -0
  534. package/dist/progress.js +1 -1
  535. package/dist/pulse.js +29 -43
  536. package/dist/reactive.js +1 -1
  537. package/dist/resolveCanvasColor-DS_6DBxA.js +82 -0
  538. package/dist/resolveSurfaceClass-DCZ4PZcy.js +6 -0
  539. package/dist/{scrollReader-C2oK9Hb8.js → scrollReader-Brf5cQNo.js} +1 -1
  540. package/dist/search.js +241 -213
  541. package/dist/select-BcBAyLXA.js +336 -0
  542. package/dist/select.js +1 -1
  543. package/dist/selection-DqIULxRG.js +6 -0
  544. package/dist/separator-CgZInrX-.js +75 -0
  545. package/dist/separator.js +1 -1
  546. package/dist/sidebar.js +53 -42
  547. package/dist/slider-DzqeQmMu.js +162 -0
  548. package/dist/slider.js +2 -2
  549. package/dist/sortable-list.js +9 -8
  550. package/dist/springPresets-rCii5KqX.js +52 -0
  551. package/dist/status-dot.js +26 -43
  552. package/dist/styles/accessibility.css +1 -1
  553. package/dist/styles/animations.css +1 -1
  554. package/dist/styles/components.css +1 -1
  555. package/dist/styles/glass/a11y-fallback.css +1 -1
  556. package/dist/styles/glass/accent-tone.css +1 -1
  557. package/dist/styles/glass/control-surfaces.css +1 -1
  558. package/dist/styles/glass/defined.css +1 -1
  559. package/dist/styles/glass/glass-atom.css +1 -1
  560. package/dist/styles/glass/glass-capsule.css +1 -1
  561. package/dist/styles/glass/glass-chip.css +1 -1
  562. package/dist/styles/glass/ladder.css +1 -1
  563. package/dist/styles/glass/liquid-fill.css +1 -1
  564. package/dist/styles/glass/material-roles.css +1 -1
  565. package/dist/styles/glass/material.css +1 -1
  566. package/dist/styles/glass/reveal.css +1 -1
  567. package/dist/styles/glass/squircle.css +1 -1
  568. package/dist/styles/glass/surface-axis.css +1 -1
  569. package/dist/styles/glass/surfaces-pager.css +1 -1
  570. package/dist/styles/glass/surfaces.css +1 -1
  571. package/dist/styles/glass-refract.css +1 -1
  572. package/dist/styles/glass.css +1 -1
  573. package/dist/styles/index.css +1 -1
  574. package/dist/styles/paper.css +1 -1
  575. package/dist/styles/scroll-driven.css +1 -1
  576. package/dist/styles/theme/bridges.css +1 -1
  577. package/dist/styles/theme/radius.css +1 -1
  578. package/dist/styles/tokens/color-radius.css +1 -1
  579. package/dist/styles/tokens/dark-arm.css +1 -1
  580. package/dist/styles/tokens/glass-deep.css +1 -1
  581. package/dist/styles/tokens/glass-fx.css +1 -1
  582. package/dist/styles/tokens/glass.css +1 -1
  583. package/dist/styles/tokens/light-dark.css +1 -1
  584. package/dist/styles/tokens/manifest.d.ts +14 -0
  585. package/dist/styles/tokens/manifest.ts +56 -0
  586. package/dist/styles/tokens/motion-registers.css +1 -1
  587. package/dist/styles/tokens/offsets.css +1 -1
  588. package/dist/styles/tokens/property-regs-specular.css +1 -1
  589. package/dist/styles/tokens/property-regs.css +1 -1
  590. package/dist/styles/tokens/scale-paper.css +1 -1
  591. package/dist/styles/tokens/scheme-motion.css +1 -1
  592. package/dist/styles/tokens/scheme-spring.css +1 -1
  593. package/dist/styles/tokens/scroll-tokens.css +1 -1
  594. package/dist/styles/tokens/shadow.css +1 -1
  595. package/dist/styles/tokens/sizing-config.css +1 -1
  596. package/dist/styles/tokens/sizing.css +1 -1
  597. package/dist/styles/tokens.d.ts +4 -9
  598. package/dist/styles/tokens.ts +5 -9
  599. package/dist/styles/transitions.css +1 -1
  600. package/dist/styles/typography/scale.css +1 -1
  601. package/dist/styles/typography/semantic.css +1 -1
  602. package/dist/styles/typography/utilities.css +1 -1
  603. package/dist/styles/utilities/a11y-overrides.css +1 -1
  604. package/dist/styles/utilities/base-misc.css +1 -1
  605. package/dist/styles/utilities/base.css +1 -1
  606. package/dist/styles/utilities/btn.css +1 -1
  607. package/dist/styles/utilities/components.css +1 -1
  608. package/dist/styles/utilities/metal.css +1 -1
  609. package/dist/styles/utilities/responsive.css +1 -0
  610. package/dist/styles/view-transition.css +1 -1
  611. package/dist/{supportsCssTimeline-Dz-GVxXM.js → supportsCssTimeline-C2zyWpl8.js} +1 -1
  612. package/dist/surface.js +2 -3
  613. package/dist/switch-DZjQuFLa.js +54 -0
  614. package/dist/switch.js +1 -1
  615. package/dist/tabs.js +141 -169
  616. package/dist/timeline.js +86 -87
  617. package/dist/toast-CH5mnsYT.js +267 -0
  618. package/dist/toast.js +1 -1
  619. package/dist/toggle-group-O6jBo7AE.js +150 -0
  620. package/dist/toggle-group.js +1 -1
  621. package/dist/tokens.js +96 -5
  622. package/dist/tooltip-Drx5qnw_.js +148 -0
  623. package/dist/tooltip.js +1 -1
  624. package/dist/typewriter.js +222 -193
  625. package/dist/{useAccentTone-C-p6WdPe.js → useAccentTone-DyInfHXE.js} +2 -2
  626. package/dist/{useAnimatedNumber-BRVVaFFc.js → useAnimatedNumber-WPtMz0AN.js} +2 -2
  627. package/dist/useClipboard-D36OTaeT.js +53 -0
  628. package/dist/useDockCtaReceive-DkrOTM0q.js +146 -0
  629. package/dist/useDocumentVisibility-Dh_TGXsU.js +21 -0
  630. package/dist/useDragMorph-BogSV_nv.js +293 -0
  631. package/dist/{useIntersectionPause-B-dbxl9w.js → useIntersectionPause-B5mAU6XY.js} +15 -15
  632. package/dist/useLeadTrail-AW1-zZcd.js +74 -0
  633. package/dist/{useLiquidFlex-Ch4exNvN.js → useLiquidFlex-TJZmRqyY.js} +1 -1
  634. package/dist/useLiquidPress-BOxuDkKa.js +101 -0
  635. package/dist/useMotionAxis-D-rtIhca.js +19 -0
  636. package/dist/usePointerVelocityField-DsIf7yyq.js +121 -0
  637. package/dist/useRAFLoop-B3YlWK4M.js +98 -0
  638. package/dist/useReducedMotion-vCXA_vyM.js +27 -0
  639. package/dist/useRoutePointer-B8itM7Ka.js +53 -0
  640. package/dist/useScrollProgress-CSFYXIZT.js +43 -0
  641. package/dist/useScrollTrigger-BDdqptlc.js +87 -0
  642. package/dist/useSelectionGroup-B5XplBbo.js +132 -0
  643. package/dist/{useSpring-BBSKFx_0.js → useSpring-9u2_shxV.js} +2 -2
  644. package/dist/useSpringMount-uQ8QL9Ff.js +74 -0
  645. package/dist/useTabRovingFocus-YnWh-Ytr.js +169 -0
  646. package/dist/useTextHighlight-mfwNIC1f.js +112 -0
  647. package/dist/{useTouchGate-Cj5fOkTv.js → useTouchGate-B4mzQcHJ.js} +1 -1
  648. package/dist/vSpecular-DMJo8pfD.js +68 -0
  649. package/dist/value-DMhh2R94.js +33 -0
  650. package/dist/watercolor-dot.js +77 -103
  651. package/package.json +163 -232
  652. package/dist/DropdownMenuTrigger-BzQtd9lt.js +0 -65
  653. package/dist/FadingScroll-C1ZWEjmG.js +0 -83
  654. package/dist/Input-B4WQ_CMc.js +0 -57
  655. package/dist/Surface-BWRfwyn8.js +0 -59
  656. package/dist/accent-tone-solve-Dii9ePhK.js +0 -20
  657. package/dist/badge-C0C-rTBu.js +0 -80
  658. package/dist/button-32mg6xA8.js +0 -194
  659. package/dist/card-16xmzIr3.js +0 -303
  660. package/dist/coalesce-metric-znAcLzkB.js +0 -13
  661. package/dist/collapsible-bPzS1aQk.js +0 -63
  662. package/dist/color-swatch.d.ts +0 -1
  663. package/dist/color-swatch.js +0 -48
  664. package/dist/command-BjPjUU9z.js +0 -307
  665. package/dist/components/_shared/menuItemVariants.d.ts +0 -51
  666. package/dist/components/_shared/useControlSize.d.ts +0 -46
  667. package/dist/components/_shared/useStalePropWarning.d.ts +0 -27
  668. package/dist/components/_shared/useSurfaceAxis.d.ts +0 -64
  669. package/dist/components/card/ScrollCard.vue.d.ts +0 -33
  670. package/dist/components/card/ScrollCardHeader.vue.d.ts +0 -17
  671. package/dist/components/carousel/CarouselNext.vue.d.ts +0 -21
  672. package/dist/components/carousel/CarouselPrevious.vue.d.ts +0 -21
  673. package/dist/components/color-swatch/ColorSwatch.vue.d.ts +0 -22
  674. package/dist/components/color-swatch/index.d.ts +0 -1
  675. package/dist/components/controls/DarkModeToggle.vue.d.ts +0 -32
  676. package/dist/components/controls/dark-mode-toggle.css +0 -1
  677. package/dist/components/controls/index.d.ts +0 -1
  678. package/dist/components/data-table/DataTablePagination.vue.d.ts +0 -13
  679. package/dist/components/dock/DockSection.vue.d.ts +0 -69
  680. package/dist/components/dock/DockStack.vue.d.ts +0 -73
  681. package/dist/components/dock/composables/dockMorphContext.d.ts +0 -91
  682. package/dist/components/dock/composables/useDockFisheye.d.ts +0 -24
  683. package/dist/components/dock/composables/useDockPopover.d.ts +0 -70
  684. package/dist/components/dock/styles/fisheye.css +0 -1
  685. package/dist/components/dock/styles/popover.css +0 -1
  686. package/dist/components/dock/styles/section.css +0 -1
  687. package/dist/components/focus-scope/FocusScope.vue.d.ts +0 -20
  688. package/dist/components/focus-scope/index.d.ts +0 -2
  689. package/dist/components/goo-filter/GooFilter.vue.d.ts +0 -22
  690. package/dist/components/goo-filter/index.d.ts +0 -1
  691. package/dist/components/icon-chip/IconChip.vue.d.ts +0 -4
  692. package/dist/components/icon-chip/index.d.ts +0 -2
  693. package/dist/components/icon-chip/styles.css +0 -1
  694. package/dist/components/icon-chip/types.d.ts +0 -92
  695. package/dist/components/icon-tooltip/IconTooltip.vue.d.ts +0 -16
  696. package/dist/components/icon-tooltip/index.d.ts +0 -1
  697. package/dist/components/instrument-chassis/ChassisDivider.vue.d.ts +0 -30
  698. package/dist/components/metric-badge/MetricBadge.vue.d.ts +0 -40
  699. package/dist/components/metric-badge/index.d.ts +0 -2
  700. package/dist/components/metric-cell/MetricCell.vue.d.ts +0 -108
  701. package/dist/components/metric-cell/index.d.ts +0 -2
  702. package/dist/components/metric-stack/MetricRow.vue.d.ts +0 -120
  703. package/dist/components/metric-stack/MetricStack.vue.d.ts +0 -92
  704. package/dist/components/metric-stack/index.d.ts +0 -4
  705. package/dist/components/notification/Notification.vue.d.ts +0 -16
  706. package/dist/components/notification/index.d.ts +0 -1
  707. package/dist/components/progress/ProgressDefault.vue.d.ts +0 -9
  708. package/dist/components/progress/ProgressGradient.vue.d.ts +0 -26
  709. package/dist/components/progress/ProgressLiquid.vue.d.ts +0 -22
  710. package/dist/components/progress/valueMarks.css +0 -1
  711. package/dist/components/spa-view/SpaView.vue.d.ts +0 -50
  712. package/dist/components/spa-view/index.d.ts +0 -2
  713. package/dist/components/split-chars/SplitChars.vue.d.ts +0 -53
  714. package/dist/components/split-chars/index.d.ts +0 -1
  715. package/dist/components/tabs/composables/useEyeglassLive.d.ts +0 -17
  716. package/dist/components/toggle/Toggle.vue.d.ts +0 -29
  717. package/dist/components/toggle/index.d.ts +0 -26
  718. package/dist/composables/glass/webgl/shaders/glass-refract.glsl.d.ts +0 -36
  719. package/dist/composables/motion/curves.d.ts +0 -48
  720. package/dist/composables/motion/gooBarbellGeometry.d.ts +0 -79
  721. package/dist/composables/motion/morphSignatures.d.ts +0 -88
  722. package/dist/composables/motion/suite.d.ts +0 -2
  723. package/dist/composables/motion/useBloomUp.d.ts +0 -97
  724. package/dist/composables/motion/useCharStagger.d.ts +0 -44
  725. package/dist/composables/motion/useElementMorph.d.ts +0 -107
  726. package/dist/composables/motion/useGooMorph.d.ts +0 -72
  727. package/dist/composables/motion/usePrioritizedTask.d.ts +0 -41
  728. package/dist/composables/motion/useStaggerReveal.d.ts +0 -52
  729. package/dist/composables/motion/useViewTransition.d.ts +0 -81
  730. package/dist/composables/virtual/index.d.ts +0 -4
  731. package/dist/composables/virtual/useVirtualSectionWindow.d.ts +0 -72
  732. package/dist/composables/virtual/useWindowedStore.d.ts +0 -43
  733. package/dist/composables/virtual/virtualSectionLayout.d.ts +0 -103
  734. package/dist/controls.d.ts +0 -1
  735. package/dist/controls.js +0 -83
  736. package/dist/data-table-DveMdgBM.js +0 -629
  737. package/dist/dialog-BzQxKrUr.js +0 -281
  738. package/dist/dockContext-4S9qP0Z4.js +0 -13
  739. package/dist/dropdown-menu-DORIA52F.js +0 -378
  740. package/dist/focus-scope-DUTKveod.js +0 -23
  741. package/dist/focus-scope.d.ts +0 -1
  742. package/dist/focus-scope.js +0 -2
  743. package/dist/icon-chip-BWuxz1-u.js +0 -57
  744. package/dist/icon-chip.d.ts +0 -1
  745. package/dist/icon-chip.js +0 -2
  746. package/dist/icon-tooltip-CO6rw0dZ.js +0 -25
  747. package/dist/icon-tooltip.d.ts +0 -1
  748. package/dist/icon-tooltip.js +0 -2
  749. package/dist/instrument-chassis-Cvstg4_U.js +0 -65
  750. package/dist/label-Cj38tJKG.js +0 -36
  751. package/dist/menuItemVariants-D6AOzzND.js +0 -36
  752. package/dist/metric-badge.d.ts +0 -1
  753. package/dist/metric-badge.js +0 -79
  754. package/dist/metric-cell.d.ts +0 -1
  755. package/dist/metric-cell.js +0 -61
  756. package/dist/metric-stack.d.ts +0 -1
  757. package/dist/metric-stack.js +0 -113
  758. package/dist/motion-curves.d.ts +0 -1
  759. package/dist/motion-curves.js +0 -146
  760. package/dist/notification-DVs7ODMg.js +0 -52
  761. package/dist/notification.d.ts +0 -1
  762. package/dist/notification.js +0 -2
  763. package/dist/number-field-PvkGedHk.js +0 -140
  764. package/dist/popover-WMgyRSyN.js +0 -256
  765. package/dist/progress-C-HHuFZy.js +0 -192
  766. package/dist/resolveCanvasColor-yarP5bdk.js +0 -93
  767. package/dist/select-BIv4R3Ir.js +0 -326
  768. package/dist/separator-CBU94kTM.js +0 -62
  769. package/dist/slider-Cc_qw6GA.js +0 -166
  770. package/dist/spa-view.d.ts +0 -1
  771. package/dist/spa-view.js +0 -46
  772. package/dist/springPresets-h5VKJQqG.js +0 -58
  773. package/dist/styles/glass/progress-rail.css +0 -1
  774. package/dist/switch-Boj4Ucn5.js +0 -49
  775. package/dist/toast-kAbchIN2.js +0 -281
  776. package/dist/toggle-group-BPchFsns.js +0 -178
  777. package/dist/tooltip-BmOQJzh0.js +0 -111
  778. package/dist/useControlSize-CFfOk8I-.js +0 -9
  779. package/dist/useDockCtaReceive-CK-RLASa.js +0 -257
  780. package/dist/useDocumentVisibility-YeBDGqtI.js +0 -17
  781. package/dist/useDragMorph-7ygF9O0m.js +0 -93
  782. package/dist/useGooMorph-D1F6QJlH.js +0 -349
  783. package/dist/useLeadTrail-BYu8dq4G.js +0 -74
  784. package/dist/useLiquidPress-BYcwwGQV.js +0 -68
  785. package/dist/useMotionAxis-DCCXMC-i.js +0 -20
  786. package/dist/usePointerVelocityField-BdvnO0py.js +0 -122
  787. package/dist/useRAFLoop-BtwQ9DyY.js +0 -109
  788. package/dist/useRoutePointer-BDNMFN73.js +0 -52
  789. package/dist/useScrollProgress-DZI4nf4v.js +0 -35
  790. package/dist/useSelectionGroup-LDzBdR1Y.js +0 -215
  791. package/dist/useSpringMount-C6-DBx4e.js +0 -71
  792. package/dist/useSpringPress-BypV_KO-.js +0 -36
  793. package/dist/useSurfaceAxis-DudiZVOR.js +0 -10
  794. package/dist/useTabRovingFocus-DkLYwo4L.js +0 -143
  795. package/dist/vReveal-DZfWl9XI.js +0 -10
  796. package/dist/vSpecular-CQFmLNzA.js +0 -68
  797. package/src/fonts/README.md +0 -124
  798. package/src/fonts/fira-code/OFL.txt +0 -93
  799. package/src/fonts/fira-code/fira-code-latin-ext.woff2 +0 -0
  800. package/src/fonts/fira-code/fira-code-latin.woff2 +0 -0
  801. package/src/fonts/plus-jakarta-sans/OFL.txt +0 -93
  802. package/src/fonts/plus-jakarta-sans/plus-jakarta-sans-latin-ext.woff2 +0 -0
  803. package/src/fonts/plus-jakarta-sans/plus-jakarta-sans-latin.woff2 +0 -0
  804. package/src/styles/accessibility.css +0 -48
  805. package/src/styles/animations.css +0 -468
  806. package/src/styles/draw-in.css +0 -89
  807. package/src/styles/fonts.css +0 -143
  808. package/src/styles/glass/a11y-fallback.css +0 -188
  809. package/src/styles/glass/accent-tone.css +0 -66
  810. package/src/styles/glass/control-surfaces.css +0 -171
  811. package/src/styles/glass/deep.css +0 -114
  812. package/src/styles/glass/defined.css +0 -88
  813. package/src/styles/glass/glass-atom.css +0 -247
  814. package/src/styles/glass/glass-capsule.css +0 -175
  815. package/src/styles/glass/glass-chip.css +0 -211
  816. package/src/styles/glass/grain-overlay.css +0 -79
  817. package/src/styles/glass/ladder-undershadow.css +0 -61
  818. package/src/styles/glass/ladder.css +0 -452
  819. package/src/styles/glass/liquid-enter.css +0 -240
  820. package/src/styles/glass/liquid-fill.css +0 -65
  821. package/src/styles/glass/material-roles.css +0 -18
  822. package/src/styles/glass/material.css +0 -500
  823. package/src/styles/glass/progress-rail.css +0 -78
  824. package/src/styles/glass/reveal.css +0 -333
  825. package/src/styles/glass/rim.css +0 -122
  826. package/src/styles/glass/squircle.css +0 -58
  827. package/src/styles/glass/surface-axis.css +0 -136
  828. package/src/styles/glass/surfaces-pager.css +0 -79
  829. package/src/styles/glass/surfaces.css +0 -434
  830. package/src/styles/glass-refract.css +0 -112
  831. package/src/styles/glass-specular-track.css +0 -74
  832. package/src/styles/glass.css +0 -110
  833. package/src/styles/index.css +0 -288
  834. package/src/styles/paper.css +0 -187
  835. package/src/styles/scroll-choreography.css +0 -294
  836. package/src/styles/scroll-chrome.css +0 -123
  837. package/src/styles/scroll-driven.css +0 -123
  838. package/src/styles/theme/bridges.css +0 -380
  839. package/src/styles/theme/dark.css +0 -7
  840. package/src/styles/theme/literals.css +0 -104
  841. package/src/styles/theme/radius.css +0 -148
  842. package/src/styles/theme.css +0 -33
  843. package/src/styles/tokens/color-radius.css +0 -308
  844. package/src/styles/tokens/dark-arm-glass.css +0 -55
  845. package/src/styles/tokens/dark-arm.css +0 -455
  846. package/src/styles/tokens/glass-deep.css +0 -126
  847. package/src/styles/tokens/glass-fx.css +0 -480
  848. package/src/styles/tokens/glass.css +0 -477
  849. package/src/styles/tokens/light-dark.css +0 -216
  850. package/src/styles/tokens/motion-registers.css +0 -93
  851. package/src/styles/tokens/offsets.css +0 -142
  852. package/src/styles/tokens/on-glass-fg.css +0 -39
  853. package/src/styles/tokens/property-regs-specular.css +0 -160
  854. package/src/styles/tokens/property-regs.css +0 -448
  855. package/src/styles/tokens/scale-paper.css +0 -495
  856. package/src/styles/tokens/scheme-motion.css +0 -425
  857. package/src/styles/tokens/scheme-spring.css +0 -282
  858. package/src/styles/tokens/scroll-tokens.css +0 -137
  859. package/src/styles/tokens/shadow.css +0 -206
  860. package/src/styles/tokens/sizing-config.css +0 -110
  861. package/src/styles/tokens/sizing.css +0 -505
  862. package/src/styles/tokens.css +0 -68
  863. package/src/styles/tokens.ts +0 -58
  864. package/src/styles/transitions.css +0 -228
  865. package/src/styles/typography/scale.css +0 -166
  866. package/src/styles/typography/semantic.css +0 -233
  867. package/src/styles/typography/utilities.css +0 -197
  868. package/src/styles/typography.css +0 -46
  869. package/src/styles/utilities/a11y-overrides.css +0 -184
  870. package/src/styles/utilities/base-misc.css +0 -307
  871. package/src/styles/utilities/base.css +0 -337
  872. package/src/styles/utilities/btn.css +0 -306
  873. package/src/styles/utilities/components.css +0 -337
  874. package/src/styles/utilities/metal.css +0 -272
  875. package/src/styles/utilities.css +0 -24
  876. package/src/styles/view-transition.css +0 -67
  877. package/src/styles/viz-reveal.css +0 -63
  878. /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-B3ysoDQm.js} +0 -0
  879. /package/dist/{compile-DK3Fri1B.js → compile-D7VYG3gi.js} +0 -0
  880. /package/dist/composables/glass/{webgl/shaders/procedural-color.glsl.d.ts → procedural/color.glsl.d.ts} +0 -0
  881. /package/dist/{components/aurora/constants/shaders/procedural-color.wgsl.d.ts → composables/glass/procedural/color.wgsl.d.ts} +0 -0
  882. /package/dist/composables/motion/{motionTempo.d.ts → core/motionTempo.d.ts} +0 -0
  883. /package/dist/composables/motion/{useIntersectionPause.d.ts → core/useIntersectionPause.d.ts} +0 -0
  884. /package/dist/composables/motion/{useRAFLoop.d.ts → core/useRAFLoop.d.ts} +0 -0
  885. /package/dist/composables/motion/{useYieldToMain.d.ts → core/useYieldToMain.d.ts} +0 -0
  886. /package/dist/composables/motion/{useAnimatedNumber.d.ts → number/useAnimatedNumber.d.ts} +0 -0
  887. /package/dist/composables/motion/{useAnimatedNumberMap.d.ts → number/useAnimatedNumberMap.d.ts} +0 -0
  888. /package/dist/composables/motion/{useCountup.d.ts → number/useCountup.d.ts} +0 -0
  889. /package/dist/composables/motion/{useRoutePointer.d.ts → pointer/useRoutePointer.d.ts} +0 -0
  890. /package/dist/composables/motion/{useTextHighlight.d.ts → reveal/useTextHighlight.d.ts} +0 -0
  891. /package/dist/composables/motion/{vReveal.d.ts → reveal/vReveal.d.ts} +0 -0
  892. /package/dist/composables/motion/{scrollReader.d.ts → scroll/scrollReader.d.ts} +0 -0
  893. /package/dist/composables/motion/{supportsCssTimeline.d.ts → scroll/supportsCssTimeline.d.ts} +0 -0
  894. /package/dist/composables/motion/{useScrollPin.d.ts → scroll/useScrollPin.d.ts} +0 -0
  895. /package/dist/composables/motion/{useScrollScene.d.ts → scroll/useScrollScene.d.ts} +0 -0
  896. /package/dist/composables/motion/{useScrollTrigger.d.ts → scroll/useScrollTrigger.d.ts} +0 -0
  897. /package/dist/composables/motion/{useSpringPress.d.ts → spring/useSpringPress.d.ts} +0 -0
  898. /package/dist/{createContext-FU0n5MGK.js → createContext-BhkE9mLH.js} +0 -0
  899. /package/dist/{dark-DIH-blY1.js → dark-z_P5QwqI.js} +0 -0
  900. /package/dist/{motionTempo-CMS5b0Vu.js → motionTempo-tscp92Nm.js} +0 -0
  901. /package/dist/{prng-Dz2_9RJu.js → prng-2uS6J_A1.js} +0 -0
  902. /package/dist/{rendererStatus-C2-zC2Q-.js → rendererStatus-BxUlBLVy.js} +0 -0
  903. /package/dist/{useDragVelocity-CbMZEBaC.js → useDragVelocity-6ONX0sr0.js} +0 -0
  904. /package/dist/{useFuzzySearch-BOgep7RE.js → useFuzzySearch-CUnZknpm.js} +0 -0
  905. /package/dist/{useResizeObserver-BcUTquV7.js → useResizeObserver-CdUlm2QZ.js} +0 -0
  906. /package/dist/{useResolveTokenColor-C07e-qaT.js → useResolveTokenColor-B2FfJnd9.js} +0 -0
  907. /package/dist/{useTimer-D8koDvJS.js → useTimer-C3yfti4C.js} +0 -0
  908. /package/dist/{useUserInvalidAria-Cr4nR3tu.js → useUserInvalidAria-0GNrddMX.js} +0 -0
  909. /package/dist/{valueDomain-B8L04u3U.js → valueDomain-SbVzoHMH.js} +0 -0
  910. /package/dist/{writeVelocityWeight-D_AcvTsE.js → writeVelocityWeight-DoGOCW3e.js} +0 -0
package/dist/blob.js CHANGED
@@ -1,17 +1,16 @@
1
- import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
2
- import { t } from "./useResolveTokenColor-C07e-qaT.js";
3
- import { t as n } from "./usePointerVelocityField-BdvnO0py.js";
4
- import { t as r } from "./useIntersectionPause-B-dbxl9w.js";
5
- import { a as i, i as a, n as o, o as s, r as c, t as l } from "./presets-CxeNvxuO.js";
6
- import { cssToOklch as u, oklchToGammaRgb as d } from "./color.js";
7
- import { a as f, d as p, f as m, l as h, n as g, r as _, t as v, u as y } from "./procedural-color.wgsl-B9mLK7v0.js";
8
- import { a as b } from "./rendererStatus-C2-zC2Q-.js";
9
- import { n as x, t as S } from "./compile-DK3Fri1B.js";
10
- import { n as C, t as w } from "./prng-Dz2_9RJu.js";
11
- import { computed as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, defineComponent as k, inject as A, normalizeStyle as j, onScopeDispose as M, onUnmounted as N, openBlock as P, readonly as F, ref as I, shallowRef as L, useTemplateRef as R, watch as z } from "vue";
12
- import { SpringProgress as B } from "@mkbabb/keyframes.js";
1
+ import { t as e } from "./useResolveTokenColor-B2FfJnd9.js";
2
+ import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
+ import { t as n } from "./usePointerVelocityField-DsIf7yyq.js";
4
+ import { a as r, i, n as a, o, r as s, t as c } from "./presets-5myqNv59.js";
5
+ import { cssToOklch as l, oklchToGammaRgb as u } from "./color.js";
6
+ import { a as d, m as f, n as p, o as m, r as h, s as g, t as _, u as v } from "./color.wgsl-Ct5o9dpf.js";
7
+ import { a as y } from "./rendererStatus-BxUlBLVy.js";
8
+ import { n as b, t as x } from "./compile-D7VYG3gi.js";
9
+ import { n as S, t as C } from "./prng-2uS6J_A1.js";
10
+ import { computed as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, defineComponent as O, inject as k, normalizeStyle as A, onScopeDispose as j, onUnmounted as M, openBlock as N, readonly as P, ref as F, shallowRef as I, useTemplateRef as L, watch as R } from "vue";
11
+ import { SpringProgress as z } from "@mkbabb/keyframes.js";
13
12
  //#region src/components/blob/constants.ts
14
- var V = 1 / 1.6, H = {
13
+ var B = 1 / 1.6, V = {
15
14
  idle: {
16
15
  valence: 0,
17
16
  arousal: .35
@@ -32,36 +31,36 @@ var V = 1 / 1.6, H = {
32
31
  valence: .7,
33
32
  arousal: 1
34
33
  }
35
- }, U = (e, t, n) => e + (t - e) * n;
36
- function W({ valence: e, arousal: t }) {
34
+ }, H = (e, t, n) => e + (t - e) * n;
35
+ function U({ valence: e, arousal: t }) {
37
36
  return {
38
- orbitSpeedScale: U(.4, 2.2, t),
39
- wobbleScale: U(.5, 2, t),
40
- pulseFreq: U(.15, 1.5, t),
41
- pulseAmp: U(.008, .05, t),
42
- noiseAmp: U(.015, .045, t),
43
- hueRange: U(3, 25, t * .6 + (e * .5 + .5) * .4),
44
- satShift: U(-.05, .1, e * .5 + .5),
45
- brightnessShift: U(-.03, .08, e * .5 + .5),
46
- smoothK: U(.85, 1.35, t),
47
- pointerAttraction: U(-.2, .6, e * .5 + .5) * (.7 + .15 * t),
48
- mergeRate: U(2, .3, t),
49
- iridScale: U(.55, 1.35, t)
37
+ orbitSpeedScale: H(.4, 2.2, t),
38
+ wobbleScale: H(.5, 2, t),
39
+ pulseFreq: H(.15, 1.5, t),
40
+ pulseAmp: H(.008, .05, t),
41
+ noiseAmp: H(.015, .045, t),
42
+ hueRange: H(3, 25, t * .6 + (e * .5 + .5) * .4),
43
+ satShift: H(-.05, .1, e * .5 + .5),
44
+ brightnessShift: H(-.03, .08, e * .5 + .5),
45
+ smoothK: H(.85, 1.35, t),
46
+ pointerAttraction: H(-.2, .6, e * .5 + .5) * (.7 + .15 * t),
47
+ mergeRate: H(2, .3, t),
48
+ iridScale: H(.55, 1.35, t)
50
49
  };
51
50
  }
52
- var G = {
53
- idle: W(H.idle),
54
- happy: W(H.happy),
55
- curious: W(H.curious),
56
- sleepy: W(H.sleepy),
57
- excited: W(H.excited)
51
+ var W = {
52
+ idle: U(V.idle),
53
+ happy: U(V.happy),
54
+ curious: U(V.curious),
55
+ sleepy: U(V.sleepy),
56
+ excited: U(V.excited)
58
57
  }, ee = {
59
58
  idle: 1500,
60
59
  happy: 1200,
61
60
  curious: 800,
62
61
  sleepy: 2500,
63
62
  excited: 600
64
- }, te = 6e3, ne = .35, re = .85, K = .2, q = .015, ie = .02, ae = .01, oe = .015, J = .75, se = 2e3, ce = .4, le = .18, ue = 5200, de = /* @__PURE__ */ "uResolution.uTime.uBaseColor.uPointer.uPointerActive.uPointerAttraction.uPointerStrength.uBodyRadius.uPulsePhase.uPulseAmp.uNoiseAmp.uNoiseFreq.uNoiseSpeed.uWarpAmp.uSmoothK.uMerge.uStage.uMorphT.uMaxReach.uLit.uRimColor.uLightDir.uSpecStrength.uSpecShininess.uRimPower.uRimStrength.uShadow.uShadowSoftness.uIridescence.uIridHue.uIridSpeed.uSssScale.uSssPower.uCoreGlow.uHueRange.uSatShift.uBrightnessShift.uColorNoiseFreq.uColorNoiseSpeed.uStopCount.uSatCount.uSatColorActive.uTrailCount.uVelocity.uStretch".split(".");
63
+ }, te = 6e3, ne = .35, re = .85, ie = .2, G = .015, K = .02, ae = .01, oe = .015, q = .75, se = 2e3, ce = .4, le = .18, ue = 5200, de = /* @__PURE__ */ "uResolution.uTime.uBaseColor.uPointer.uPointerActive.uPointerAttraction.uPointerStrength.uBodyRadius.uPulsePhase.uPulseAmp.uNoiseAmp.uNoiseFreq.uNoiseSpeed.uWarpAmp.uSmoothK.uMerge.uStage.uMorphT.uMaxReach.uLit.uRimColor.uLightDir.uSpecStrength.uSpecShininess.uRimPower.uRimStrength.uShadow.uShadowSoftness.uIridescence.uIridHue.uIridSpeed.uSssScale.uSssPower.uCoreGlow.uHueRange.uSatShift.uBrightnessShift.uColorNoiseFreq.uColorNoiseSpeed.uStopCount.uSatCount.uSatColorActive.uTrailCount.uVelocity.uStretch".split(".");
65
64
  //#endregion
66
65
  //#region src/components/blob/composables/easing.ts
67
66
  function fe(e) {
@@ -106,9 +105,9 @@ function ge(e, t, n) {
106
105
  };
107
106
  }
108
107
  function _e() {
109
- let e = I("idle"), t = I({ ...G.idle }), n = { ...G.idle }, r = { ...G.idle }, i = 0, a = 0, o = !1, s = 0, c = !1, l = !1, u = 0;
108
+ let e = F("idle"), t = F({ ...W.idle }), n = { ...W.idle }, r = { ...W.idle }, i = 0, a = 0, o = !1, s = 0, c = !1, l = !1, u = 0;
110
109
  function d(s, l = {}) {
111
- (l.source ?? "manual") === "manual" && (c = !0), !(s === e.value && !o) && (e.value = s, n = { ...t.value }, r = G[s], a = ee[s], i = 0, o = !0);
110
+ (l.source ?? "manual") === "manual" && (c = !0), !(s === e.value && !o) && (e.value = s, n = { ...t.value }, r = W[s], a = ee[s], i = 0, o = !0);
112
111
  }
113
112
  function f(e) {
114
113
  u = e.idleMs;
@@ -134,8 +133,8 @@ function _e() {
134
133
  t.value = ge(n, r, l), c >= 1 && (o = !1);
135
134
  }
136
135
  return {
137
- currentMood: F(e),
138
- params: F(t),
136
+ currentMood: P(e),
137
+ params: P(t),
139
138
  setMood: d,
140
139
  update: f,
141
140
  tick: h,
@@ -146,16 +145,16 @@ function _e() {
146
145
  //#endregion
147
146
  //#region src/components/blob/composables/useBlobPointer.ts
148
147
  function ve(e, t = {}) {
149
- let { hitRadius: n } = t, r = I({
148
+ let { hitRadius: n } = t, r = F({
150
149
  x: 0,
151
150
  y: 0
152
- }), i = I({
151
+ }), i = F({
153
152
  x: 0,
154
153
  y: 0
155
- }), a = I(!1), o = I(0), s = 0, c = 0, l = {
154
+ }), a = F(!1), o = F(0), s = 0, c = 0, l = {
156
155
  response: .18,
157
156
  dampingFraction: 1
158
- }, u = new B(l), d = new B(l), f = Array.from({ length: 15 }, () => ({
157
+ }, u = new z(l), d = new z(l), f = Array.from({ length: 15 }, () => ({
159
158
  x: 0,
160
159
  y: 0,
161
160
  radius: 0
@@ -181,11 +180,11 @@ function ve(e, t = {}) {
181
180
  a.value = !1;
182
181
  }
183
182
  let x = null;
184
- z(e, (e) => {
183
+ R(e, (e) => {
185
184
  x &&= (x(), null), e && (e.addEventListener("pointermove", y), e.addEventListener("pointerleave", b), x = () => {
186
185
  e.removeEventListener("pointermove", y), e.removeEventListener("pointerleave", b);
187
186
  });
188
- }, { immediate: !0 }), N(() => x?.());
187
+ }, { immediate: !0 }), M(() => x?.());
189
188
  function S(e = 16) {
190
189
  let t = Math.min(e, 50), n = t / 1e3;
191
190
  a.value ? D = 0 : D += Math.min(e, 50);
@@ -207,10 +206,10 @@ function ve(e, t = {}) {
207
206
  function C(e) {
208
207
  let t = [];
209
208
  for (let n = 0; n < m; n++) {
210
- let r = f[(p - n + 30) % 15];
209
+ let r = (p - n + 30) % 15, i = f[r];
211
210
  t.push({
212
- x: r.x,
213
- y: r.y,
211
+ x: i.x,
212
+ y: i.y,
214
213
  radius: e * (1 - n / 15)
215
214
  });
216
215
  }
@@ -241,14 +240,14 @@ function ve(e, t = {}) {
241
240
  return !(a.value || Math.hypot(u.velocity, d.velocity) > .001 || Math.abs(u.value) > .001 || Math.abs(d.value) > .001 || m > 0 || h !== 0 || g !== 0);
242
241
  }
243
242
  return {
244
- pointer: F(r),
245
- velocity: F(i),
246
- active: F(a),
243
+ pointer: P(r),
244
+ velocity: P(i),
245
+ active: P(a),
247
246
  rawPointer: () => ({
248
247
  x: s,
249
248
  y: c
250
249
  }),
251
- pulse: F(o),
250
+ pulse: P(o),
252
251
  idleMs: () => D,
253
252
  tick: S,
254
253
  trailSources: C,
@@ -262,7 +261,7 @@ function ve(e, t = {}) {
262
261
  //#endregion
263
262
  //#region src/components/blob/composables/satelliteKinematics.ts
264
263
  function ye(e, t, n, r, i) {
265
- let a = t / 4 * Math.PI * 2 + (e() - .5) * Math.PI, o = n * (re + e() * K), s = r * (.3 + e() * .7);
264
+ let a = t / 4 * Math.PI * 2 + (e() - .5) * Math.PI, o = n * (re + e() * ie), s = r * (.3 + e() * .7);
266
265
  return {
267
266
  phase: "orbiting",
268
267
  phaseStart: i,
@@ -272,7 +271,7 @@ function ye(e, t, n, r, i) {
272
271
  phaseOffset: a,
273
272
  baseRadiusX: o * (1 - s),
274
273
  baseRadiusY: o * (1 + s),
275
- wobbleAmp1: q + e() * ie,
274
+ wobbleAmp1: G + e() * K,
276
275
  wobbleFreq1: .08 + e() * .22,
277
276
  wobbleAmp2: ae + e() * oe,
278
277
  wobbleFreq2: .18 + e() * .32,
@@ -290,34 +289,34 @@ function ye(e, t, n, r, i) {
290
289
  snapFired: !1
291
290
  };
292
291
  }
293
- function be(e, t, n, r) {
292
+ function J(e, t, n, r) {
294
293
  let i = (t - e.timeOrigin) / 1e3, a = e.angularSpeed * n * i + e.phaseOffset, o = r * (e.wobbleAmp1 * Math.sin(e.wobbleFreq1 * i) + e.wobbleAmp2 * Math.sin(e.wobbleFreq2 * i + 1.3));
295
294
  return {
296
295
  x: (e.baseRadiusX + o) * Math.cos(a) + e.pertXAmp * Math.sin(e.pertXFreq * i + e.pertXPhase),
297
296
  y: (e.baseRadiusY + o) * Math.sin(a) + e.pertYAmp * Math.cos(e.pertYFreq * i + e.pertYPhase)
298
297
  };
299
298
  }
300
- function xe(e, t, n, r, i) {
299
+ function be(e, t, n, r, i) {
301
300
  e.timeOrigin = i, e.angularSpeed = .08 + t() * .16, e.phaseOffset = t() * Math.PI * 2;
302
- let a = n * (re + t() * K), o = r * (.3 + t() * .7);
303
- e.baseRadiusX = a * (1 - o), e.baseRadiusY = a * (1 + o), e.wobbleAmp1 = q + t() * ie, e.wobbleFreq1 = .08 + t() * .22, e.wobbleAmp2 = ae + t() * oe, e.wobbleFreq2 = .18 + t() * .32, e.pertXAmp = .03 + t() * .05, e.pertXFreq = .06 + t() * .18, e.pertXPhase = t() * Math.PI * 2, e.pertYAmp = .03 + t() * .05, e.pertYFreq = .07 + t() * .17, e.pertYPhase = t() * Math.PI * 2;
301
+ let a = n * (re + t() * ie), o = r * (.3 + t() * .7);
302
+ e.baseRadiusX = a * (1 - o), e.baseRadiusY = a * (1 + o), e.wobbleAmp1 = G + t() * K, e.wobbleFreq1 = .08 + t() * .22, e.wobbleAmp2 = ae + t() * oe, e.wobbleFreq2 = .18 + t() * .32, e.pertXAmp = .03 + t() * .05, e.pertXFreq = .06 + t() * .18, e.pertXPhase = t() * Math.PI * 2, e.pertYAmp = .03 + t() * .05, e.pertYFreq = .07 + t() * .17, e.pertYPhase = t() * Math.PI * 2;
304
303
  }
305
304
  //#endregion
306
305
  //#region src/components/blob/composables/useBlobSatellites.ts
307
- function Se(e, t, n) {
306
+ function Y(e, t, n) {
308
307
  return t + e() * (n - t);
309
308
  }
310
- function Y(e) {
309
+ function X(e) {
311
310
  return e < 0 ? 0 : e > 1 ? 1 : e;
312
311
  }
313
- function X(e, t, n) {
312
+ function Z(e, t, n) {
314
313
  return e + (t - e) * n;
315
314
  }
316
- function Z(e, t, n, r) {
315
+ function Q(e, t, n, r) {
317
316
  e.phase = t, e.phaseStart = n, e.phaseDuration = r;
318
317
  }
319
- function Ce(e, t) {
320
- let n = C(w(t + "goo")), r = [], i = [], a = [], o = -Infinity, s = e.geometry.orbitRadius, c = -1, l = null;
318
+ function xe(e, t) {
319
+ let n = S(C(t + "goo")), r = [], i = [], a = [], o = -Infinity, s = e.geometry.orbitRadius, c = -1, l = null;
321
320
  function u() {
322
321
  let t = e.geometry.orbitRadius;
323
322
  if (t !== s && s > 0) {
@@ -345,71 +344,71 @@ function Ce(e, t) {
345
344
  d(t), u();
346
345
  let f = r.length, p = s.mergeRate, m = e.geometry.satelliteRadius, h = e.satellites.mergeDuration, g = e.satellites.emergeDuration, _ = e.satellites.orbitDuration, v = e.satellites.absorbedDuration, y = e.surface.fissionAmp ?? 0, b = Math.max(0, Math.min(1, (2 - p) / 1.7)), x = Math.max(0, Math.min(1, y * (.4 + .6 * b))), S = ce - le;
347
346
  for (let u = 0; u < f; u++) {
348
- let d = r[u], f = t - d.phaseStart, y = Y(d.phaseDuration > 0 ? f / d.phaseDuration : 1);
347
+ let d = r[u], f = t - d.phaseStart, y = X(d.phaseDuration > 0 ? f / d.phaseDuration : 1);
349
348
  switch (d.phase) {
350
349
  case "orbiting":
351
- if (y >= 1) if (t - o < 3e3 * p) d.phaseStart = t, d.phaseDuration = Se(n, _[0], _[1]);
352
- else if (x > 0 && c < 0 && n() < x * .75) d.phaseOffset = d.angularSpeed * s.orbitSpeedScale * ((t - d.timeOrigin) / 1e3) + d.phaseOffset, d.timeOrigin = t, d.fissioning = !0, d.snapFired = !1, c = u, Z(d, "fissioning", t, ue), o = t;
350
+ if (y >= 1) if (t - o < 3e3 * p) d.phaseStart = t, d.phaseDuration = Y(n, _[0], _[1]);
351
+ else if (x > 0 && c < 0 && n() < x * .75) d.phaseOffset = d.angularSpeed * s.orbitSpeedScale * ((t - d.timeOrigin) / 1e3) + d.phaseOffset, d.timeOrigin = t, d.fissioning = !0, d.snapFired = !1, c = u, Q(d, "fissioning", t, ue), o = t;
353
352
  else {
354
- let e = be(d, t, s.orbitSpeedScale, s.wobbleScale);
353
+ let e = J(d, t, s.orbitSpeedScale, s.wobbleScale);
355
354
  d.startX = e.x, d.startY = e.y;
356
355
  let n = Math.hypot(e.x, e.y), r = n > .01 ? .08 / n : 0;
357
- d.endX = e.x * r, d.endY = e.y * r, Z(d, "merging", t, h), o = t;
356
+ d.endX = e.x * r, d.endY = e.y * r, Q(d, "merging", t, h), o = t;
358
357
  }
359
358
  break;
360
359
  case "fissioning":
361
- y >= 1 && (d.fissioning = !1, c === u && (c = -1), d.timeOrigin = t, Z(d, "orbiting", t, Se(n, _[0], _[1])));
360
+ y >= 1 && (d.fissioning = !1, c === u && (c = -1), d.timeOrigin = t, Q(d, "orbiting", t, Y(n, _[0], _[1])));
362
361
  break;
363
362
  case "merging":
364
- y >= 1 && Z(d, "absorbed", t, Se(n, v[0], v[1]));
363
+ y >= 1 && Q(d, "absorbed", t, Y(n, v[0], v[1]));
365
364
  break;
366
365
  case "absorbed":
367
366
  if (y >= 1) {
368
- xe(d, n, e.geometry.orbitRadius, e.geometry.eccentricity, t);
369
- let r = be(d, t + 3e3, s.orbitSpeedScale, s.wobbleScale);
367
+ be(d, n, e.geometry.orbitRadius, e.geometry.eccentricity, t);
368
+ let r = J(d, t + 3e3, s.orbitSpeedScale, s.wobbleScale);
370
369
  d.endX = r.x, d.endY = r.y;
371
370
  let i = Math.hypot(r.x, r.y), a = i > .01 ? .08 / i : 0;
372
- d.startX = r.x * a, d.startY = r.y * a, Z(d, "emerging", t, g);
371
+ d.startX = r.x * a, d.startY = r.y * a, Q(d, "emerging", t, g);
373
372
  }
374
373
  break;
375
374
  case "emerging":
376
375
  if (y >= 1) {
377
376
  let e = a[u];
378
- e.x = d.endX, e.y = d.endY, e.start = t, d.timeOrigin = t, d.phaseOffset = Math.atan2(d.endY, d.endX), Z(d, "orbiting", t, Se(n, _[0], _[1]));
377
+ e.x = d.endX, e.y = d.endY, e.start = t, d.timeOrigin = t, d.phaseOffset = Math.atan2(d.endY, d.endX), Q(d, "orbiting", t, Y(n, _[0], _[1]));
379
378
  }
380
379
  break;
381
380
  }
382
381
  let b, C, w, T;
383
382
  switch (d.phase) {
384
383
  case "orbiting": {
385
- let e = be(d, t, s.orbitSpeedScale, s.wobbleScale), n = a[u], r = t - n.start;
384
+ let e = J(d, t, s.orbitSpeedScale, s.wobbleScale), n = a[u], r = t - n.start;
386
385
  if (n.start > 0 && r < 2e3) {
387
- let t = Y(r / se), i = t * t * (3 - 2 * t);
388
- b = X(n.x, e.x, i), C = X(n.y, e.y, i);
386
+ let t = X(r / se), i = t * t * (3 - 2 * t);
387
+ b = Z(n.x, e.x, i), C = Z(n.y, e.y, i);
389
388
  } else b = e.x, C = e.y;
390
- w = J, T = 1;
389
+ w = q, T = 1;
391
390
  break;
392
391
  }
393
392
  case "merging": {
394
- let e = pe(Y((t - d.phaseStart) / d.phaseDuration));
395
- b = X(d.startX, d.endX, e), C = X(d.startY, d.endY, e);
396
- let n = Y((t - d.phaseStart) / d.phaseDuration);
397
- w = n > .85 ? X(J, 0, (n - .85) / .15) : J, T = X(1, .65, e);
393
+ let e = pe(X((t - d.phaseStart) / d.phaseDuration));
394
+ b = Z(d.startX, d.endX, e), C = Z(d.startY, d.endY, e);
395
+ let n = X((t - d.phaseStart) / d.phaseDuration);
396
+ w = n > .85 ? Z(q, 0, (n - .85) / .15) : q, T = Z(1, .65, e);
398
397
  break;
399
398
  }
400
399
  case "absorbed":
401
400
  b = 0, C = 0, w = 0, T = .5;
402
401
  break;
403
402
  case "emerging": {
404
- let e = me(Y((t - d.phaseStart) / d.phaseDuration));
405
- b = X(d.startX, d.endX, e), C = X(d.startY, d.endY, e);
406
- let n = Y((t - d.phaseStart) / d.phaseDuration);
407
- w = n < .1 ? X(0, J, n / .1) : J, T = X(.65, 1, e);
403
+ let e = me(X((t - d.phaseStart) / d.phaseDuration));
404
+ b = Z(d.startX, d.endX, e), C = Z(d.startY, d.endY, e);
405
+ let n = X((t - d.phaseStart) / d.phaseDuration);
406
+ w = n < .1 ? Z(0, q, n / .1) : q, T = Z(.65, 1, e);
408
407
  break;
409
408
  }
410
409
  case "fissioning": {
411
- let e = Y((t - d.phaseStart) / d.phaseDuration), n = he(e), r = le + S * n, i = be(d, t, s.orbitSpeedScale, s.wobbleScale), a = Math.hypot(i.x, i.y), o = a > 1e-4 ? i.x / a : Math.cos(d.phaseOffset), c = a > 1e-4 ? i.y / a : Math.sin(d.phaseOffset);
412
- b = o * r, C = c * r, w = J, T = X(.78, 1, Y(n)), !d.snapFired && e >= .42 && (d.snapFired = !0, l?.(Math.min(.4, .18 + .22 * x)));
410
+ let e = X((t - d.phaseStart) / d.phaseDuration), n = he(e), r = le + S * n, i = J(d, t, s.orbitSpeedScale, s.wobbleScale), a = Math.hypot(i.x, i.y), o = a > 1e-4 ? i.x / a : Math.cos(d.phaseOffset), c = a > 1e-4 ? i.y / a : Math.sin(d.phaseOffset);
411
+ b = o * r, C = c * r, w = q, T = Z(.78, 1, X(n)), !d.snapFired && e >= .42 && (d.snapFired = !0, l?.(Math.min(.4, .18 + .22 * x)));
413
412
  break;
414
413
  }
415
414
  }
@@ -421,7 +420,7 @@ function Ce(e, t) {
421
420
  for (let e of r) e.phaseOffset += (n() - .5) * .6, e.pertXPhase += n() * Math.PI, e.pertYPhase += n() * Math.PI;
422
421
  }
423
422
  function m(e) {
424
- n = C(w(e + "goo"));
423
+ n = S(C(e + "goo"));
425
424
  }
426
425
  function h(e) {
427
426
  l = e;
@@ -450,7 +449,7 @@ function Ce(e, t) {
450
449
  }
451
450
  //#endregion
452
451
  //#region src/components/blob/shaders/metaball.vert.ts
453
- var we = "#version 300 es\n\nin vec2 aPosition;\nout vec2 vUv;\n\nvoid main() {\n vUv = 0.5 * (aPosition + 1.0);\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", Te = "// --- SDF ---\n\nfloat sdCircle(vec2 p, vec2 center, float radius) {\n return length(p - center) - radius;\n}\n\n// AX.W15 — the VALUE+GRADIENT circle: returns vec3(d, dd/dx, dd/dy). The circle\n// gradient is the UNIT radial direction (p - center)/length(p - center) (the\n// eikonal property holds EXACTLY for a circle), guarded at the degenerate centre.\n// This is the keystone of the analytic-gradient smin: carrying the gradient\n// through the scene field DELETES the per-pixel 4-tap normal (4 full sceneDist\n// evals, each running 3-octave FBM + the sat/trail loops).\nvec3 sdgCircle(vec2 p, vec2 center, float radius) {\n vec2 d = p - center;\n float len = length(d);\n vec2 grad = len > 1e-6 ? d / len : vec2(0.0, 1.0);\n return vec3(len - radius, grad);\n}\n\n// IQ 2024 quadratic-polynomial smin, NORMALIZED so k is a blend band in distance\n// units. The k *= 4.0 pre-scale makes the h*h*k*0.25 poly's effective blend width\n// equal to k (the un-normalized form's width was 0.25*k).\nfloat sminQuadratic(float a, float b, float k) {\n k *= 4.0;\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - h * h * k * 0.25;\n}\n\n// IQ circular smin — a quarter-circle fillet at the seam (rounder than the\n// quadratic). The k *= 1.0/(1.0-sqrt(0.5)) factor normalizes k to the same\n// blend-band units so the merge axis swaps shape without re-tuning uSmoothK.\nfloat sminCircular(float a, float b, float k) {\n k *= 1.0 / (1.0 - sqrt(0.5));\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n}\n\n// Config-gated merge dispatch — uMerge 0 = quadratic, 1 = circular.\nfloat smin(float a, float b, float k) {\n if (uMerge > 0.5) return sminCircular(a, b, k);\n return sminQuadratic(a, b, k);\n}\n\n// AX.W15 — the VALUE+GRADIENT smin. a/b are vec3(dist, grad.xy); the blended\n// gradient is mix(a.yz, b.yz, w) with the interpolation weight w the distance\n// blend uses (IQ's vec2-smin insight). This propagates the analytic gradient\n// through the merge so the surface normal reads the field gradient DIRECTLY — no\n// finite-difference tap. The blend weight matches each variant.\nvec3 sminQuadraticG(vec3 a, vec3 b, float k) {\n k *= 4.0;\n float h = max(k - abs(a.x - b.x), 0.0) / k;\n float m = h * h * k * 0.25;\n // h-weight that selects which surface dominates (0 → a, 1 → b).\n float w = (a.x < b.x) ? 0.5 * h * h : 1.0 - 0.5 * h * h;\n float dist = min(a.x, b.x) - m;\n vec2 grad = mix(a.yz, b.yz, w);\n return vec3(dist, grad);\n}\n\nvec3 sminCircularG(vec3 a, vec3 b, float k) {\n k *= 1.0 / (1.0 - sqrt(0.5));\n float h = max(k - abs(a.x - b.x), 0.0) / k;\n float m = k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n float w = (a.x < b.x) ? 0.5 * h : 1.0 - 0.5 * h;\n float dist = min(a.x, b.x) - m;\n vec2 grad = mix(a.yz, b.yz, w);\n return vec3(dist, grad);\n}\n\nvec3 sminG(vec3 a, vec3 b, float k) {\n if (uMerge > 0.5) return sminCircularG(a, b, k);\n return sminQuadraticG(a, b, k);\n}", Ee = "// --- Noise ---\n\nfloat hash21(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// IQ analytic-derivative gradient noise — value in .x, ANALYTIC gradient\n// (d/dx, d/dy) in .yz, from one eval. The quintic fade has a continuous 2nd\n// derivative so the gradient is smooth (a cubic smoothstep fade would crease it).\n// (Inigo Quilez, https://iquilezles.org/articles/gradientnoise/.)\nvec3 noised(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n\n // Quintic fade + its derivative.\n vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n vec2 du = 30.0 * f * f * (f * (f - 2.0) + 1.0);\n\n // Per-corner gradient vectors from the hash (centred to [-1, 1]).\n vec2 ga = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 0.0)), hash21(i + vec2(7.3, 0.0)));\n vec2 gb = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 0.0)), hash21(i + vec2(8.3, 0.0)));\n vec2 gc = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(7.3, 1.0)));\n vec2 gd = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 1.0)), hash21(i + vec2(8.3, 1.0)));\n\n float va = dot(ga, f - vec2(0.0, 0.0));\n float vb = dot(gb, f - vec2(1.0, 0.0));\n float vc = dot(gc, f - vec2(0.0, 1.0));\n float vd = dot(gd, f - vec2(1.0, 1.0));\n\n // Value, remapped to [0,1] so it drops in for the prior valueNoise.\n float n = va + u.x * (vb - va) + u.y * (vc - va) + u.x * u.y * (va - vb - vc + vd);\n float value = 0.5 + 0.5 * n;\n\n // Analytic gradient (chain rule through the bilinear blend + the fade).\n vec2 grad =\n ga + u.x * (gb - ga) + u.y * (gc - ga) + u.x * u.y * (ga - gb - gc + gd) +\n du * (vec2(u.y, u.x) * (va - vb - vc + vd) + vec2(vb, vc) - va);\n return vec3(value, 0.5 * grad);\n}\n\n// Rotated-octave FBM over the analytic gradient noise: a fixed ~0.5 rad 2x2\n// rotation between octaves breaks the axis-aligned banding. The rotation CONSTANT\n// is spliced from the shared chunk (AV.W2 — the one FBM_ROT); the loops below\n// stay blob-local (param octaves + the LIQUID lacunarity/persistence, per §3a).", De = 1.8, Oe = .42, ke = `float fbm(vec2 p, int octaves) {
452
+ var Se = "#version 300 es\n\nin vec2 aPosition;\nout vec2 vUv;\n\nvoid main() {\n vUv = 0.5 * (aPosition + 1.0);\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", Ce = "// --- SDF ---\n\nfloat sdCircle(vec2 p, vec2 center, float radius) {\n return length(p - center) - radius;\n}\n\n// Value and gradient circle: returns vec3(d, dd/dx, dd/dy). The circle\n// gradient is the UNIT radial direction (p - center)/length(p - center) (the\n// eikonal property holds EXACTLY for a circle), guarded at the degenerate centre.\n// This is the keystone of the analytic-gradient smin: carrying the gradient\n// through the scene field DELETES the per-pixel 4-tap normal (4 full sceneDist\n// evals, each running 3-octave FBM + the sat/trail loops).\nvec3 sdgCircle(vec2 p, vec2 center, float radius) {\n vec2 d = p - center;\n float len = length(d);\n vec2 grad = len > 1e-6 ? d / len : vec2(0.0, 1.0);\n return vec3(len - radius, grad);\n}\n\n// IQ 2024 quadratic-polynomial smin, NORMALIZED so k is a blend band in distance\n// units. The k *= 4.0 pre-scale makes the h*h*k*0.25 poly's effective blend width\n// equal to k (the un-normalized form's width was 0.25*k).\nfloat sminQuadratic(float a, float b, float k) {\n k *= 4.0;\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - h * h * k * 0.25;\n}\n\n// IQ circular smin — a quarter-circle fillet at the seam (rounder than the\n// quadratic). The k *= 1.0/(1.0-sqrt(0.5)) factor normalizes k to the same\n// blend-band units so the merge axis swaps shape without re-tuning uSmoothK.\nfloat sminCircular(float a, float b, float k) {\n k *= 1.0 / (1.0 - sqrt(0.5));\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n}\n\n// Config-gated merge dispatch — uMerge 0 = quadratic, 1 = circular.\nfloat smin(float a, float b, float k) {\n if (uMerge > 0.5) return sminCircular(a, b, k);\n return sminQuadratic(a, b, k);\n}\n\n// Value and gradient smin. a/b are vec3(dist, grad.xy); the blended\n// gradient is mix(a.yz, b.yz, w) with the interpolation weight w the distance\n// blend uses (IQ's vec2-smin insight). This propagates the analytic gradient\n// through the merge so the surface normal reads the field gradient DIRECTLY — no\n// finite-difference tap. The blend weight matches each variant.\nvec3 sminQuadraticG(vec3 a, vec3 b, float k) {\n k *= 4.0;\n float h = max(k - abs(a.x - b.x), 0.0) / k;\n float m = h * h * k * 0.25;\n // h-weight that selects which surface dominates (0 → a, 1 → b).\n float w = (a.x < b.x) ? 0.5 * h * h : 1.0 - 0.5 * h * h;\n float dist = min(a.x, b.x) - m;\n vec2 grad = mix(a.yz, b.yz, w);\n return vec3(dist, grad);\n}\n\nvec3 sminCircularG(vec3 a, vec3 b, float k) {\n k *= 1.0 / (1.0 - sqrt(0.5));\n float h = max(k - abs(a.x - b.x), 0.0) / k;\n float m = k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n float w = (a.x < b.x) ? 0.5 * h : 1.0 - 0.5 * h;\n float dist = min(a.x, b.x) - m;\n vec2 grad = mix(a.yz, b.yz, w);\n return vec3(dist, grad);\n}\n\nvec3 sminG(vec3 a, vec3 b, float k) {\n if (uMerge > 0.5) return sminCircularG(a, b, k);\n return sminQuadraticG(a, b, k);\n}", we = "// --- Noise ---\n\nfloat hash21(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// IQ analytic-derivative gradient noise — value in .x, ANALYTIC gradient\n// (d/dx, d/dy) in .yz, from one eval. The quintic fade has a continuous 2nd\n// derivative so the gradient is smooth (a cubic smoothstep fade would crease it).\n// (Inigo Quilez, https://iquilezles.org/articles/gradientnoise/.)\nvec3 noised(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n\n // Quintic fade + its derivative.\n vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n vec2 du = 30.0 * f * f * (f * (f - 2.0) + 1.0);\n\n // Per-corner gradient vectors from the hash (centred to [-1, 1]).\n vec2 ga = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 0.0)), hash21(i + vec2(7.3, 0.0)));\n vec2 gb = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 0.0)), hash21(i + vec2(8.3, 0.0)));\n vec2 gc = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(7.3, 1.0)));\n vec2 gd = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 1.0)), hash21(i + vec2(8.3, 1.0)));\n\n float va = dot(ga, f - vec2(0.0, 0.0));\n float vb = dot(gb, f - vec2(1.0, 0.0));\n float vc = dot(gc, f - vec2(0.0, 1.0));\n float vd = dot(gd, f - vec2(1.0, 1.0));\n\n // Value, remapped to [0,1] so it drops in as the valueNoise.\n float n = va + u.x * (vb - va) + u.y * (vc - va) + u.x * u.y * (va - vb - vc + vd);\n float value = 0.5 + 0.5 * n;\n\n // Analytic gradient (chain rule through the bilinear blend + the fade).\n vec2 grad =\n ga + u.x * (gb - ga) + u.y * (gc - ga) + u.x * u.y * (ga - gb - gc + gd) +\n du * (vec2(u.y, u.x) * (va - vb - vc + vd) + vec2(vb, vc) - va);\n return vec3(value, 0.5 * grad);\n}\n\n// Rotated-octave FBM over the analytic gradient noise: a fixed ~0.5 rad 2x2\n// rotation between octaves breaks the axis-aligned banding. The rotation CONSTANT\n// is spliced from the shared chunk; the loops below\n// stay blob-local (param octaves + the LIQUID lacunarity/persistence, per §3a).", Te = 1.8, Ee = .42, De = `float fbm(vec2 p, int octaves) {
454
453
  float value = 0.0;
455
454
  float amp = 0.5;
456
455
  float freq = 1.0;
@@ -458,13 +457,13 @@ var we = "#version 300 es\n\nin vec2 aPosition;\nout vec2 vUv;\n\nvoid main() {\
458
457
  if (i >= octaves) break;
459
458
  value += amp * noised(p * freq).x;
460
459
  p = FBM_ROT * p;
461
- freq *= ${De.toFixed(1)};
462
- amp *= ${Oe.toFixed(2)};
460
+ freq *= ${Te.toFixed(1)};
461
+ amp *= ${Ee.toFixed(2)};
463
462
  }
464
463
  return value;
465
464
  }
466
465
 
467
- // AX.W15 — FBM with ANALYTIC GRADIENT. Returns vec3(value, ∂/∂x, ∂/∂y). The
466
+ // FBM with analytic gradient. Returns vec3(value, ∂/∂x, ∂/∂y). The
468
467
  // gradient accumulates noised()'s analytic gradient per octave, chain-ruled
469
468
  // through the per-octave frequency scale AND the FBM_ROT rotation: octave i samples
470
469
  // at R^i · (freq·p), so the gradient w.r.t. the ORIGINAL p picks up freq and
@@ -486,8 +485,8 @@ vec3 fbmG(vec2 p, int octaves) {
486
485
  // d(value)/dp = amp · freq · (R^i)^T · noised.yz (the rotated chain rule).
487
486
  grad += amp * freq * (transpose(rotAccum) * n.yz);
488
487
  pp = FBM_ROT * pp;
489
- freq *= ${De.toFixed(1)};
490
- amp *= ${Oe.toFixed(2)};
488
+ freq *= ${Te.toFixed(1)};
489
+ amp *= ${Ee.toFixed(2)};
491
490
  rotAccum = FBM_ROT * rotAccum;
492
491
  }
493
492
  return vec3(value, grad);
@@ -502,80 +501,25 @@ vec3 fbmWarpedG(vec2 p, int octaves, float warpAmp) {
502
501
  vec2 q = vec2(fbm(p + vec2(0.0, 0.0), octaves), fbm(p + vec2(5.2, 1.3), octaves));
503
502
  return fbmG(p + warpAmp * (q - 0.5), octaves);
504
503
  }
505
- `, Ae = "// Edit #4's gamut step — hue-preserving inward chroma clamp. If the linear result\n// is out of [0,1], bisect chroma toward 0 (L + h fixed) until in gamut. Preserves\n// hue exactly (only C shrinks). 16 steps resolve C to < 2^-16 of its span.\nbool inGamut(vec3 lin) {\n return all(greaterThanEqual(lin, vec3(0.0))) && all(lessThanEqual(lin, vec3(1.0)));\n}\nvec3 gamutClampOklch(vec3 lch) {\n vec3 lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) return lch;\n float lo = 0.0;\n float hi = lch.y;\n for (int i = 0; i < 16; i++) {\n float mid = 0.5 * (lo + hi);\n vec3 test = vec3(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n return vec3(lch.x, lo, lch.z);\n}", je = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform vec2 uResolution;\nuniform float uTime;\nuniform vec3 uBaseColor;\n\n// Multi-stop palette (W11.b) — 2-4 in-family OKLCh stops (uploaded GAMMA sRGB, like\n// uBaseColor). uStopCount <= 1 falls back to uBaseColor (the single-color default,\n// zero regression). MAX_BLOB_STOPS is a compile-time #define.\n#define MAX_BLOB_STOPS 4\nuniform int uStopCount;\nuniform vec3 uPalette[MAX_BLOB_STOPS];\n\n// Pointer\nuniform vec2 uPointer;\nuniform float uPointerActive;\nuniform float uPointerAttraction;\nuniform float uPointerStrength;\n\n// Main body\nuniform float uBodyRadius;\n\n// Pulsation\nuniform float uPulsePhase;\nuniform float uPulseAmp;\n\n// Surface noise\nuniform float uNoiseAmp;\nuniform float uNoiseFreq;\nuniform float uNoiseSpeed;\n\n// Gooey\nuniform float uSmoothK;\nuniform float uMerge; // 0 = quadratic smin, 1 = circular smin (rounder menisci)\n\n// BC.W-GOOBLOB-PLAIN — the STAGE-1 gate. 1.0 = the plain shadowless lightless\n// fill-only floor (variant=\"blob\"); 0.0 = the full lit pipeline (variant=\"meatball\" /\n// STAGE 2). The WebGL2 fallback transcribes the SAME stripped branch the WGSL primary\n// gates (research/viz/goo-blob.md §5 — the GLSL twin).\n// BD.W-GOO-CAROUSEL-DECK — uStage is now DERIVED from uMorphT (uStage = uMorphT<=0 ?\n// 1 : 0) at upload; the SHADING morph (below) reads uMorphT directly.\nuniform float uStage;\n\n// BD.W-GOO-CAROUSEL-DECK — the blob to meatball SHADING-MORPH scalar. 0.0 = the flat blob\n// fill (byte-identical to the STAGE-1 floor), 1.0 = the fully-dressed lit meatball; the\n// in-between LERPS the surface shading (NOT the geometry — the smin field is shared). The\n// renderer resolves it from config.morphT (variant to endpoint back-compat: blob to 0,\n// meatball to 1). A consumer ANIMATING morphT 0 to 1 gets the live morph.\nuniform float uMorphT;\n\n// AX.W16 (arm 5) — the PRE-FBM bounding-discard radius (UV space). main() early-outs\n// to a transparent write for any fragment OUTSIDE this radius BEFORE the two 3-octave\n// FBM calls + the OKLCh round-trip. The renderer uploads it PADDED by every\n// outward-expanding term (body + eccentric orbit + sat radius + smin band + FBM edge\n// amplitude + click-pulse + a lean/squash safety pad) so it NEVER clips the wet\n// meniscus (IQ: inflate the bound to match any outward op).\nuniform float uMaxReach;\n\n// Membrane — domain-warp strength on the FBM edge displacement (0 = plain fbm).\nuniform float uWarpAmp;\n\n// Lit glass surface (W9.b) — gated behind uLit so the flat fill stays default.\nuniform float uLit; // 0 = flat fill (default), 1 = lit droplet\nuniform vec3 uRimColor; // Fresnel rim tint (GAMMA sRGB, via the /color leaf)\nuniform vec3 uLightDir; // normalized light direction (x, y, z)\nuniform float uSpecStrength; // Blinn-Phong specular weight\nuniform float uSpecShininess; // specular exponent (16-64, tight glint)\nuniform float uRimPower; // Fresnel/Schlick exponent (~2-3)\nuniform float uRimStrength; // Fresnel rim weight\n\n// BC.W-GOOBLOB-MEATBALL — the procedural 2D SDF soft-shadow march (T2, the GLSL twin of\n// the WGSL res.z/res.w lanes). uShadow gates the IQ rmshadows soft contact shadow that\n// FOLLOWS the irregular silhouette; uShadowSoftness is the penumbra hardness (4-48).\nuniform float uShadow; // 0 = no shadow, 1 = the soft contact shadow ON\nuniform float uShadowSoftness; // penumbra hardness (inverse light-source size, 4-48)\n\n// Iridescence + fake subsurface (W11.a) — translucent-gel read.\nuniform float uIridescence; // warm-pearl rim sheen weight (0 = off)\nuniform float uIridHue; // base hue (radians) the cosine palette biases toward (warm)\nuniform float uIridSpeed; // animated-thickness scroll for the iridescent t\nuniform float uSssScale; // fast-SSS back-light weight\nuniform float uSssPower; // fast-SSS exponent\nuniform float uCoreGlow; // thickness-driven inner-luminosity lift\n\n// Color perturbation (perceptually uniform — OKLCh L/C/h)\nuniform float uHueRange; // degrees of hue swing (converted to radians)\nuniform float uSatShift; // OKLCh chroma swing\nuniform float uBrightnessShift; // OKLCh lightness bias\nuniform float uColorNoiseFreq;\nuniform float uColorNoiseSpeed;\n\n// Satellites (max 4)\n#define MAX_SATS 4\nuniform int uSatCount;\nuniform vec2 uSatPos[MAX_SATS];\nuniform float uSatRadius[MAX_SATS];\nuniform float uSatOpacity[MAX_SATS];\n\n// F9.R1 (BG.W-BLOB-SATELLITE-SHADE) — the per-satellite EXPLICIT-SHADE seam (the GL\n// color-seam widen the value.js hero blob asked for; the BA-VJS-5 / C-1 residual, the\n// W-GOO-REDRESS arm-B book discharged). uSatColorActive == 0 is the DEFAULT (the derived\n// palette shade — byte-identical to HEAD): blendSatColor() early-returns and touches\n// nothing. When a consumer supplies explicit per-satellite shades (uSatColor[i], GAMMA\n// sRGB, at uSatColorAmt[i] weight — typically 1) the fragment blends the base palette\n// OKLCh toward each satellite's shade, weighted by that satellite's smin-field proximity\n// at this pixel. The body keeps the derived base (the ask is per-SATELLITE).\nuniform int uSatColorActive;\nuniform vec3 uSatColor[MAX_SATS];\nuniform float uSatColorAmt[MAX_SATS];\n\n// Pointer trail (W10) — a decaying-radius pseudopod toward the cursor. uTrail is a\n// COMPILE-TIME-SIZED array (GLSL ES 3.00 forbids a uniform-sized array) with a\n// DYNAMIC break on uTrailCount, mirroring the satellite loop. Later samples paint\n// smaller metaballs (r *= 1 - i/N) so the trail tapers into a tail.\n#define TRAIL_N 15\nuniform int uTrailCount;\nuniform vec2 uTrailPos[TRAIL_N];\nuniform float uTrailRadius[TRAIL_N];\n\n// Velocity-driven volume-preserving squash-and-stretch (W10).\nuniform vec2 uVelocity; // smoothed pointer velocity (motion direction + speed)\nuniform float uStretch; // squash-stretch magnitude (0 = off)\n\nconst float PI = 3.141592653589793;\n", Q = "\n", Me = je + Q + Ee + Q + `${y}
504
+ `, Oe = "// Edit #4's gamut step — hue-preserving inward chroma clamp. If the linear result\n// is out of [0,1], bisect chroma toward 0 (L + h fixed) until in gamut. Preserves\n// hue exactly (only C shrinks). 16 steps resolve C to < 2^-16 of its span.\nbool inGamut(vec3 lin) {\n return all(greaterThanEqual(lin, vec3(0.0))) && all(lessThanEqual(lin, vec3(1.0)));\n}\nvec3 gamutClampOklch(vec3 lch) {\n vec3 lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) return lch;\n float lo = 0.0;\n float hi = lch.y;\n for (int i = 0; i < 16; i++) {\n float mid = 0.5 * (lo + hi);\n vec3 test = vec3(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n return vec3(lch.x, lo, lch.z);\n}", ke = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform vec2 uResolution;\nuniform float uTime;\nuniform vec3 uBaseColor;\n\n// Multi-stop palette — 2-4 in-family OKLCh stops (uploaded GAMMA sRGB, like\n// uBaseColor). uStopCount <= 1 falls back to uBaseColor (the single-color default,\n// zero regression). MAX_BLOB_STOPS is a compile-time #define.\n#define MAX_BLOB_STOPS 4\nuniform int uStopCount;\nuniform vec3 uPalette[MAX_BLOB_STOPS];\n\n// Pointer\nuniform vec2 uPointer;\nuniform float uPointerActive;\nuniform float uPointerAttraction;\nuniform float uPointerStrength;\n\n// Main body\nuniform float uBodyRadius;\n\n// Pulsation\nuniform float uPulsePhase;\nuniform float uPulseAmp;\n\n// Surface noise\nuniform float uNoiseAmp;\nuniform float uNoiseFreq;\nuniform float uNoiseSpeed;\n\n// Gooey\nuniform float uSmoothK;\nuniform float uMerge; // 0 = quadratic smin, 1 = circular smin (rounder menisci)\n\n// The stripped-surface gate. 1.0 = the flat shadowless fill-only floor; 0.0 = the\n// dressed pipeline. It is derived from the single uMorphT surface scalar.\nuniform float uStage;\n\n// The blob-to-meatball shading-morph scalar. 0.0 = the flat blob\n// fill (byte-identical to the STAGE-1 floor), 1.0 = the fully-dressed lit meatball; the\n// in-between LERPS the surface shading (NOT the geometry — the smin field is shared). The\n// renderer clamps it from config.morphT. Animating 0 to 1 gets the live morph.\nuniform float uMorphT;\n\n// The pre-FBM bounding-discard radius in UV space. main() early-outs\n// to a transparent write for any fragment OUTSIDE this radius BEFORE the two 3-octave\n// FBM calls + the OKLCh round-trip. The renderer uploads it PADDED by every\n// outward-expanding term (body + eccentric orbit + sat radius + smin band + FBM edge\n// amplitude + click-pulse + a lean/squash safety pad) so it NEVER clips the wet\n// meniscus (IQ: inflate the bound to match any outward op).\nuniform float uMaxReach;\n\n// Membrane — domain-warp strength on the FBM edge displacement (0 = plain fbm).\nuniform float uWarpAmp;\n\n// Lit glass surface — gated behind uLit so the flat fill stays default.\nuniform float uLit; // 0 = flat fill (default), 1 = lit droplet\nuniform vec3 uRimColor; // Fresnel rim tint (GAMMA sRGB, via the /color leaf)\nuniform vec3 uLightDir; // normalized light direction (x, y, z)\nuniform float uSpecStrength; // Blinn-Phong specular weight\nuniform float uSpecShininess; // specular exponent (16-64, tight glint)\nuniform float uRimPower; // Fresnel/Schlick exponent (~2-3)\nuniform float uRimStrength; // Fresnel rim weight\n\n// The procedural 2D SDF soft-shadow march, the GLSL twin of\n// the WGSL res.z/res.w lanes). uShadow gates the IQ rmshadows soft contact shadow that\n// FOLLOWS the irregular silhouette; uShadowSoftness is the penumbra hardness (4-48).\nuniform float uShadow; // 0 = no shadow, 1 = the soft contact shadow ON\nuniform float uShadowSoftness; // penumbra hardness (inverse light-source size, 4-48)\n\n// Iridescence + fake subsurface — translucent-gel read.\nuniform float uIridescence; // warm-pearl rim sheen weight (0 = off)\nuniform float uIridHue; // base hue (radians) the cosine palette biases toward (warm)\nuniform float uIridSpeed; // animated-thickness scroll for the iridescent t\nuniform float uSssScale; // fast-SSS back-light weight\nuniform float uSssPower; // fast-SSS exponent\nuniform float uCoreGlow; // thickness-driven inner-luminosity lift\n\n// Color perturbation (perceptually uniform — OKLCh L/C/h)\nuniform float uHueRange; // degrees of hue swing (converted to radians)\nuniform float uSatShift; // OKLCh chroma swing\nuniform float uBrightnessShift; // OKLCh lightness bias\nuniform float uColorNoiseFreq;\nuniform float uColorNoiseSpeed;\n\n// Satellites (max 4)\n#define MAX_SATS 4\nuniform int uSatCount;\nuniform vec2 uSatPos[MAX_SATS];\nuniform float uSatRadius[MAX_SATS];\nuniform float uSatOpacity[MAX_SATS];\n\n// The per-satellite explicit-shade seam widens the GL color contract for the hero blob.\n// uSatColorActive == 0 is the default (the derived\n// palette shade, UNCHANGED): blendSatColor() early-returns and touches\n// nothing. When a consumer supplies explicit per-satellite shades (uSatColor[i], GAMMA\n// sRGB, at uSatColorAmt[i] weight — typically 1) the fragment blends the base palette\n// OKLCh toward each satellite's shade, weighted by that satellite's smin-field proximity\n// at this pixel. The body keeps the derived base (the ask is per-SATELLITE).\nuniform int uSatColorActive;\nuniform vec3 uSatColor[MAX_SATS];\nuniform float uSatColorAmt[MAX_SATS];\n\n// Pointer trail — a decaying-radius pseudopod toward the cursor. uTrail is a\n// COMPILE-TIME-SIZED array (GLSL ES 3.00 forbids a uniform-sized array) with a\n// DYNAMIC break on uTrailCount, mirroring the satellite loop. Later samples paint\n// smaller metaballs (r *= 1 - i/N) so the trail tapers into a tail.\n#define TRAIL_N 15\nuniform int uTrailCount;\nuniform vec2 uTrailPos[TRAIL_N];\nuniform float uTrailRadius[TRAIL_N];\n\n// Velocity-driven volume-preserving squash-and-stretch.\nuniform vec2 uVelocity; // smoothed pointer velocity (motion direction + speed)\nuniform float uStretch; // squash-stretch magnitude (0 = off)\n\nconst float PI = 3.141592653589793;\n", Ae = "\n", je = ke + Ae + we + `
505
+ ${d}
506
+
507
+ ` + De + Ae + Ce + `
506
508
 
507
- ` + ke + Q + Te + Q + `
508
509
  // --- Color (Ottosson OKLab/OKLCh — value.js EXACT constants, transposed) ---
509
510
  //
510
511
  // The OETF (srgbToLinear/linearToSrgb) + the four Ottosson matrices + their space
511
- // conversions are SPLICED from the shared chunk (AV.W2 —
512
- // src/composables/glass/webgl/shaders/procedural-color.glsl.ts). They live there
512
+ // conversions are spliced from src/composables/glass/procedural/color.glsl.ts.
513
+ // They live there
513
514
  // ONCE so the OETF can never diverge from aurora's; the line-for-line TS port
514
515
  // (__tests__/metaball-color.glsl-port.ts) mirrors that chunk. The gamut-clamp
515
516
  // below stays blob-local (aurora has no in-shader OKLCh path).
516
- ${p}
517
517
  ${m}
518
+ ${g}
518
519
 
519
- ` + Ae + Q + "\n// AX.W15 — de-synced breath. The body throb was a single sin(uPulsePhase) — a\n// mechanical pulse that re-syncs every cycle. Three DETUNED sines at IRRATIONAL\n// frequency ratios (1, 0.13/0.09 ≈ 1.444, 0.31) never re-phase, so the membrane\n// breathes like a living creature (an asymmetric slower-exhale calm band) rather\n// than a metronome. Normalized so the composite stays in ~[-1, 1].\nfloat breath(float phase) {\n return (sin(phase)\n + 0.5 * sin(phase * 1.4444 + 1.7)\n + 0.28 * sin(phase * 0.31 + 4.1)) / 1.78;\n}\n\n// AX.W15 — the composite SDF field WITH its ANALYTIC GRADIENT, returned as\n// vec3(dist, ∂d/∂x, ∂d/∂y). The domain-warped body membrane smin-merged with the\n// satellites + trail; the gradient propagates through sminG's mix(a.yz, b.yz, h)\n// so the surface normal reads the field gradient DIRECTLY (the 4-tap finite\n// difference is DELETED — its 4 full evals per lit pixel are gone).\n//\n// The ANISOTROPIC SQUASH (W10 volume-preserving stretch) is a linear map\n// bodyUv = D·R·uv (R rotates world→(motion-axis, perp); D = diag(1/sa, sa)). The\n// body field's gradient is computed in bodyUv space, so it MUST be transformed back\n// to uv space by M^T = R^T·D (the inverse-transpose handling the SOTA-deepening [2]\n// warns the 4-tap did implicitly by sampling in screen space).\nvec3 sceneDistG(vec2 uv) {\n // De-synced pulsing body radius.\n float bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Velocity-driven VOLUME-PRESERVING squash-and-stretch (W10), SATURATED (AX.W46\n // D5). sa is the stretch along motion, EXACTLY 1/sa perpendicular (area-preserving).\n // The basis (ax, perp) is captured so the gradient can be transformed back below.\n //\n // The W10 form sa = 1 + speed*uStretch rode an UNBOUNDED critically-damped spring\n // velocity (O(5-8)/s on a fast flick) -> sa ~ 1.78-2.25x elongation, a violent\n // taffy-pull. A tanh saturation sa = 1 + tanh(speed*k)*uStretch caps the elongation\n // at 1 + uStretch (~1.5x at the default stretch 0.5) no matter how fast the flick —\n // the fastest flick reads as a lively bounce, never a rubber-band snap (the standard\n // volume-preserving squash-and-stretch restraint). k = 1.6 keeps the tanh in its\n // near-linear regime for a slow drag (the gentle squash still reads) and saturates\n // only the fast flick.\n vec2 bodyUv = uv;\n vec2 ax = vec2(1.0, 0.0);\n vec2 perp = vec2(0.0, 1.0);\n float sa = 1.0;\n float speed = length(uVelocity);\n bool squashed = uStretch > 0.0 && speed > 1e-4;\n if (squashed) {\n ax = uVelocity / speed;\n perp = vec2(-ax.y, ax.x);\n sa = 1.0 + tanh(speed * 1.6) * uStretch;\n bodyUv = vec2(dot(uv, ax) / sa, dot(uv, perp) * sa);\n }\n\n // Domain-warped FBM displacement WITH its analytic gradient (the warp-Jacobian\n // approximation per [2]). disp = (noiseVal - 0.5) · uNoiseAmp; its gradient in\n // bodyUv space is uNoiseAmp · uNoiseFreq · fbmGrad (the uNoiseFreq chain factor\n // from the bodyUv·uNoiseFreq argument).\n vec3 fbmv = fbmWarpedG(bodyUv * uNoiseFreq + uTime * uNoiseSpeed, 3, uWarpAmp);\n float bodyDisplacement = (fbmv.x - 0.5) * uNoiseAmp;\n vec2 dispGradBody = uNoiseAmp * uNoiseFreq * fbmv.yz;\n\n // Body circle WITH gradient (in bodyUv space). The displaced radius subtracts\n // the displacement, so the body gradient is circleGrad - dispGrad (sign per\n // [2]: d = circleDist - displacement ⇒ grad = circleGrad - dispGrad).\n vec3 bodyG = sdgCircle(bodyUv, vec2(0.0), bodyR + bodyDisplacement);\n vec2 bodyGradBody = bodyG.yz - dispGradBody;\n\n // Transform the body gradient back to uv space: g_uv = R^T · D · g_body, i.e.\n // scale by D = diag(1/sa, sa) in the (ax, perp) frame then reconstruct in world.\n vec2 bodyGradUv;\n if (squashed) {\n vec2 scaled = vec2(bodyGradBody.x / sa, bodyGradBody.y * sa);\n bodyGradUv = scaled.x * ax + scaled.y * perp;\n } else {\n bodyGradUv = bodyGradBody;\n }\n vec3 d = vec3(bodyG.x, bodyGradUv);\n\n // Satellites — smin-merged into the body (uMerge selects quadratic/circular).\n for (int i = 0; i < MAX_SATS; i++) {\n if (i >= uSatCount) break;\n vec3 satG = sdgCircle(uv, uSatPos[i], uSatRadius[i]);\n satG.x += (1.0 - uSatOpacity[i]) * 0.3;\n d = sminG(d, satG, uSmoothK);\n }\n\n // Pointer trail — a decaying-radius pseudopod reaching toward the cursor,\n // smin-merged so it stretches an elastic limb and snaps back.\n for (int i = 0; i < TRAIL_N; i++) {\n if (i >= uTrailCount) break;\n vec3 trailG = sdgCircle(uv, uTrailPos[i], uTrailRadius[i]);\n d = sminG(d, trailG, uSmoothK);\n }\n return d;\n}\n\n// AX.W15 — the analytic surface normal. The field gradient grad2d arrives\n// DIRECTLY from sceneDistG (no 4-tap). The smin field is sub-unit (the CD family\n// |grad| ≤ 1) so the gradient is NOT unit-length — normalize() before the dome\n// lift (the unit contract is on the FINAL lifted normal N, not the raw field\n// gradient). The Z dome: 'interior' is the normalized depth inward from the rim\n// (-d/bodyR); z = sqrt(1 - (1 - interior)^2) is the unit half-sphere profile (flat\n// centre, steep rim). N tilts outward along the field gradient near the rim and\n// points at the viewer deep inside.\nvec3 surfaceNormalFromGrad(vec2 grad2d, float d, float bodyR) {\n vec2 g = normalize(grad2d + vec2(1e-6));\n float interior = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);\n float z = sqrt(max(0.0, 1.0 - (1.0 - interior) * (1.0 - interior)));\n return normalize(vec3(g * (1.0 - z), z) + vec3(0.0, 0.0, 1e-6));\n}\n\n// BC.W-GOOBLOB-MEATBALL — the 2D SDF soft-shadow march (IQ rmshadows improved-penumbra,\n// research/viz/goo-blob.md §2.3, §5). The GLSL twin of the WGSL softShadow2D — a procedural\n// soft contact shadow FOLLOWING the irregular metaball silhouette (NOT a hard disc/box\n// shadow). Marches from ro along rd (the in-plane projection of uLightDir),\n// accumulating the closest miss via the Aaltonen penumbra (y = h*h/(2*ph) + d =\n// sqrt(h*h - y*y)) that kills the banding the naive res = min(res, h/(w*t)) shows. CHEAP:\n// 24 steps, re-uses the SAME sceneDistG().x field (NO separate field re-eval, NO FBO/\n// multi-pass — the procedural field needs none). w is the penumbra hardness (inverse\n// light-source size -> uShadowSoftness). Derivative-FREE. Returns 1.0 (lit) -> 0.0 (occluded).\nfloat softShadow2D(vec2 ro, vec2 rd, float mint, float maxt, float w) {\n float res = 1.0;\n float ph = 1e20;\n float t = mint;\n for (int i = 0; i < 24; i++) {\n if (t >= maxt) break;\n float h = sceneDistG(ro + rd * t).x;\n if (h < 0.001) return 0.0;\n float y = h * h / (2.0 * ph);\n float dd = sqrt(max(h * h - y * y, 0.0));\n res = min(res, dd / (w * max(0.001, t - y)));\n ph = h;\n t += h;\n }\n return clamp(res, 0.0, 1.0);\n}\n\n// W11.b — sample the multi-stop palette at t in [0,1], interpolating adjacent\n// stops in OKLab with a MIDPOINT CHROMA-BUMP (a linear OKLab mix of a vivid pair\n// dips chroma through grey; the bump lifts it back). Falls back to uBaseColor when\n// uStopCount <= 1. Returns an OKLCh stop [L, C, h(rad)].\nvec3 samplePaletteOklch(float t) {\n if (uStopCount <= 1) return oklabToOklch(srgbToOklab(uBaseColor));\n float n = float(uStopCount);\n float ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n int i0 = int(floor(ft));\n int i1 = min(i0 + 1, uStopCount - 1);\n float f = ft - float(i0);\n // Fetch adjacent stops (uPalette is gamma sRGB) → OKLab.\n vec3 labA = srgbToOklab(uPalette[i0]);\n vec3 labB = srgbToOklab(uPalette[i1]);\n vec3 lab = mix(labA, labB, f);\n vec3 lch = oklabToOklch(lab);\n // Midpoint chroma-bump: a bell (peaks at f=0.5) lifts C off the grey midpoint.\n lch.y += 0.03 * sin(PI * f);\n return lch;\n}\n\n// F9.R1 (BG.W-BLOB-SATELLITE-SHADE) — the per-satellite explicit-shade blend. The GL\n// color-seam widen value.js's hero blob asked for (the BA-VJS-5 / C-1 residual, the\n// W-GOO-REDRESS arm-B book discharged). DEFAULT OFF: uSatColorActive == 0 returns oklch\n// UNCHANGED (uniform control flow, zero cost, byte-identical to HEAD). When ON, each\n// satellite carrying a positive uSatColorAmt tints the fragments in its smin-field\n// neighbourhood toward its explicit shade — mixed in OKLab (the samplePaletteOklch\n// convention; no hue wrap). The proximity weight rides the SAME opacity-inflated distance\n// the sceneDistG satellite term uses, so a fading satellite's tint fades with it. The\n// body keeps the derived palette base (no uBodyColor fork — the ask is per-SATELLITE).\nvec3 blendSatColor(vec3 oklch, vec2 uv) {\n if (uSatColorActive == 0) return oklch;\n vec3 lab = oklchToOklab(oklch);\n for (int i = 0; i < MAX_SATS; i++) {\n if (i >= uSatCount) break;\n float amt = clamp(uSatColorAmt[i], 0.0, 1.0);\n if (amt <= 0.0) continue;\n // Proximity: 1 well inside satellite i, fading to 0 across the smin band. The\n // opacity-inflated distance matches sceneDistG's satellite term.\n float di = sdCircle(uv, uSatPos[i], uSatRadius[i]) + (1.0 - uSatOpacity[i]) * 0.3;\n float w = (1.0 - smoothstep(-uSatRadius[i], uSmoothK, di)) * amt;\n lab = mix(lab, srgbToOklab(uSatColor[i]), clamp(w, 0.0, 1.0));\n }\n return oklabToOklch(lab);\n}\n\nvoid main() {\n vec2 uv = vUv - 0.5;\n\n // AX.W16 (arm 5) — PRE-FBM bounding early-out. The oversized canvas (1.6x the\n // wrapper) runs the full fragment ALU — two 3-octave FBM evals + the OKLCh\n // round-trip + the lit/iridescence/SSS block — on a large transparent border\n // otherwise (~60% of the canvas is outside the droplet reach). Any fragment beyond\n // uMaxReach (the PADDED worst-case painted reach, uploaded so it never clips the\n // wet meniscus) writes transparent and returns BEFORE any of that work. This is a\n // transparent WRITE, NOT a GLSL discard: the pass is a pure premultiplied blend\n // with no depth, and discard disables the tiled-renderer fast path on mobile GPUs.\n // No fwidth is computed before the return, so there is no\n // derivative-in-non-uniform-control-flow hazard (the kept pixels compute their own\n // fwidth normally below). The pad covers the pointer-lean uv shift, so testing the\n // pre-deform uv is safe.\n if (dot(uv, uv) > uMaxReach * uMaxReach) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Pointer deformation — honor the SIGN of uPointerAttraction (W10): a positive\n // attraction leans the body IN toward the cursor, a negative shies it AWAY. The\n // signed influence flows straight into the UV shift (no hardcoded repulsion).\n //\n // AY.W-BLOB-CONFIG D2 — the SIGN was INVERTED in the rendered result. The\n // sample-shift sign here was uv -= dir*influence; the live readback (an attraction\n // sweep over a HELD pointer) measured the body shifting MORE toward the cursor as\n // attraction went MORE NEGATIVE (a=-1 -> +0.081, a=0 -> +0.063, a=+1 -> +0.042) —\n // exactly inverted: a shy-away -1 LUNGED at the cursor, a lean-in +1 pulled back.\n // pointerDir = uPointer - uv is the toward-pointer direction in SAMPLE space; to\n // MOVE the rendered body TOWARD the pointer the sample must shift ALONG pointerDir\n // (sample the field from where the pointer is), so the sign is uv += dir*influence.\n // A positive attraction now shifts the body toward the cursor (leans in), a negative\n // shifts it away (shies) — the sign the comment + the demo slider always promised,\n // now true in the render.\n //\n // AX.W46 D5 — the falloff radius NARROWS 0.65 → 0.5 (the calm-lean reconciliation).\n // The W15 REDRESS widened it to 0.65 to clear a synthetic floor; the live π-lane\n // read the result as a LUNGE. The drama lives in the STRENGTH (pointerStrength,\n // dropped to 0.18 in types.ts), NOT the falloff — the falloff's job is purely to keep\n // the lean COHERENT across the creature so the body, satellites and trail all tilt\n // toward the cursor as ONE. At 0.5 the body (sitting ≈0.2 uv from the cursor on a\n // hover-flick) is still well inside the cutoff, so the whole creature tilts as one —\n // a gentle, coherent \"it notices you\" lean rather than the body lunging a body-width.\n if (uPointerActive > 0.5) {\n vec2 pointerDir = uPointer - uv;\n float pointerDist = length(pointerDir);\n float influence = smoothstep(0.5, 0.0, pointerDist) * uPointerAttraction * uPointerStrength;\n uv += normalize(pointerDir + 1e-6) * influence;\n }\n\n // The de-synced pulsing body radius — also reused below for the inner-glow scale.\n float bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Composite domain-warped membrane field WITH its analytic gradient (AX.W15).\n vec3 scene = sceneDistG(uv);\n float d = scene.x;\n vec2 fieldGrad = scene.yz;\n\n // Edit #1 — fwidth-based anti-aliased edge: derive the smoothstep half-width\n // from the SDF screen-space gradient so the edge stays ~1px regardless of zoom.\n float aa = max(fwidth(d), 1e-6);\n float alpha = 1.0 - smoothstep(-aa, aa, d);\n\n if (alpha < 0.001) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Edit #4 — perceptually-uniform OKLCh variation. Gamma base → linear → OKLab\n // → OKLCh; perturb L/C/h; OKLCh → OKLab → linear; hue-preserving gamut clamp.\n // The base is the multi-stop palette sample (W11.b) — distributed across the\n // body/satellites by the color noise field — or uBaseColor when single-stop.\n float colorNoise = fbm(uv * uColorNoiseFreq + uTime * uColorNoiseSpeed, 3);\n vec3 oklch = samplePaletteOklch(colorNoise);\n // F9.R1 — per-satellite explicit shade (default no-op at uSatColorActive == 0).\n oklch = blendSatColor(oklch, uv);\n\n oklch.z += (colorNoise - 0.5) * uHueRange * (PI / 180.0); // hue swing, radians\n oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0); // chroma swing\n oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0); // lightness bias\n\n // ── BD.W-GOO-CAROUSEL-DECK — the blob to meatball SHADING MORPH (uMorphT). ──\n // The user #1 ask: the goo should MORPH BLOB and MEATBALL from one to another\n // — a CONTINUOUS in-between, not a hard variant cut. The KEY FACT: the body\n // GEOMETRY is IDENTICAL across blob/meatball (the smin SDF field, the satellites,\n // the fwidth-AA — all computed ABOVE, before this gate). ONLY the SURFACE shading\n // (flat fill vs lit/shadow/iridescence/SSS) differs. So the morph is a uMorphT\n // scalar LERPING the SHADING — NOT a geometry rebuild, NOT a path interpolation.\n //\n // uMorphT = 0 -> the flat warm-cream blob (the STAGE-1 floor, byte-identical to\n // the old uStage > 0.5 early-return);\n // uMorphT = 1 -> the lit meatball (the full STAGE-2 dressing, byte-identical to\n // the old else path);\n // 0 < uMorphT < 1 -> the CONTINUOUS in-between (the morph the user asked for).\n //\n // uMorphT resolves from variant for back-compat (blob -> 0, meatball -> 1); a\n // consumer ANIMATING config.morphT 0..1 gets the live morph. The smin field is\n // byte-UNTOUCHED (the geometry is shared — that is the whole point).\n //\n // The flat color is computed ALWAYS (cheap); the EXPENSIVE dressing (the soft-shadow\n // secondary march) is gated uMorphT > 0.0 so a pure blob pays ZERO shadow-march\n // cost (the SLOW-fix discipline — a flat blob is as cheap as the old early-return).\n float morphT = clamp(uMorphT, 0.0, 1.0);\n\n // STAGE-1 flat fill — the warm-cream blob color, off the PRE-dressing oklch (the\n // dressing mutates oklch below, so the flat read must snapshot it here).\n vec3 flatOkl = gamutClampOklch(oklch);\n vec3 flatLin = oklabToLinearSrgb(oklchToOklab(flatOkl));\n vec3 flatRgb = clamp(linearToSrgb(flatLin), 0.0, 1.0);\n\n // If we are fully flat (a pure blob, morphT == 0), emit the flat fill + dither and\n // return — the byte-identical STAGE-1 floor, zero dressing cost.\n if (morphT <= 0.0) {\n float ign1 = fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));\n flatRgb = clamp(flatRgb + (ign1 - 0.5) / 255.0, 0.0, 1.0);\n fragColor = vec4(flatRgb * alpha, alpha);\n return;\n }\n\n // Surface normal — from the ANALYTIC field gradient (AX.W15: the 4-tap is\n // deleted). Computed ONCE here and reused by the iridescence (W11.a), the\n // fake-SSS (W11.a), and the lit glass block (W9.b).\n vec3 N = surfaceNormalFromGrad(fieldGrad, d, bodyR);\n vec3 V = vec3(0.0, 0.0, 1.0);\n float thickness = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0); // 0 at rim, ~1 deep in\n float fres = pow(1.0 - max(dot(N, V), 0.0), 2.5); // rim-weighted angle\n\n // ── W11.a iridescence — warm-biased IQ cosine palette driving OKLCh HUE ──\n //\n // A thin-film-like sheen on the RIM (fres-weighted), NOT the cold-blue default:\n // an IQ cosine palette (a + b*cos(2pi(c*t + d))) maps the Fresnel/edge angle +\n // the FBM color field + an animated thickness onto a HUE OFFSET biased to the\n // warm arc (uIridHue), with the chroma clamped to a warm-pearl band so the rim\n // reads cream/gold (congruent with the warm-cream-glass identity). Mixed into\n // OKLCh BEFORE the gamut clamp. Default LOW.\n if (uIridescence > 0.0) {\n float t = fres + 0.3 * colorNoise + uTime * uIridSpeed;\n // Cosine palette in HUE space, centred on the warm uIridHue (~0.18 turn of\n // warm sweep so the sheen shimmers gold→peach, never swinging to cold blue).\n float iridHue = uIridHue + 0.18 * PI * cos(2.0 * PI * t);\n float w = fres * uIridescence; // rim-weighted blend\n oklch.z = mix(oklch.z, iridHue, w);\n // Warm-pearl chroma cap: lift chroma toward a pale-pearl band, clamped.\n oklch.y = min(oklch.y + 0.04 * w, oklch.y + 0.08);\n oklch.x = min(oklch.x + 0.05 * w, 1.0); // a touch brighter at the sheen\n }\n\n // ── W11.a fake subsurface translucency — thickness inner-glow + back-light ──\n //\n // A bright translucent CORE fading to a light-leaking EDGE (the -d ramp) plus\n // the fast-SSS back-light (light wrapping through the thin rim). Both lift OKLCh\n // L and warm the hue, consuming the W9 normal. In OKLCh before the gamut clamp.\n if (uCoreGlow > 0.0 || uSssScale > 0.0) {\n // Beer-Lambert inner luminosity (AX.W15): a SATURATING 1 - exp(-k·thickness)\n // curve — a flat thick core with a fast warm rim falloff — NOT the linear\n // coreGlow·thickness ramp (which over-brightens deep interiors). k ≈ 3 reads\n // as glass depth.\n oklch.x = min(oklch.x + uCoreGlow * (1.0 - exp(-3.0 * thickness)), 1.0);\n // Fast-SSS back-light: light wrapping through the thin (low-thickness) rim.\n vec3 L = normalize(uLightDir + vec3(1e-6));\n float back = pow(clamp(dot(V, -(L + N * thickness)), 0.0, 1.0), uSssPower);\n float sss = back * uSssScale * (1.0 - thickness);\n oklch.x = min(oklch.x + sss, 1.0);\n // Warm the THIN leaking rim only (scale by 1 - thickness): the SSS hue-warm\n // shift rides the rim, not the core (AX.W15 — only the thin rim warms).\n oklch.z += sss * 0.1 * (1.0 - thickness);\n }\n\n // ── BC.W-GOOBLOB-MEATBALL — the soft contact shadow (T2, the GLSL twin). A procedural\n // soft shadow FOLLOWING the irregular silhouette: march from this fragment's uv\n // toward the in-plane projection of uLightDir; where the metaball field occludes the\n // light, DARKEN the OKLCh L — a soft grounded contact band under the dome\n // (PROCEDURAL, silhouette-following, unlike the static CSS gel-dome drop-shadow).\n // Rim-weighted (1 - thickness) so the lit interior stays bright. Gated uShadow > 0.5;\n // variant=blob (STAGE 1) ships shadowless via the uStage early-return above. ──\n if (uShadow > 0.5) {\n vec2 L2 = normalize(uLightDir.xy + vec2(1e-6));\n float sh = softShadow2D(uv, L2, max(aa, 0.004), bodyR * 1.5, max(uShadowSoftness, 4.0));\n // The contact band sits on the LOWER rim (the side AWAY from the light), gated by\n // the away-facing rim weight + a thin-rim Gaussian band (peak thickness ≈ 0.18) so\n // the deep-lit interior + the light-facing edge stay BRIGHT (the warm-cream body\n // mean + the proof:blob-warm-default floor hold). The 0.20 cap is a soft grounding.\n float away = clamp(-dot(normalize(fieldGrad + vec2(1e-6)), L2), 0.0, 1.0);\n float band = exp(-pow((thickness - 0.18) / 0.16, 2.0));\n float shadowDarken = (1.0 - sh) * away * band * 0.20;\n oklch.x = max(oklch.x - shadowDarken, 0.0);\n }\n\n oklch = gamutClampOklch(oklch);\n\n vec3 lin = oklabToLinearSrgb(oklchToOklab(oklch));\n\n // ── W9.b lit glass surface — Blinn-Phong glint + Fresnel rim, in LINEAR ──\n //\n // The lit terms enter lin in LINEAR space BEFORE the OETF (linearToSrgb)\n // and BEFORE the * alpha premultiply — a post-OETF apply double-gammas the\n // highlight and fringes the premultiplied edge (the named A5/A2 trap). The\n // prior flat inner-glow lift is SUBSUMED by the Fresnel rim (the curvature\n // read now comes from the surface normal, not a flat smoothstep). Gated behind\n // uLit so the flat fill stays the default (zero regression).\n if (uLit > 0.5) {\n // N, V, thickness are already computed in main() (reused by iridescence/SSS).\n vec3 L = normalize(uLightDir + vec3(1e-6)); // light direction\n vec3 H = normalize(L + V); // Blinn-Phong half-vector\n\n // Warm-cream specular glint — a near-white OKLCh TINT (L~0.97, C~0.03,\n // hue~85°) routed through the SAME spliced OKLCh matrices, NOT hardcoded\n // sRGB white (pure white reads cheap-CG). Linearized for the linear add.\n vec3 warmCream = oklabToLinearSrgb(oklchToOklab(vec3(0.97, 0.03, radians(85.0))));\n\n // ENERGY-CONSERVING Blinn-Phong (AX.W15 [9]): the (shininess+2)/8 factor\n // DECOUPLES shininess from strength (without it, raising shininess dims the\n // glint, so the two knobs fight). SPECULAR ANTIALIASING: the FBM membrane\n // makes the normal vary fast, so a tight glint (16-64) STROBES on small\n // dock-grid blobs. Widen the effective lobe where the normal varies\n // (Toksvig-style fwidth clamp) — drop shininess, NOT raise it. nVar reads\n // the screen-space normal derivative; a high-variance pixel softens the\n // exponent so the glint stays stable.\n float nVar = length(fwidth(N));\n float shininess = uSpecShininess / (1.0 + 24.0 * nVar);\n float energyNorm = (shininess + 2.0) / 8.0;\n float spec = pow(max(dot(N, H), 0.0), shininess) * uSpecStrength * energyNorm;\n\n // Fresnel/Schlick rim — fed uRimColor (the --foreground warm rim via the\n // /color leaf). FOREGROUND-AWARE MIN-CONTRAST GUARD (AX.W15 [10]):\n // a var(--primary) blob in dark mode resolves a rim near the BODY color, so\n // the rim washes out (no contrast). When the rim's luminance sits too close\n // to the body's, the guard CHROMA-REDUCES and L-LIFTS the rim stop (a\n // perceptual move, NOT a re-tint) so the curved rim always reads. Computed in\n // OKLCh so the lift is perceptual.\n vec3 rimOkl = oklabToOklch(srgbToOklab(uRimColor));\n float bodyL = oklch.x; // the post-perturb body lightness\n float dL = abs(rimOkl.x - bodyL);\n // If the rim is within 0.22 L of the body, push it AWAY (lift if the body is\n // dark, the dark-mode primary case; the chroma-reduce keeps it neutral-warm).\n float lack = clamp((0.22 - dL) / 0.22, 0.0, 1.0);\n rimOkl.x = clamp(mix(rimOkl.x, (bodyL < 0.5 ? 0.92 : 0.18), lack), 0.0, 1.0);\n rimOkl.y *= mix(1.0, 0.5, lack); // chroma-reduce toward a pale pearl\n vec3 rimLin = oklabToLinearSrgb(oklchToOklab(rimOkl));\n\n float rimFres = pow(1.0 - max(dot(N, V), 0.0), uRimPower);\n float rim = rimFres * uRimStrength * (1.0 - 0.6 * thickness);\n\n // Combine the two warm highlights and add in LINEAR. max(spec, rim*scale)\n // keeps the glint from stacking on the rim into a blown hotspot.\n //\n // AX.W46 D4 — CLAMP the linear highlight below unity before the add (the\n // belt-and-braces guard the re-derived specStrength makes rarely-binding but\n // never lets a worst-case normal blow to a hard white spot). The energy-\n // conserving Blinn-Phong CAN still spike on a grazing normal where the Toksvig\n // widen has not kicked in; capping the highlight magnitude at 0.85 (a contained\n // warm gleam, sub-unity) means the OETF clamp below can never crush a\n // pure-white pixel over the dome. The cap is on the highlight ALONE (not the\n // composited lin), so the body color underneath is untouched — it caps only\n // the additive catch-light's energy.\n vec3 highlight = max(warmCream * spec, rimLin * rim);\n highlight = min(highlight, vec3(0.85));\n lin += highlight;\n }\n\n vec3 rgb = clamp(linearToSrgb(lin), 0.0, 1.0); // MANDATORY OETF — closes the seam\n\n // ── BD.W-GOO-CAROUSEL-DECK — the blob to meatball SHADING MORPH compose. ──\n // rgb is the fully-dressed meatball surface; flatRgb (snapshotted before the\n // dressing) is the flat blob fill. The morph is a CONTINUOUS lerp between them on\n // morphT — at morphT==1 it is byte-identical to the dressed meatball, and the\n // morphT==0 case already returned the flat fill above. The geometry (alpha/silhouette)\n // is shared, so only the SURFACE shading interpolates (the morph from one to\n // another). The dither below applies to the composited result.\n rgb = mix(flatRgb, rgb, morphT);\n\n // IGN dither (AX.W15 [2][9]) — the low-chroma warm-cream dome BANDS on 8-bit\n // panels (visible Mach steps in the smooth L roll). Interleaved-gradient noise at\n // 1/255, applied AFTER linearToSrgb and BEFORE the *alpha premultiply (aurora\n // ships the same splice). A triangular ±0.5 LSB dither decorrelates the steps.\n float ign = fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));\n rgb = clamp(rgb + (ign - 0.5) / 255.0, 0.0, 1.0);\n\n // Edit #8 — premultiply AFTER the OETF: straight-alpha gamma → premultiplied.\n fragColor = vec4(rgb * alpha, alpha);\n}";
520
- //#endregion
521
- //#region src/components/blob/composables/uploadBlobUniforms.ts
522
- function Ne(e, t, n, r, i, a, o, s, c) {
523
- let { U: l, satPosLocs: u, satRadLocs: d, satOpLocs: f, satColorLocs: p, satColorAmtLocs: m, trailPosLocs: h, trailRadLocs: g, paletteLocs: _ } = r, { params: v, rgb: y, simTimeMs: b, timeSec: x, resolveColor: S, rimColor: C, paletteStops: w } = c, { geometry: T, membrane: E, color: D, surface: O, interaction: k } = a;
524
- e.useProgram(t), e.bindVertexArray(n), e.uniform2f(l.uResolution, i.width, i.height), e.uniform1f(l.uTime, b / 1e3), e.uniform3f(l.uBaseColor, y[0], y[1], y[2]);
525
- let A = w, j = Math.min(A.length, 4);
526
- e.uniform1i(l.uStopCount, j);
527
- for (let t = 0; t < 4; t++) {
528
- let n = _[t] ?? null, r = A[t];
529
- if (r) {
530
- let t = S(r);
531
- e.uniform3f(n, t[0], t[1], t[2]);
532
- } else e.uniform3f(n, y[0], y[1], y[2]);
533
- }
534
- let M = c.satColors ?? [], N = +!!M.some((e) => !!e);
535
- e.uniform1i(l.uSatColorActive, N);
536
- for (let t = 0; t < 4; t++) {
537
- let n = p[t] ?? null, r = m[t] ?? null, i = M[t];
538
- if (i) {
539
- let t = S(i);
540
- e.uniform3f(n, t[0], t[1], t[2]), e.uniform1f(r, 1);
541
- } else e.uniform3f(n, y[0], y[1], y[2]), e.uniform1f(r, 0);
542
- }
543
- let P = o.pointer.value, F = k.pointerAttraction + v.pointerAttraction;
544
- e.uniform2f(l.uPointer, P.x * .5 * V, P.y * .5 * V), e.uniform1f(l.uPointerActive, +!!o.active.value), e.uniform1f(l.uPointerAttraction, F), e.uniform1f(l.uPointerStrength, k.pointerStrength * V);
545
- let I = Math.max(0, Math.min(1, F)), L = o.velocity.value;
546
- e.uniform2f(l.uVelocity, L.x * .5 * V, L.y * .5 * V), e.uniform1f(l.uStretch, k.stretch);
547
- let R = o.trailSources(T.satelliteRadius * .7 * I);
548
- e.uniform1i(l.uTrailCount, R.count);
549
- for (let t = 0; t < 15; t++) {
550
- let n = h[t] ?? null, r = g[t] ?? null, i = R.sources[t];
551
- i ? (e.uniform2f(n, i.x * .5 * V, i.y * .5 * V), e.uniform1f(r, i.radius * V)) : (e.uniform2f(n, 0, 0), e.uniform1f(r, 0));
552
- }
553
- e.uniform1f(l.uBodyRadius, T.bodyRadius * V), e.uniform1f(l.uPulsePhase, x * E.pulseFreq * v.pulseFreq * Math.PI * 2);
554
- let z = o.pulse.value * k.clickImpulse;
555
- e.uniform1f(l.uPulseAmp, (E.pulseAmp * v.pulseAmp / .015 + z) * V), e.uniform1f(l.uNoiseAmp, E.noiseAmp * v.noiseAmp / .025 * V), e.uniform1f(l.uNoiseFreq, E.noiseFreq), e.uniform1f(l.uNoiseSpeed, E.noiseSpeed), e.uniform1f(l.uWarpAmp, E.warpAmp);
556
- let B = T.orbitRadius * 1.2 * (1 + T.eccentricity), H = E.smoothK * v.smoothK, U = Math.max(0, B - T.satelliteRadius - T.bodyRadius), W = H > 0 ? Math.min(1.25, 1 + U / H) : 1;
557
- e.uniform1f(l.uSmoothK, H * W * V), e.uniform1f(l.uMerge, +(E.merge === "circular"));
558
- let G = typeof a.morphT == "number" ? Math.max(0, Math.min(1, a.morphT)) : a.variant === "blob" ? 0 : 1;
559
- e.uniform1f(l.uMorphT, G), e.uniform1f(l.uStage, +(G <= 0));
560
- let ee = (a.surface.fissionAmp ?? 0) > 0 ? ce * 1.12 : 0, te = Math.max(B, ee) + T.satelliteRadius, ne = (Math.max(T.bodyRadius, te) + H * W + E.noiseAmp * v.noiseAmp / .025 + Math.abs(o.pulse.value) * k.clickImpulse) * V + .1;
561
- e.uniform1f(l.uMaxReach, ne), e.uniform1f(l.uHueRange, D.hueRange + v.hueRange), e.uniform1f(l.uSatShift, D.satShift + v.satShift), e.uniform1f(l.uBrightnessShift, D.brightnessShift + v.brightnessShift), e.uniform1f(l.uColorNoiseFreq, D.colorNoiseFreq), e.uniform1f(l.uColorNoiseSpeed, D.colorNoiseSpeed);
562
- let re = G > 0;
563
- e.uniform1f(l.uLit, re && O.lit ? 1 : 0);
564
- let K = S(C);
565
- e.uniform3f(l.uRimColor, K[0], K[1], K[2]), e.uniform3f(l.uLightDir, O.lightDir[0], O.lightDir[1], O.lightDir[2]), e.uniform1f(l.uSpecStrength, O.specStrength), e.uniform1f(l.uSpecShininess, O.specShininess), e.uniform1f(l.uRimPower, O.rimPower), e.uniform1f(l.uRimStrength, O.rimStrength), e.uniform1f(l.uShadow, re && O.shadow ? 1 : 0), e.uniform1f(l.uShadowSoftness, O.shadowSoftness), e.uniform1f(l.uIridescence, O.iridescence * v.iridScale), e.uniform1f(l.uIridHue, O.iridHue * (Math.PI / 180)), e.uniform1f(l.uIridSpeed, O.iridSpeed), e.uniform1f(l.uSssScale, O.sssScale * v.iridScale), e.uniform1f(l.uSssPower, O.sssPower), e.uniform1f(l.uCoreGlow, O.coreGlow);
566
- let q = s.sources;
567
- e.uniform1i(l.uSatCount, q.length);
568
- for (let t = 0; t < 4; t++) {
569
- let n = u[t] ?? null, r = d[t] ?? null, i = f[t] ?? null, a = q[t];
570
- a ? (e.uniform2f(n, a.x * V, a.y * V), e.uniform1f(r, a.radius * V), e.uniform1f(i, a.opacity)) : (e.uniform2f(n, 0, 0), e.uniform1f(r, 0), e.uniform1f(i, 0));
571
- }
572
- e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.drawArrays(e.TRIANGLES, 0, 6), e.bindVertexArray(null);
573
- }
574
- //#endregion
575
- //#region src/components/blob/composables/buildMetaballProgram.ts
576
- var Pe = "[GooBlob]";
577
- function Fe(e) {
578
- let t = S(e, e.VERTEX_SHADER, we, Pe), n = S(e, e.FRAGMENT_SHADER, Me, Pe), r = x(e, t, n, Pe);
520
+ ` + Oe + "\n\n// De-synced breath. The body throb was a single sin(uPulsePhase), a\n// mechanical pulse that re-syncs every cycle. Three DETUNED sines at IRRATIONAL\n// frequency ratios (1, 0.13/0.09 ≈ 1.444, 0.31) never re-phase, so the membrane\n// breathes like a living creature (an asymmetric slower-exhale calm band) rather\n// than a metronome. Normalized so the composite stays in ~[-1, 1].\nfloat breath(float phase) {\n return (sin(phase)\n + 0.5 * sin(phase * 1.4444 + 1.7)\n + 0.28 * sin(phase * 0.31 + 4.1)) / 1.78;\n}\n\n// The composite SDF field with its analytic gradient, returned as\n// vec3(dist, ∂d/∂x, ∂d/∂y). The domain-warped body membrane smin-merged with the\n// satellites + trail; the gradient propagates through sminG's mix(a.yz, b.yz, h)\n// so the surface normal reads the field gradient DIRECTLY (the 4-tap finite\n// difference is DELETED — its 4 full evals per lit pixel are gone).\n//\n// The ANISOTROPIC SQUASH (volume-preserving stretch) is a linear map\n// bodyUv = D·R·uv (R rotates world→(motion-axis, perp); D = diag(1/sa, sa)). The\n// body field's gradient is computed in bodyUv space, so it MUST be transformed back\n// to uv space by M^T = R^T·D (the inverse-transpose handling the SOTA-deepening [2]\n// warns the 4-tap did implicitly by sampling in screen space).\nvec3 sceneDistG(vec2 uv) {\n // De-synced pulsing body radius.\n float bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Velocity-driven, volume-preserving squash-and-stretch with saturated amplitude.\n // sa is the stretch along motion, exactly 1/sa perpendicular (area-preserving).\n // The basis (ax, perp) is captured so the gradient can be transformed back below.\n //\n // The form sa = 1 + speed*uStretch rode an UNBOUNDED critically-damped spring\n // velocity (O(5-8)/s on a fast flick) -> sa ~ 1.78-2.25x elongation, a violent\n // taffy-pull. A tanh saturation sa = 1 + tanh(speed*k)*uStretch caps the elongation\n // at 1 + uStretch (~1.5x at the default stretch 0.5) no matter how fast the flick —\n // the fastest flick reads as a lively bounce, never a rubber-band snap (the standard\n // volume-preserving squash-and-stretch restraint). k = 1.6 keeps the tanh in its\n // near-linear regime for a slow drag (the gentle squash still reads) and saturates\n // only the fast flick.\n vec2 bodyUv = uv;\n vec2 ax = vec2(1.0, 0.0);\n vec2 perp = vec2(0.0, 1.0);\n float sa = 1.0;\n float speed = length(uVelocity);\n bool squashed = uStretch > 0.0 && speed > 1e-4;\n if (squashed) {\n ax = uVelocity / speed;\n perp = vec2(-ax.y, ax.x);\n sa = 1.0 + tanh(speed * 1.6) * uStretch;\n bodyUv = vec2(dot(uv, ax) / sa, dot(uv, perp) * sa);\n }\n\n // Domain-warped FBM displacement WITH its analytic gradient (the warp-Jacobian\n // approximation per [2]). disp = (noiseVal - 0.5) · uNoiseAmp; its gradient in\n // bodyUv space is uNoiseAmp · uNoiseFreq · fbmGrad (the uNoiseFreq chain factor\n // from the bodyUv·uNoiseFreq argument).\n vec3 fbmv = fbmWarpedG(bodyUv * uNoiseFreq + uTime * uNoiseSpeed, 3, uWarpAmp);\n float bodyDisplacement = (fbmv.x - 0.5) * uNoiseAmp;\n vec2 dispGradBody = uNoiseAmp * uNoiseFreq * fbmv.yz;\n\n // Body circle WITH gradient (in bodyUv space). The displaced radius subtracts\n // the displacement, so the body gradient is circleGrad - dispGrad (sign per\n // [2]: d = circleDist - displacement ⇒ grad = circleGrad - dispGrad).\n vec3 bodyG = sdgCircle(bodyUv, vec2(0.0), bodyR + bodyDisplacement);\n vec2 bodyGradBody = bodyG.yz - dispGradBody;\n\n // Transform the body gradient back to uv space: g_uv = R^T · D · g_body, i.e.\n // scale by D = diag(1/sa, sa) in the (ax, perp) frame then reconstruct in world.\n vec2 bodyGradUv;\n if (squashed) {\n vec2 scaled = vec2(bodyGradBody.x / sa, bodyGradBody.y * sa);\n bodyGradUv = scaled.x * ax + scaled.y * perp;\n } else {\n bodyGradUv = bodyGradBody;\n }\n vec3 d = vec3(bodyG.x, bodyGradUv);\n\n // Satellites — smin-merged into the body (uMerge selects quadratic/circular).\n for (int i = 0; i < MAX_SATS; i++) {\n if (i >= uSatCount) break;\n vec3 satG = sdgCircle(uv, uSatPos[i], uSatRadius[i]);\n satG.x += (1.0 - uSatOpacity[i]) * 0.3;\n d = sminG(d, satG, uSmoothK);\n }\n\n // Pointer trail — a decaying-radius pseudopod reaching toward the cursor,\n // smin-merged so it stretches an elastic limb and snaps back.\n for (int i = 0; i < TRAIL_N; i++) {\n if (i >= uTrailCount) break;\n vec3 trailG = sdgCircle(uv, uTrailPos[i], uTrailRadius[i]);\n d = sminG(d, trailG, uSmoothK);\n }\n return d;\n}\n\n// The analytic surface normal. The field gradient grad2d arrives\n// DIRECTLY from sceneDistG (no 4-tap). The smin field is sub-unit (the CD family\n// |grad| ≤ 1) so the gradient is NOT unit-length — normalize() before the dome\n// lift (the unit contract is on the FINAL lifted normal N, not the raw field\n// gradient). The Z dome: 'interior' is the normalized depth inward from the rim\n// (-d/bodyR); z = sqrt(1 - (1 - interior)^2) is the unit half-sphere profile (flat\n// centre, steep rim). N tilts outward along the field gradient near the rim and\n// points at the viewer deep inside.\nvec3 surfaceNormalFromGrad(vec2 grad2d, float d, float bodyR) {\n vec2 g = normalize(grad2d + vec2(1e-6));\n float interior = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);\n float z = sqrt(max(0.0, 1.0 - (1.0 - interior) * (1.0 - interior)));\n return normalize(vec3(g * (1.0 - z), z) + vec3(0.0, 0.0, 1e-6));\n}\n\n// The 2D SDF soft-shadow march (IQ rmshadows improved penumbra,\n// research/viz/goo-blob.md §2.3, §5). The GLSL twin of the WGSL softShadow2D — a procedural\n// soft contact shadow FOLLOWING the irregular metaball silhouette (NOT a hard disc/box\n// shadow). Marches from ro along rd (the in-plane projection of uLightDir),\n// accumulating the closest miss via the Aaltonen penumbra (y = h*h/(2*ph) + d =\n// sqrt(h*h - y*y)) that kills the banding the naive res = min(res, h/(w*t)) shows. CHEAP:\n// 24 steps, re-uses the SAME sceneDistG().x field (NO separate field re-eval, NO FBO/\n// multi-pass — the procedural field needs none). w is the penumbra hardness (inverse\n// light-source size -> uShadowSoftness). Derivative-FREE. Returns 1.0 (lit) -> 0.0 (occluded).\nfloat softShadow2D(vec2 ro, vec2 rd, float mint, float maxt, float w) {\n float res = 1.0;\n float ph = 1e20;\n float t = mint;\n for (int i = 0; i < 24; i++) {\n if (t >= maxt) break;\n float h = sceneDistG(ro + rd * t).x;\n if (h < 0.001) return 0.0;\n float y = h * h / (2.0 * ph);\n float dd = sqrt(max(h * h - y * y, 0.0));\n res = min(res, dd / (w * max(0.001, t - y)));\n ph = h;\n t += h;\n }\n return clamp(res, 0.0, 1.0);\n}\n\n// Sample the multi-stop palette at t in [0,1], interpolating adjacent\n// stops in OKLab with a MIDPOINT CHROMA-BUMP (a linear OKLab mix of a vivid pair\n// dips chroma through grey; the bump lifts it back). Falls back to uBaseColor when\n// uStopCount <= 1. Returns an OKLCh stop [L, C, h(rad)].\nvec3 samplePaletteOklch(float t) {\n if (uStopCount <= 1) return oklabToOklch(srgbToOklab(uBaseColor));\n float n = float(uStopCount);\n float ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n int i0 = int(floor(ft));\n int i1 = min(i0 + 1, uStopCount - 1);\n float f = ft - float(i0);\n // Fetch adjacent stops (uPalette is gamma sRGB) → OKLab.\n vec3 labA = srgbToOklab(uPalette[i0]);\n vec3 labB = srgbToOklab(uPalette[i1]);\n vec3 lab = mix(labA, labB, f);\n vec3 lch = oklabToOklch(lab);\n // Midpoint chroma-bump: a bell (peaks at f=0.5) lifts C off the grey midpoint.\n lch.y += 0.03 * sin(PI * f);\n return lch;\n}\n\n// The per-satellite explicit-shade blend widens the GL color contract for the hero blob.\n// It is off by default: uSatColorActive == 0 returns oklch\n// UNCHANGED (uniform control flow, zero cost). When ON, each\n// satellite carrying a positive uSatColorAmt tints the fragments in its smin-field\n// neighbourhood toward its explicit shade — mixed in OKLab (the samplePaletteOklch\n// convention; no hue wrap). The proximity weight rides the SAME opacity-inflated distance\n// the sceneDistG satellite term uses, so a fading satellite's tint fades with it. The\n// body keeps the derived palette base (no uBodyColor fork — the ask is per-SATELLITE).\nvec3 blendSatColor(vec3 oklch, vec2 uv) {\n if (uSatColorActive == 0) return oklch;\n vec3 lab = oklchToOklab(oklch);\n for (int i = 0; i < MAX_SATS; i++) {\n if (i >= uSatCount) break;\n float amt = clamp(uSatColorAmt[i], 0.0, 1.0);\n if (amt <= 0.0) continue;\n // Proximity: 1 well inside satellite i, fading to 0 across the smin band. The\n // opacity-inflated distance matches sceneDistG's satellite term.\n float di = sdCircle(uv, uSatPos[i], uSatRadius[i]) + (1.0 - uSatOpacity[i]) * 0.3;\n float w = (1.0 - smoothstep(-uSatRadius[i], uSmoothK, di)) * amt;\n lab = mix(lab, srgbToOklab(uSatColor[i]), clamp(w, 0.0, 1.0));\n }\n return oklabToOklch(lab);\n}\n\nvoid main() {\n vec2 uv = vUv - 0.5;\n\n // Pre-FBM bounding early-out. The oversized canvas (1.6x the\n // wrapper) runs the full fragment ALU — two 3-octave FBM evals + the OKLCh\n // round-trip + the lit/iridescence/SSS block — on a large transparent border\n // otherwise (~60% of the canvas is outside the droplet reach). Any fragment beyond\n // uMaxReach (the PADDED worst-case painted reach, uploaded so it never clips the\n // wet meniscus) writes transparent and returns BEFORE any of that work. This is a\n // transparent WRITE, NOT a GLSL discard: the pass is a pure premultiplied blend\n // with no depth, and discard disables the tiled-renderer fast path on mobile GPUs.\n // No fwidth is computed before the return, so there is no\n // derivative-in-non-uniform-control-flow hazard (the kept pixels compute their own\n // fwidth normally below). The pad covers the pointer-lean uv shift, so testing the\n // pre-deform uv is safe.\n if (dot(uv, uv) > uMaxReach * uMaxReach) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Pointer deformation — honor the SIGN of uPointerAttraction: a positive\n // attraction leans the body IN toward the cursor, a negative shies it AWAY. The\n // signed influence flows straight into the UV shift (no hardcoded repulsion).\n //\n // The sign was inverted in the rendered result. The\n // sample-shift sign here was uv -= dir*influence; the live readback (an attraction\n // sweep over a HELD pointer) measured the body shifting MORE toward the cursor as\n // attraction went MORE NEGATIVE (a=-1 -> +0.081, a=0 -> +0.063, a=+1 -> +0.042) —\n // exactly inverted: a shy-away -1 LUNGED at the cursor, a lean-in +1 pulled back.\n // pointerDir = uPointer - uv is the toward-pointer direction in SAMPLE space; to\n // MOVE the rendered body TOWARD the pointer the sample must shift ALONG pointerDir\n // (sample the field from where the pointer is), so the sign is uv += dir*influence.\n // A positive attraction now shifts the body toward the cursor (leans in), a negative\n // shifts it away (shies) — the sign the comment + the demo slider always promised,\n // now true in the render.\n //\n // The falloff radius narrows from 0.65 to 0.5 for a calmer lean.\n // The REDRESS widened it to 0.65 to clear a synthetic floor; the live π-lane\n // read the result as a LUNGE. The drama lives in the STRENGTH (pointerStrength,\n // dropped to 0.18 in types.ts), NOT the falloff — the falloff's job is purely to keep\n // the lean COHERENT across the creature so the body, satellites and trail all tilt\n // toward the cursor as ONE. At 0.5 the body (sitting ≈0.2 uv from the cursor on a\n // hover-flick) is still well inside the cutoff, so the whole creature tilts as one —\n // a gentle, coherent \"it notices you\" lean rather than the body lunging a body-width.\n if (uPointerActive > 0.5) {\n vec2 pointerDir = uPointer - uv;\n float pointerDist = length(pointerDir);\n float influence = smoothstep(0.5, 0.0, pointerDist) * uPointerAttraction * uPointerStrength;\n uv += normalize(pointerDir + 1e-6) * influence;\n }\n\n // The de-synced pulsing body radius — also reused below for the inner-glow scale.\n float bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Composite domain-warped membrane field with its analytic gradient.\n vec3 scene = sceneDistG(uv);\n float d = scene.x;\n vec2 fieldGrad = scene.yz;\n\n // Edit #1 — fwidth-based anti-aliased edge: derive the smoothstep half-width\n // from the SDF screen-space gradient so the edge stays ~1px regardless of zoom.\n float aa = max(fwidth(d), 1e-6);\n float alpha = 1.0 - smoothstep(-aa, aa, d);\n\n if (alpha < 0.001) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Edit #4 — perceptually-uniform OKLCh variation. Gamma base → linear → OKLab\n // → OKLCh; perturb L/C/h; OKLCh → OKLab → linear; hue-preserving gamut clamp.\n // The base is the multi-stop palette sample — distributed across the\n // body/satellites by the color noise field — or uBaseColor when single-stop.\n float colorNoise = fbm(uv * uColorNoiseFreq + uTime * uColorNoiseSpeed, 3);\n vec3 oklch = samplePaletteOklch(colorNoise);\n // per-satellite explicit shade (default no-op at uSatColorActive == 0).\n oklch = blendSatColor(oklch, uv);\n\n oklch.z += (colorNoise - 0.5) * uHueRange * (PI / 180.0); // hue swing, radians\n oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0); // chroma swing\n oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0); // lightness bias\n\n // ── Blob-to-meatball shading morph (uMorphT) ────────────────────────────\n // The user #1 ask: the goo should MORPH BLOB and MEATBALL from one to another\n // with a continuous in-between, not a hard cut. The key fact: the body\n // GEOMETRY is IDENTICAL across blob/meatball (the smin SDF field, the satellites,\n // the fwidth-AA — all computed ABOVE, before this gate). ONLY the SURFACE shading\n // (flat fill vs lit/shadow/iridescence/SSS) differs. So the morph is a uMorphT\n // scalar LERPING the SHADING — NOT a geometry rebuild, NOT a path interpolation.\n //\n // uMorphT = 0 -> the flat warm-cream blob (the STAGE-1 floor);\n // uMorphT = 1 -> the lit meatball (the full STAGE-2 dressing);\n // 0 < uMorphT < 1 -> the CONTINUOUS in-between (the morph the user asked for).\n //\n // uMorphT is the single clamped config surface axis; a consumer ANIMATING\n // config.morphT 0..1 gets the live morph. The smin field is\n // byte-UNTOUCHED (the geometry is shared — that is the whole point).\n //\n // The flat color is computed ALWAYS (cheap); the EXPENSIVE dressing (the soft-shadow\n // secondary march) is gated uMorphT > 0.0 so a pure blob pays ZERO shadow-march\n // cost (the SLOW-fix discipline — a flat blob is as cheap as an early-return).\n float morphT = clamp(uMorphT, 0.0, 1.0);\n\n // STAGE-1 flat fill — the warm-cream blob color, off the PRE-dressing oklch (the\n // dressing mutates oklch below, so the flat read must snapshot it here).\n vec3 flatOkl = gamutClampOklch(oklch);\n vec3 flatLin = oklabToLinearSrgb(oklchToOklab(flatOkl));\n vec3 flatRgb = clamp(linearToSrgb(flatLin), 0.0, 1.0);\n\n // If we are fully flat (a pure blob, morphT == 0), emit the flat fill + dither and\n // return — the byte-identical STAGE-1 floor, zero dressing cost.\n if (morphT <= 0.0) {\n float ign1 = fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));\n flatRgb = clamp(flatRgb + (ign1 - 0.5) / 255.0, 0.0, 1.0);\n fragColor = vec4(flatRgb * alpha, alpha);\n return;\n }\n\n // Surface normal from the analytic field gradient; the 4-tap is\n // deleted. Computed once here and reused by the iridescence, the\n // fake-SSS, and the lit glass block.\n vec3 N = surfaceNormalFromGrad(fieldGrad, d, bodyR);\n vec3 V = vec3(0.0, 0.0, 1.0);\n float thickness = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0); // 0 at rim, ~1 deep in\n float fres = pow(1.0 - max(dot(N, V), 0.0), 2.5); // rim-weighted angle\n\n // ── iridescence — warm-biased IQ cosine palette driving OKLCh HUE ──\n //\n // A thin-film-like sheen on the RIM (fres-weighted), NOT the cold-blue default:\n // an IQ cosine palette (a + b*cos(2pi(c*t + d))) maps the Fresnel/edge angle +\n // the FBM color field + an animated thickness onto a HUE OFFSET biased to the\n // warm arc (uIridHue), with the chroma clamped to a warm-pearl band so the rim\n // reads cream/gold (congruent with the warm-cream-glass identity). Mixed into\n // OKLCh BEFORE the gamut clamp. Default LOW.\n if (uIridescence > 0.0) {\n float t = fres + 0.3 * colorNoise + uTime * uIridSpeed;\n // Cosine palette in HUE space, centred on the warm uIridHue (~0.18 turn of\n // warm sweep so the sheen shimmers gold→peach, never swinging to cold blue).\n float iridHue = uIridHue + 0.18 * PI * cos(2.0 * PI * t);\n float w = fres * uIridescence; // rim-weighted blend\n oklch.z = mix(oklch.z, iridHue, w);\n // Warm-pearl chroma cap: lift chroma toward a pale-pearl band, clamped.\n oklch.y = min(oklch.y + 0.04 * w, oklch.y + 0.08);\n oklch.x = min(oklch.x + 0.05 * w, 1.0); // a touch brighter at the sheen\n }\n\n // ── fake subsurface translucency — thickness inner-glow + back-light ──\n //\n // A bright translucent CORE fading to a light-leaking EDGE (the -d ramp) plus\n // the fast-SSS back-light (light wrapping through the thin rim). Both lift OKLCh\n // L and warm the hue, consuming the normal. In OKLCh before the gamut clamp.\n if (uCoreGlow > 0.0 || uSssScale > 0.0) {\n // Beer-Lambert inner luminosity uses a saturating 1 - exp(-k·thickness)\n // curve — a flat thick core with a fast warm rim falloff — NOT the linear\n // coreGlow·thickness ramp (which over-brightens deep interiors). k ≈ 3 reads\n // as glass depth.\n oklch.x = min(oklch.x + uCoreGlow * (1.0 - exp(-3.0 * thickness)), 1.0);\n // Fast-SSS back-light: light wrapping through the thin (low-thickness) rim.\n vec3 L = normalize(uLightDir + vec3(1e-6));\n float back = pow(clamp(dot(V, -(L + N * thickness)), 0.0, 1.0), uSssPower);\n float sss = back * uSssScale * (1.0 - thickness);\n oklch.x = min(oklch.x + sss, 1.0);\n // Warm the THIN leaking rim only (scale by 1 - thickness): the SSS hue-warm\n // shift rides the rim, not the core; only the thin rim warms.\n oklch.z += sss * 0.1 * (1.0 - thickness);\n }\n\n // ── Soft contact shadow (the GLSL twin) ─────────────────────────────────\n // A procedural\n // soft shadow FOLLOWING the irregular silhouette: march from this fragment's uv\n // toward the in-plane projection of uLightDir; where the metaball field occludes the\n // light, DARKEN the OKLCh L — a soft grounded contact band under the dome\n // (PROCEDURAL, silhouette-following, unlike the static CSS gel-dome drop-shadow).\n // Rim-weighted (1 - thickness) so the lit interior stays bright. Gated uShadow > 0.5;\n // morphT=0 ships shadowless via the uStage early-return above. ──\n if (uShadow > 0.5) {\n vec2 L2 = normalize(uLightDir.xy + vec2(1e-6));\n float sh = softShadow2D(uv, L2, max(aa, 0.004), bodyR * 1.5, max(uShadowSoftness, 4.0));\n // The contact band sits on the LOWER rim (the side AWAY from the light), gated by\n // the away-facing rim weight + a thin-rim Gaussian band (peak thickness ≈ 0.18) so\n // the deep-lit interior + the light-facing edge stay BRIGHT (the warm-cream body\n // mean and floor hold). The 0.20 cap is a soft grounding.\n float away = clamp(-dot(normalize(fieldGrad + vec2(1e-6)), L2), 0.0, 1.0);\n float band = exp(-pow((thickness - 0.18) / 0.16, 2.0));\n float shadowDarken = (1.0 - sh) * away * band * 0.20;\n oklch.x = max(oklch.x - shadowDarken, 0.0);\n }\n\n oklch = gamutClampOklch(oklch);\n\n vec3 lin = oklabToLinearSrgb(oklchToOklab(oklch));\n\n // ── lit glass surface — Blinn-Phong glint + Fresnel rim, in LINEAR ──\n //\n // The lit terms enter lin in LINEAR space BEFORE the OETF (linearToSrgb)\n // and BEFORE the * alpha premultiply — a post-OETF apply double-gammas the\n // highlight and fringes the premultiplied edge (the named A5/A2 trap). The\n // prior flat inner-glow lift is SUBSUMED by the Fresnel rim (the curvature\n // read now comes from the surface normal, not a flat smoothstep). Gated behind\n // uLit so the flat fill stays the default (zero regression).\n if (uLit > 0.5) {\n // N, V, thickness are already computed in main() (reused by iridescence/SSS).\n vec3 L = normalize(uLightDir + vec3(1e-6)); // light direction\n vec3 H = normalize(L + V); // Blinn-Phong half-vector\n\n // Warm-cream specular glint — a near-white OKLCh TINT (L~0.97, C~0.03,\n // hue~85°) routed through the SAME spliced OKLCh matrices, NOT hardcoded\n // sRGB white (pure white reads cheap-CG). Linearized for the linear add.\n vec3 warmCream = oklabToLinearSrgb(oklchToOklab(vec3(0.97, 0.03, radians(85.0))));\n\n // Energy-conserving Blinn-Phong: the (shininess+2)/8 factor\n // DECOUPLES shininess from strength (without it, raising shininess dims the\n // glint, so the two knobs fight). SPECULAR ANTIALIASING: the FBM membrane\n // makes the normal vary fast, so a tight glint (16-64) STROBES on small\n // dock-grid blobs. Widen the effective lobe where the normal varies\n // (Toksvig-style fwidth clamp) — drop shininess, NOT raise it. nVar reads\n // the screen-space normal derivative; a high-variance pixel softens the\n // exponent so the glint stays stable.\n float nVar = length(fwidth(N));\n float shininess = uSpecShininess / (1.0 + 24.0 * nVar);\n float energyNorm = (shininess + 2.0) / 8.0;\n float spec = pow(max(dot(N, H), 0.0), shininess) * uSpecStrength * energyNorm;\n\n // Fresnel/Schlick rim — fed uRimColor (the --foreground warm rim via the\n // /color leaf). Foreground-aware minimum-contrast guard:\n // a var(--primary) blob in dark mode resolves a rim near the BODY color, so\n // the rim washes out (no contrast). When the rim's luminance sits too close\n // to the body's, the guard CHROMA-REDUCES and L-LIFTS the rim stop (a\n // perceptual move, NOT a re-tint) so the curved rim always reads. Computed in\n // OKLCh so the lift is perceptual.\n vec3 rimOkl = oklabToOklch(srgbToOklab(uRimColor));\n float bodyL = oklch.x; // the post-perturb body lightness\n float dL = abs(rimOkl.x - bodyL);\n // If the rim is within 0.22 L of the body, push it AWAY (lift if the body is\n // dark, the dark-mode primary case; the chroma-reduce keeps it neutral-warm).\n float lack = clamp((0.22 - dL) / 0.22, 0.0, 1.0);\n rimOkl.x = clamp(mix(rimOkl.x, (bodyL < 0.5 ? 0.92 : 0.18), lack), 0.0, 1.0);\n rimOkl.y *= mix(1.0, 0.5, lack); // chroma-reduce toward a pale pearl\n vec3 rimLin = oklabToLinearSrgb(oklchToOklab(rimOkl));\n\n float rimFres = pow(1.0 - max(dot(N, V), 0.0), uRimPower);\n float rim = rimFres * uRimStrength * (1.0 - 0.6 * thickness);\n\n // Combine the two warm highlights and add in LINEAR. max(spec, rim*scale)\n // keeps the glint from stacking on the rim into a blown hotspot.\n //\n // Clamp the linear highlight below unity before the add (the\n // belt-and-braces guard the re-derived specStrength makes rarely-binding but\n // never lets a worst-case normal blow to a hard white spot). The energy-\n // conserving Blinn-Phong CAN still spike on a grazing normal where the Toksvig\n // widen has not kicked in; capping the highlight magnitude at 0.85 (a contained\n // warm gleam, sub-unity) means the OETF clamp below can never crush a\n // pure-white pixel over the dome. The cap is on the highlight ALONE (not the\n // composited lin), so the body color underneath is untouched — it caps only\n // the additive catch-light's energy.\n vec3 highlight = max(warmCream * spec, rimLin * rim);\n highlight = min(highlight, vec3(0.85));\n lin += highlight;\n }\n\n vec3 rgb = clamp(linearToSrgb(lin), 0.0, 1.0); // MANDATORY OETF — closes the seam\n\n // ── Compose the blob-to-meatball shading morph ─────────────────────────\n // rgb is the fully-dressed meatball surface; flatRgb (snapshotted before the\n // dressing) is the flat blob fill. The morph is a CONTINUOUS lerp between them on\n // morphT — at morphT==1 it is byte-identical to the dressed meatball, and the\n // morphT==0 case already returned the flat fill above. The geometry (alpha/silhouette)\n // is shared, so only the SURFACE shading interpolates (the morph from one to\n // another). The dither below applies to the composited result.\n rgb = mix(flatRgb, rgb, morphT);\n\n // IGN dither: the low-chroma warm-cream dome bands on 8-bit\n // panels (visible Mach steps in the smooth L roll). Interleaved-gradient noise at\n // 1/255, applied AFTER linearToSrgb and BEFORE the *alpha premultiply (aurora\n // ships the same splice). A triangular ±0.5 LSB dither decorrelates the steps.\n float ign = fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));\n rgb = clamp(rgb + (ign - 0.5) / 255.0, 0.0, 1.0);\n\n // Edit #8 — premultiply AFTER the OETF: straight-alpha gamma → premultiplied.\n fragColor = vec4(rgb * alpha, alpha);\n}", Me = "[GooBlob]";
521
+ function Ne(e) {
522
+ let t = x(e, e.VERTEX_SHADER, Se, Me), n = x(e, e.FRAGMENT_SHADER, je, Me), r = b(e, t, n, Me);
579
523
  e.useProgram(r);
580
524
  let i = e.createVertexArray();
581
525
  e.bindVertexArray(i);
@@ -624,6 +568,67 @@ function Fe(e) {
624
568
  };
625
569
  }
626
570
  //#endregion
571
+ //#region src/components/blob/composables/resolveBlobSurface.ts
572
+ function Pe(e) {
573
+ let t = Math.max(0, Math.min(1, e.morphT));
574
+ return {
575
+ morphT: t,
576
+ dressed: t > 0
577
+ };
578
+ }
579
+ //#endregion
580
+ //#region src/components/blob/composables/uploadBlobUniforms.ts
581
+ function Fe(e, t, n, r, i, a, o, s, c) {
582
+ let { U: l, satPosLocs: u, satRadLocs: d, satOpLocs: f, satColorLocs: p, satColorAmtLocs: m, trailPosLocs: h, trailRadLocs: g, paletteLocs: _ } = r, { params: v, rgb: y, simTimeMs: b, timeSec: x, resolveColor: S, rimColor: C, paletteStops: w } = c, { geometry: T, membrane: E, color: D, surface: O, interaction: k } = a;
583
+ e.useProgram(t), e.bindVertexArray(n), e.uniform2f(l.uResolution, i.width, i.height), e.uniform1f(l.uTime, b / 1e3), e.uniform3f(l.uBaseColor, y[0], y[1], y[2]);
584
+ let A = w, j = Math.min(A.length, 4);
585
+ e.uniform1i(l.uStopCount, j);
586
+ for (let t = 0; t < 4; t++) {
587
+ let n = _[t] ?? null, r = A[t];
588
+ if (r) {
589
+ let t = S(r);
590
+ e.uniform3f(n, t[0], t[1], t[2]);
591
+ } else e.uniform3f(n, y[0], y[1], y[2]);
592
+ }
593
+ let M = c.satColors ?? [], N = +!!M.some((e) => !!e);
594
+ e.uniform1i(l.uSatColorActive, N);
595
+ for (let t = 0; t < 4; t++) {
596
+ let n = p[t] ?? null, r = m[t] ?? null, i = M[t];
597
+ if (i) {
598
+ let t = S(i);
599
+ e.uniform3f(n, t[0], t[1], t[2]), e.uniform1f(r, 1);
600
+ } else e.uniform3f(n, y[0], y[1], y[2]), e.uniform1f(r, 0);
601
+ }
602
+ let P = o.pointer.value, F = k.pointerAttraction + v.pointerAttraction;
603
+ e.uniform2f(l.uPointer, P.x * .5 * B, P.y * .5 * B), e.uniform1f(l.uPointerActive, +!!o.active.value), e.uniform1f(l.uPointerAttraction, F), e.uniform1f(l.uPointerStrength, k.pointerStrength * B);
604
+ let I = Math.max(0, Math.min(1, F)), L = o.velocity.value;
605
+ e.uniform2f(l.uVelocity, L.x * .5 * B, L.y * .5 * B), e.uniform1f(l.uStretch, k.stretch);
606
+ let R = o.trailSources(T.satelliteRadius * .7 * I);
607
+ e.uniform1i(l.uTrailCount, R.count);
608
+ for (let t = 0; t < 15; t++) {
609
+ let n = h[t] ?? null, r = g[t] ?? null, i = R.sources[t];
610
+ i ? (e.uniform2f(n, i.x * .5 * B, i.y * .5 * B), e.uniform1f(r, i.radius * B)) : (e.uniform2f(n, 0, 0), e.uniform1f(r, 0));
611
+ }
612
+ e.uniform1f(l.uBodyRadius, T.bodyRadius * B), e.uniform1f(l.uPulsePhase, x * E.pulseFreq * v.pulseFreq * Math.PI * 2);
613
+ let z = o.pulse.value * k.clickImpulse;
614
+ e.uniform1f(l.uPulseAmp, (E.pulseAmp * v.pulseAmp / .015 + z) * B), e.uniform1f(l.uNoiseAmp, E.noiseAmp * v.noiseAmp / .025 * B), e.uniform1f(l.uNoiseFreq, E.noiseFreq), e.uniform1f(l.uNoiseSpeed, E.noiseSpeed), e.uniform1f(l.uWarpAmp, E.warpAmp);
615
+ let V = T.orbitRadius * 1.2 * (1 + T.eccentricity), H = E.smoothK * v.smoothK, U = Math.max(0, V - T.satelliteRadius - T.bodyRadius), W = H > 0 ? Math.min(1.25, 1 + U / H) : 1;
616
+ e.uniform1f(l.uSmoothK, H * W * B), e.uniform1f(l.uMerge, +(E.merge === "circular"));
617
+ let { morphT: ee, dressed: te } = Pe(a);
618
+ e.uniform1f(l.uMorphT, ee), e.uniform1f(l.uStage, +(ee <= 0));
619
+ let ne = (a.surface.fissionAmp ?? 0) > 0 ? ce * 1.12 : 0, re = Math.max(V, ne) + T.satelliteRadius, ie = (Math.max(T.bodyRadius, re) + H * W + E.noiseAmp * v.noiseAmp / .025 + Math.abs(o.pulse.value) * k.clickImpulse) * B + .1;
620
+ e.uniform1f(l.uMaxReach, ie), e.uniform1f(l.uHueRange, D.hueRange + v.hueRange), e.uniform1f(l.uSatShift, D.satShift + v.satShift), e.uniform1f(l.uBrightnessShift, D.brightnessShift + v.brightnessShift), e.uniform1f(l.uColorNoiseFreq, D.colorNoiseFreq), e.uniform1f(l.uColorNoiseSpeed, D.colorNoiseSpeed), e.uniform1f(l.uLit, te && O.lit ? 1 : 0);
621
+ let G = S(C);
622
+ e.uniform3f(l.uRimColor, G[0], G[1], G[2]), e.uniform3f(l.uLightDir, O.lightDir[0], O.lightDir[1], O.lightDir[2]), e.uniform1f(l.uSpecStrength, O.specStrength), e.uniform1f(l.uSpecShininess, O.specShininess), e.uniform1f(l.uRimPower, O.rimPower), e.uniform1f(l.uRimStrength, O.rimStrength), e.uniform1f(l.uShadow, te && O.shadow ? 1 : 0), e.uniform1f(l.uShadowSoftness, O.shadowSoftness), e.uniform1f(l.uIridescence, O.iridescence * v.iridScale), e.uniform1f(l.uIridHue, O.iridHue * (Math.PI / 180)), e.uniform1f(l.uIridSpeed, O.iridSpeed), e.uniform1f(l.uSssScale, O.sssScale * v.iridScale), e.uniform1f(l.uSssPower, O.sssPower), e.uniform1f(l.uCoreGlow, O.coreGlow);
623
+ let K = s.sources;
624
+ e.uniform1i(l.uSatCount, K.length);
625
+ for (let t = 0; t < 4; t++) {
626
+ let n = u[t] ?? null, r = d[t] ?? null, i = f[t] ?? null, a = K[t];
627
+ a ? (e.uniform2f(n, a.x * B, a.y * B), e.uniform1f(r, a.radius * B), e.uniform1f(i, a.opacity)) : (e.uniform2f(n, 0, 0), e.uniform1f(r, 0), e.uniform1f(i, 0));
628
+ }
629
+ e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.drawArrays(e.TRIANGLES, 0, 6), e.bindVertexArray(null);
630
+ }
631
+ //#endregion
627
632
  //#region src/components/blob/shaders/metaball.wgsl.ts
628
633
  var Ie = `
629
634
  const MAX_SATS: i32 = 4;
@@ -632,9 +637,9 @@ const MAX_BLOB_STOPS: i32 = 4;
632
637
  const PI: f32 = 3.141592653589793;
633
638
 
634
639
  // ── Uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
635
- // Scalars packed into vec4 lanes; per-satellite / per-trail / per-palette rows packed
640
+ // Scalars packed into vec4 lanes; per-satellite, per-trail, per-palette rows packed
636
641
  // into a vec4 so the array stride is the natural 16 bytes (no std140 stride trap — the
637
- // parity-blowout suspect the wave's §Triumvirate names).
642
+ // parity-blowout suspect).
638
643
  struct Uniforms {
639
644
  // s0: (uTime, uBodyRadius, uPulsePhase, uPulseAmp)
640
645
  s0: vec4<f32>,
@@ -651,10 +656,8 @@ struct Uniforms {
651
656
  // s6: (uBrightnessShift, uColorNoiseFreq, uColorNoiseSpeed, uStretch)
652
657
  s6: vec4<f32>,
653
658
  // s7: (uPointerActive, uPointerAttraction, uPointerStrength, uStage)
654
- // BC.W-GOOBLOB-PLAIN — uStage gates the STAGE-1 stripped floor: 1.0 = the plain
655
- // shadowless lightless fill-only floor (variant="blob"); 0.0 = the full lit
656
- // pipeline (variant="meatball" / STAGE 2). It rides the spare s7.w lane the typed-
657
- // struct SoT (uniformBridgeWGPU.ts) reserved.
659
+ // uStage gates the stripped floor: 1.0 = flat and shadowless; 0.0 = dressed. It
660
+ // is derived from the single morph scalar and rides the spare s7.w lane.
658
661
  s7: vec4<f32>,
659
662
  // ptr: (uPointer.x, uPointer.y, uVelocity.x, uVelocity.y)
660
663
  ptr: vec4<f32>,
@@ -665,9 +668,9 @@ struct Uniforms {
665
668
  // light: (uLightDir.xyz, _pad)
666
669
  light: vec4<f32>,
667
670
  // res: (uResolution.x, uResolution.y, uShadow, uShadowSoftness)
668
- // BC.W-GOOBLOB-MEATBALL — the soft-shadow march rides the spare res.z/res.w lanes the
671
+ // the soft-shadow march rides the spare res.z/res.w lanes the
669
672
  // typed-struct SoT (uniformBridgeWGPU.ts) reserved (the EXTEND, never a re-fork): res.z
670
- // = uShadow (1.0 = the variant=meatball shadow ON), res.w = uShadowSoftness (the
673
+ // = uShadow (1.0 = the dressed shadow ON), res.w = uShadowSoftness (the
671
674
  // penumbra hardness, inverse light-source size → 4-48).
672
675
  res: vec4<f32>,
673
676
  // ints: (uStopCount, uSatCount, uTrailCount, _pad)
@@ -679,11 +682,11 @@ struct Uniforms {
679
682
 
680
683
  @group(0) @binding(0) var<uniform> u: Uniforms;
681
684
 
682
- // Noise + FBM (BC.W-CARVE6 -> metaball-noise.wgsl) — spliced AFTER the FBM_ROT_WGSL chunk
685
+ // Noise + FBM from metaball-noise.wgsl, spliced after the FBM_ROT_WGSL chunk
683
686
  // below. NB: do NOT name the chunk with a template-interpolation form in a WGSL comment —
684
687
  // it injects the whole multi-line chunk into this // comment line and breaks the parse
685
- // (BD.W-VIZ-BROKEN-FIX D3c).
686
- ${v}
688
+ // at the first injected newline.
689
+ ${_}
687
690
 
688
691
  const FBM_LACUNARITY: f32 = 1.8;
689
692
  const FBM_GAIN: f32 = 0.42;
@@ -805,14 +808,14 @@ fn sminG(a: vec3<f32>, b: vec3<f32>, k: f32) -> vec3<f32> {
805
808
  return sminQuadraticG(a, b, k);
806
809
  }
807
810
 
808
- ${g}
809
- ${_}
811
+ ${p}
812
+ ${h}
810
813
 
811
- // OKLCh gamut clamp + palette sample + breath (BC.W-CARVE6 -> metaball-palette.wgsl)
812
- // — spliced AFTER the OKLCH_MATRICES_WGSL chunk above (its matrix source). NB: do NOT
814
+ // OKLCh gamut clamp, palette sample, and breath from metaball-palette.wgsl,
815
+ // spliced AFTER the OKLCH_MATRICES_WGSL chunk above (its matrix source). NB: do NOT
813
816
  // write the chunk's identifier with a template-interpolation form in a WGSL comment — it
814
817
  // would inject the whole multi-line matrices chunk INTO this // comment line and break the
815
- // parse at the first injected newline (BD.W-VIZ-BROKEN-FIX D3c — the live WGSL syntax error
818
+ // parse at the first injected newline, the live WGSL syntax error
816
819
  // that silently fell every metaball/goo-dot to the WebGL2 net, masking the WGSL primary).
817
820
 
818
821
  // ── OKLCh gamut clamp (hue-preserving inward chroma clamp — blob-local) ──
@@ -832,7 +835,7 @@ fn gamutClampOklch(lch: vec3<f32>) -> vec3<f32> {
832
835
  return vec3<f32>(lch.x, lo, lch.z);
833
836
  }
834
837
 
835
- // W11.b — sample the multi-stop palette at t, OKLab mix + midpoint chroma-bump. Returns
838
+ // Sample the multi-stop palette at t, OKLab mix + midpoint chroma-bump. Returns
836
839
  // an OKLCh stop [L, C, h(rad)]. Falls back to uBaseColor when uStopCount <= 1.
837
840
  fn samplePaletteOklch(t: f32) -> vec3<f32> {
838
841
  let uStopCount = u.ints.x;
@@ -850,13 +853,13 @@ fn samplePaletteOklch(t: f32) -> vec3<f32> {
850
853
  return lch;
851
854
  }
852
855
 
853
- // AX.W15 — de-synced breath (three DETUNED sines at irrational ratios).
856
+ // De-synced breath using three detuned sines at irrational ratios.
854
857
  fn breath(phase: f32) -> f32 {
855
858
  return (sin(phase) + 0.5 * sin(phase * 1.4444 + 1.7) + 0.28 * sin(phase * 0.31 + 4.1)) / 1.78;
856
859
  }
857
860
 
858
861
 
859
- // AX.W15 — the composite SDF field WITH its ANALYTIC GRADIENT vec3(dist, ∂/∂x, ∂/∂y).
862
+ // The composite SDF field with its analytic gradient: vec3(dist, ∂/∂x, ∂/∂y).
860
863
  fn sceneDistG(uv: vec2<f32>) -> vec3<f32> {
861
864
  let uBodyRadius = u.s0.y;
862
865
  let uPulsePhase = u.s0.z;
@@ -924,7 +927,7 @@ fn sceneDistG(uv: vec2<f32>) -> vec3<f32> {
924
927
  return d;
925
928
  }
926
929
 
927
- // AX.W15 — the analytic surface normal from the field gradient.
930
+ // The analytic surface normal from the field gradient.
928
931
  fn surfaceNormalFromGrad(grad2d: vec2<f32>, d: f32, bodyR: f32) -> vec3<f32> {
929
932
  let g = normalize(grad2d + vec2<f32>(1e-6));
930
933
  let interior = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);
@@ -932,9 +935,9 @@ fn surfaceNormalFromGrad(grad2d: vec2<f32>, d: f32, bodyR: f32) -> vec3<f32> {
932
935
  return normalize(vec3<f32>(g * (1.0 - z), z) + vec3<f32>(0.0, 0.0, 1e-6));
933
936
  }
934
937
 
935
- // ── BC.W-GOOBLOB-MEATBALL — the 2D SDF soft-shadow march (IQ rmshadows improved-penumbra,
936
- // research/viz/goo-blob.md §2.3). A procedural soft contact shadow that FOLLOWS the
937
- // irregular metaball silhouette (NOT a hard disc / box shadow). Marches a ray from ro
938
+ // ── 2D SDF soft-shadow march (IQ rmshadows improved penumbra) ───────────────
939
+ // Based on research/viz/goo-blob.md §2.3. A procedural soft contact shadow that follows the
940
+ // irregular metaball silhouette (NOT a hard disc, box shadow). Marches a ray from ro
938
941
  // along rd (the in-plane projection of uLightDir), accumulating the closest miss via
939
942
  // the Aaltonen penumbra (y = h*h/(2*ph) + d = sqrt(h*h - y*y)) that kills the
940
943
  // banding the naive res = min(res, h/(w*t)) shows. CHEAP: 24 steps, re-uses the SAME
@@ -989,9 +992,9 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
989
992
  let uPointerActive = u.s7.x;
990
993
  let uPointerAttraction = u.s7.y;
991
994
  let uPointerStrength = u.s7.z;
992
- // BC.W-GOOBLOB-PLAIN — the STAGE-1 gate (1.0 = the plain shadowless fill-only floor).
995
+ // The stage-1 gate (1.0 = the plain shadowless fill-only floor).
993
996
  let uStage = u.s7.w;
994
- // BD.W-GOO-CAROUSEL-DECK — the blob to meatball SHADING-MORPH scalar (the base.w pad
997
+ // The blob-to-meatball shading-morph scalar (the base.w pad
995
998
  // lane; the typed-struct SoT writes it). 0 = flat blob, 1 = lit meatball, in-between
996
999
  // lerps the surface shading (the smin geometry is shared).
997
1000
  let uMorphT = clamp(u.base.w, 0.0, 1.0);
@@ -1013,13 +1016,13 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1013
1016
  let uRimStrength = u.s3.w;
1014
1017
  let uLightDir = u.light.xyz;
1015
1018
  let uRimColor = u.rim.rgb;
1016
- // BC.W-GOOBLOB-MEATBALL — the soft-shadow gate + penumbra hardness (res.z/res.w lanes).
1019
+ // The soft-shadow gate + penumbra hardness (res.z/res.w lanes).
1017
1020
  let uShadow = u.res.z;
1018
1021
  let uShadowSoftness = u.res.w;
1019
1022
 
1020
1023
  var uv = in.uv - 0.5;
1021
1024
 
1022
- // PRE-FBM bounding test (BD.W-VIZ-BROKEN-FIX D3c — the uniformity fix). The GLSL fallback
1025
+ // Pre-FBM bounding test, expressed for uniform derivative flow. The GLSL fallback
1023
1026
  // EARLY-RETURNS transparent here (a perf skip of the FBM border); WGSL CANNOT — an early
1024
1027
  // return predicated on the per-fragment uv makes the fwidth(d)/fwidth(Nh) calls below
1025
1028
  // reachable only through non-uniform control flow, which the WGSL uniformity analyzer
@@ -1033,7 +1036,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1033
1036
  // ALU (no correctness hazard); the real GPU swallows it.
1034
1037
  let inBounds = dot(uv, uv) <= uMaxReach * uMaxReach;
1035
1038
 
1036
- // Pointer deformation — sign per AY.W-BLOB-CONFIG D2.
1039
+ // Pointer deformation preserves the signed attraction direction.
1037
1040
  if (uPointerActive > 0.5) {
1038
1041
  let pointerDir = uPointer - uv;
1039
1042
  let pointerDist = length(pointerDir);
@@ -1056,13 +1059,13 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1056
1059
  // (the GLSL early-out's transparent WRITE, expressed as an alpha gate, not a return).
1057
1060
  let alpha = (1.0 - smoothstep(-aa, aa, d)) * select(0.0, 1.0, inBounds);
1058
1061
 
1059
- // ── BC.W-GOOBLOB-MEATBALL — the WGSL uniformity STRUCTURAL fix (the meatball-armer).
1062
+ // ── WGSL uniformity structure ────────────────────────────────────────────
1060
1063
  // The Toksvig screen-space derivative (fwidth SITE #2) is hoisted HERE, into the SAME
1061
1064
  // uniform control flow fwidth(d) above already arms in (top-level fs_main, before the
1062
1065
  // per-fragment alpha < 0.001 early-return and the uLit/uShadow non-uniform branches).
1063
1066
  // WGSL uniformity analysis rejects a fwidth() reached only through a return predicated
1064
1067
  // on a per-fragment value (the alpha < 0.001 early-out) nested under further branches
1065
- // — exactly the BB residual that kept the normal-derivative inside the lit branch from
1068
+ // exactly the residual that kept the normal derivative inside the lit branch from
1066
1069
  // compiling, so the WGSL primary never armed and GooBlob fell to the WebGL2 net. Nh is
1067
1070
  // the uniform-flow surface normal computed for this derivative ONLY (byte-identical to
1068
1071
  // the lit block's own N = surfaceNormalFromGrad(...) below — the SAME inputs, so
@@ -1090,18 +1093,18 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1090
1093
  oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0);
1091
1094
  oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0);
1092
1095
 
1093
- // ── BC.W-GOOBLOB-PLAIN — the STAGE-1 stripped floor (variant=blob). ──
1096
+ // ── The stripped flat floor (morphT=0). ──
1094
1097
  // The minimal verifiable floor: SDF + smin (the meatball field, already in d/
1095
1098
  // alpha above) + fwidth-AA (the crisp alpha above) + warm-cream fill. NO surface
1096
1099
  // normal, NO Fresnel, NO lit glint, NO iridescence, NO fake-SSS, NO shadow —
1097
1100
  // deliberately FLAT. It returns BEFORE any of the STAGE-2 dressing is reached. The
1098
1101
  // STAGE-1 path simply never READS the hoisted Nh/nVar or the lit/shadow blocks; the
1099
- // normal-derivative is now in UNIFORM control flow above (BC.W-GOOBLOB-MEATBALL — the
1100
- // structural armer), so BOTH the STAGE-1 floor AND the STAGE-2 lit path arm on Metal
1101
- // (the BB residual that kept STAGE 2 falling to the WebGL2 net is CLOSED). The
1102
+ // normal derivative is now in uniform control flow above, so both the stage-1 floor
1103
+ // and the stage-2 lit path arm on Metal. The residual that kept stage 2 falling to
1104
+ // the WebGL2 path is closed. The
1102
1105
  // teaching contrast: this is the "it renders, it meatballs, it works on Safari"
1103
1106
  // floor STAGE 2 layers the lit/shadow onto via the SAME uniforms.
1104
- // BD.W-GOO-CAROUSEL-DECK — the flat blob fill is snapshotted from the PRE-dressing
1107
+ // The flat blob fill is snapshotted from the pre-dressing
1105
1108
  // oklch (the dressing mutates oklch below). At morphT <= 0 (a pure blob) emit the
1106
1109
  // flat fill + dither and return — the byte-identical STAGE-1 floor, zero dressing cost.
1107
1110
  let flatOkl = gamutClampOklch(oklch);
@@ -1122,7 +1125,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1122
1125
  let thickness = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);
1123
1126
  let fres = pow(1.0 - max(dot(N, V), 0.0), 2.5);
1124
1127
 
1125
- // ── W11.a iridescence — warm-biased IQ cosine palette driving OKLCh HUE ──
1128
+ // ── iridescence — warm-biased IQ cosine palette driving OKLCh HUE ──
1126
1129
  if (uIridescence > 0.0) {
1127
1130
  let t = fres + 0.3 * colorNoise + uTime * uIridSpeed;
1128
1131
  let iridHue = uIridHue + 0.18 * PI * cos(2.0 * PI * t);
@@ -1132,7 +1135,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1132
1135
  oklch.x = min(oklch.x + 0.05 * w, 1.0);
1133
1136
  }
1134
1137
 
1135
- // ── W11.a fake subsurface translucency — thickness inner-glow + back-light ──
1138
+ // ── fake subsurface translucency — thickness inner-glow + back-light ──
1136
1139
  if (uCoreGlow > 0.0 || uSssScale > 0.0) {
1137
1140
  oklch.x = min(oklch.x + uCoreGlow * (1.0 - exp(-3.0 * thickness)), 1.0);
1138
1141
  let L = normalize(uLightDir + vec3<f32>(1e-6));
@@ -1142,7 +1145,8 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1142
1145
  oklch.z = oklch.z + sss * 0.1 * (1.0 - thickness);
1143
1146
  }
1144
1147
 
1145
- // ── BC.W-GOOBLOB-MEATBALL — the soft contact shadow (T2). A procedural soft shadow that
1148
+ // ── Soft contact shadow ──────────────────────────────────────────────────
1149
+ // A procedural soft shadow that
1146
1150
  // FOLLOWS the irregular silhouette: march from this fragment's uv toward the in-plane
1147
1151
  // projection of uLightDir; where the metaball field occludes the light (the body
1148
1152
  // shadows itself opposite the light, a satellite shadows the body across the neck), the
@@ -1151,7 +1155,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1151
1155
  // drop-shadow. Concentrated on the AWAY-facing lower rim (an away-facing weight × a
1152
1156
  // thin-rim Gaussian band) so the deep-lit interior + the light-facing edge stay bright
1153
1157
  // and the grounded shadow reads at the lower silhouette edge — the warm-cream body mean
1154
- // holds. Gated uShadow > 0.5; variant=blob (STAGE 1) ships shadowless. ──
1158
+ // holds. Gated uShadow > 0.5; morphT=0 ships shadowless. ──
1155
1159
  if (uShadow > 0.5) {
1156
1160
  let L2 = normalize(uLightDir.xy + vec2<f32>(1e-6));
1157
1161
  // w increases with the inverse light-source size → uShadowSoftness (a harder penumbra at a
@@ -1162,8 +1166,8 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1162
1166
  // dot(fieldGrad, L2) < 0 (the rim facing away from L2) AND the thin-rim weight
1163
1167
  // (a Gaussian band peaking at thickness ≈ 0.18 so the deep-lit interior + the
1164
1168
  // light-facing edge stay BRIGHT — the warm-cream body mean holds). The 0.20 cap keeps
1165
- // it a soft GROUNDING whisper, never a gouge (the warm-cream identity + the
1166
- // proof:blob-warm-default floor hold).
1169
+ // it a soft grounding whisper, never a gouge (the warm-cream identity + the
1170
+ // floor hold).
1167
1171
  let away = clamp(-dot(normalize(fieldGrad + vec2<f32>(1e-6)), L2), 0.0, 1.0);
1168
1172
  let band = exp(-pow((thickness - 0.18) / 0.16, 2.0));
1169
1173
  let shadowDarken = (1.0 - sh) * away * band * 0.20;
@@ -1174,7 +1178,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1174
1178
 
1175
1179
  var lin = oklabToLinearSrgb(oklchToOklab(oklch));
1176
1180
 
1177
- // ── W9.b lit glass surface — Blinn-Phong glint + Fresnel rim, in LINEAR ──
1181
+ // ── lit glass surface — Blinn-Phong glint + Fresnel rim, in LINEAR ──
1178
1182
  if (uLit > 0.5) {
1179
1183
  let L = normalize(uLightDir + vec3<f32>(1e-6));
1180
1184
  let H = normalize(L + V);
@@ -1182,8 +1186,8 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1182
1186
  let warmCream = oklabToLinearSrgb(oklchToOklab(vec3<f32>(0.97, 0.03, radians(85.0))));
1183
1187
 
1184
1188
  // ── fwidth SITE #2 — Toksvig normal-variance specular clamp. nVar is the HOISTED
1185
- // length(fwidth(N)) (BC.W-GOOBLOB-MEATBALL — computed once at the top of fs_main
1186
- // in uniform control flow, so the WGSL primary ARMS on Metal). The math is
1189
+ // length(fwidth(N)), computed once at the top of fs_main
1190
+ // in uniform control flow so the WGSL primary arms on Metal. The math is
1187
1191
  // byte-identical to the GLSL fallback (length(fwidth(N))); only its evaluation
1188
1192
  // point moved out of this non-uniform if (uLit > 0.5) branch. ──
1189
1193
  let shininess = uSpecShininess / (1.0 + 24.0 * nVar);
@@ -1196,8 +1200,8 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1196
1200
  let lack = clamp((0.22 - dL) / 0.22, 0.0, 1.0);
1197
1201
  // target is a WGSL RESERVED word (W3C WGSL 16.2) so a "var target" declaration is an
1198
1202
  // invalid identifier: the shader module fails to compile and the WGSL primary never
1199
- // arms (the GooBlob reserved-keyword bug BC.W-WEBGPU-EVERYWHERE W7 catches). Renamed to
1200
- // a valid identifier; the math + the value are byte-identical.
1203
+ // arms, so it is named targetL, a valid identifier; the math + the value
1204
+ // are identical.
1201
1205
  var targetL = 0.18;
1202
1206
  if (bodyL < 0.5) { targetL = 0.92; }
1203
1207
  rimOkl.x = clamp(mix(rimOkl.x, targetL, lack), 0.0, 1.0);
@@ -1214,7 +1218,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
1214
1218
 
1215
1219
  var rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
1216
1220
 
1217
- // BD.W-GOO-CAROUSEL-DECK — the blob↔meatball SHADING-MORPH compose: lerp the flat blob
1221
+ // Compose the blob↔meatball shading morph: lerp the flat blob
1218
1222
  // fill -> the dressed meatball surface on uMorphT (the geometry/alpha is shared; only
1219
1223
  // the surface shading interpolates). morphT == 1 is byte-identical to the dressed
1220
1224
  // meatball; the morphT == 0 case already returned the flat fill above.
@@ -1256,13 +1260,13 @@ function Re() {
1256
1260
  };
1257
1261
  }
1258
1262
  function ze(e, t, n, r, i, a) {
1259
- let { f32: o, i32: s } = e, { params: c, rgb: l, simTimeMs: u, timeSec: d, resolveColor: f, rimColor: p, paletteStops: m } = a, { geometry: h, membrane: g, color: _, surface: v, interaction: y } = n, b = r.pointer.value, x = y.pointerAttraction + c.pointerAttraction, S = Math.max(0, Math.min(1, x)), C = r.velocity.value, w = r.pulse.value * y.clickImpulse, T = (g.pulseAmp * c.pulseAmp / .015 + w) * V, E = d * g.pulseFreq * c.pulseFreq * Math.PI * 2, D = g.noiseAmp * c.noiseAmp / .025 * V, O = h.orbitRadius * 1.2 * (1 + h.eccentricity), k = g.smoothK * c.smoothK, A = Math.max(0, O - h.satelliteRadius - h.bodyRadius), j = k > 0 ? Math.min(1.25, 1 + A / k) : 1, M = k * j * V, N = (n.surface.fissionAmp ?? 0) > 0 ? ce * 1.12 : 0, P = Math.max(O, N) + h.satelliteRadius, F = (Math.max(h.bodyRadius, P) + k * j + g.noiseAmp * c.noiseAmp / .025 + Math.abs(r.pulse.value) * y.clickImpulse) * V + .1;
1260
- o[$.s0 + 0] = u / 1e3, o[$.s0 + 1] = h.bodyRadius * V, o[$.s0 + 2] = E, o[$.s0 + 3] = T, o[$.s1 + 0] = D, o[$.s1 + 1] = g.noiseFreq, o[$.s1 + 2] = g.noiseSpeed, o[$.s1 + 3] = g.warpAmp;
1261
- let I = typeof n.morphT == "number" ? Math.max(0, Math.min(1, n.morphT)) : n.variant === "blob" ? 0 : 1, L = I > 0;
1262
- o[$.s2 + 0] = M, o[$.s2 + 1] = +(g.merge === "circular"), o[$.s2 + 2] = F, o[$.s2 + 3] = L && v.lit ? 1 : 0, o[$.s3 + 0] = v.specStrength, o[$.s3 + 1] = v.specShininess, o[$.s3 + 2] = v.rimPower, o[$.s3 + 3] = v.rimStrength, o[$.s4 + 0] = v.iridescence * c.iridScale, o[$.s4 + 1] = v.iridHue * (Math.PI / 180), o[$.s4 + 2] = v.iridSpeed, o[$.s4 + 3] = v.sssScale * c.iridScale, o[$.s5 + 0] = v.sssPower, o[$.s5 + 1] = v.coreGlow, o[$.s5 + 2] = _.hueRange + c.hueRange, o[$.s5 + 3] = _.satShift + c.satShift, o[$.s6 + 0] = _.brightnessShift + c.brightnessShift, o[$.s6 + 1] = _.colorNoiseFreq, o[$.s6 + 2] = _.colorNoiseSpeed, o[$.s6 + 3] = y.stretch, o[$.s7 + 0] = +!!r.active.value, o[$.s7 + 1] = x, o[$.s7 + 2] = y.pointerStrength * V, o[$.s7 + 3] = +(I <= 0), o[$.ptr + 0] = b.x * .5 * V, o[$.ptr + 1] = b.y * .5 * V, o[$.ptr + 2] = C.x * .5 * V, o[$.ptr + 3] = C.y * .5 * V, o[$.base + 0] = l[0], o[$.base + 1] = l[1], o[$.base + 2] = l[2], o[$.base + 3] = I;
1263
+ let { f32: o, i32: s } = e, { params: c, rgb: l, simTimeMs: u, timeSec: d, resolveColor: f, rimColor: p, paletteStops: m } = a, { geometry: h, membrane: g, color: _, surface: v, interaction: y } = n, b = r.pointer.value, x = y.pointerAttraction + c.pointerAttraction, S = Math.max(0, Math.min(1, x)), C = r.velocity.value, w = r.pulse.value * y.clickImpulse, T = (g.pulseAmp * c.pulseAmp / .015 + w) * B, E = d * g.pulseFreq * c.pulseFreq * Math.PI * 2, D = g.noiseAmp * c.noiseAmp / .025 * B, O = h.orbitRadius * 1.2 * (1 + h.eccentricity), k = g.smoothK * c.smoothK, A = Math.max(0, O - h.satelliteRadius - h.bodyRadius), j = k > 0 ? Math.min(1.25, 1 + A / k) : 1, M = k * j * B, N = (n.surface.fissionAmp ?? 0) > 0 ? ce * 1.12 : 0, P = Math.max(O, N) + h.satelliteRadius, F = (Math.max(h.bodyRadius, P) + k * j + g.noiseAmp * c.noiseAmp / .025 + Math.abs(r.pulse.value) * y.clickImpulse) * B + .1;
1264
+ o[$.s0 + 0] = u / 1e3, o[$.s0 + 1] = h.bodyRadius * B, o[$.s0 + 2] = E, o[$.s0 + 3] = T, o[$.s1 + 0] = D, o[$.s1 + 1] = g.noiseFreq, o[$.s1 + 2] = g.noiseSpeed, o[$.s1 + 3] = g.warpAmp;
1265
+ let { morphT: I, dressed: L } = Pe(n);
1266
+ o[$.s2 + 0] = M, o[$.s2 + 1] = +(g.merge === "circular"), o[$.s2 + 2] = F, o[$.s2 + 3] = L && v.lit ? 1 : 0, o[$.s3 + 0] = v.specStrength, o[$.s3 + 1] = v.specShininess, o[$.s3 + 2] = v.rimPower, o[$.s3 + 3] = v.rimStrength, o[$.s4 + 0] = v.iridescence * c.iridScale, o[$.s4 + 1] = v.iridHue * (Math.PI / 180), o[$.s4 + 2] = v.iridSpeed, o[$.s4 + 3] = v.sssScale * c.iridScale, o[$.s5 + 0] = v.sssPower, o[$.s5 + 1] = v.coreGlow, o[$.s5 + 2] = _.hueRange + c.hueRange, o[$.s5 + 3] = _.satShift + c.satShift, o[$.s6 + 0] = _.brightnessShift + c.brightnessShift, o[$.s6 + 1] = _.colorNoiseFreq, o[$.s6 + 2] = _.colorNoiseSpeed, o[$.s6 + 3] = y.stretch, o[$.s7 + 0] = +!!r.active.value, o[$.s7 + 1] = x, o[$.s7 + 2] = y.pointerStrength * B, o[$.s7 + 3] = +(I <= 0), o[$.ptr + 0] = b.x * .5 * B, o[$.ptr + 1] = b.y * .5 * B, o[$.ptr + 2] = C.x * .5 * B, o[$.ptr + 3] = C.y * .5 * B, o[$.base + 0] = l[0], o[$.base + 1] = l[1], o[$.base + 2] = l[2], o[$.base + 3] = I;
1263
1267
  let R = f(p);
1264
1268
  o[$.rim + 0] = R[0], o[$.rim + 1] = R[1], o[$.rim + 2] = R[2], o[$.rim + 3] = 0, o[$.light + 0] = v.lightDir[0], o[$.light + 1] = v.lightDir[1], o[$.light + 2] = v.lightDir[2], o[$.light + 3] = 0, o[$.res + 0] = t.width, o[$.res + 1] = t.height, o[$.res + 2] = L && v.shadow ? 1 : 0, o[$.res + 3] = v.shadowSoftness;
1265
- let z = m, B = Math.min(z.length, 4);
1269
+ let z = m, V = Math.min(z.length, 4);
1266
1270
  for (let e = 0; e < 4; e++) {
1267
1271
  let t = $.palette + e * 4, n = z[e];
1268
1272
  if (n) {
@@ -1274,47 +1278,47 @@ function ze(e, t, n, r, i, a) {
1274
1278
  let H = i.sources;
1275
1279
  for (let e = 0; e < 4; e++) {
1276
1280
  let t = $.satPos + e * 4, n = H[e];
1277
- n ? (o[t + 0] = n.x * V, o[t + 1] = n.y * V, o[t + 2] = n.radius * V, o[t + 3] = n.opacity) : (o[t + 0] = 0, o[t + 1] = 0, o[t + 2] = 0, o[t + 3] = 0);
1281
+ n ? (o[t + 0] = n.x * B, o[t + 1] = n.y * B, o[t + 2] = n.radius * B, o[t + 3] = n.opacity) : (o[t + 0] = 0, o[t + 1] = 0, o[t + 2] = 0, o[t + 3] = 0);
1278
1282
  }
1279
1283
  let U = r.trailSources(h.satelliteRadius * .7 * S);
1280
1284
  for (let e = 0; e < 15; e++) {
1281
1285
  let t = $.trailPos + e * 4, n = U.sources[e];
1282
- n ? (o[t + 0] = n.x * .5 * V, o[t + 1] = n.y * .5 * V, o[t + 2] = n.radius * V) : (o[t + 0] = 0, o[t + 1] = 0, o[t + 2] = 0), o[t + 3] = 0;
1286
+ n ? (o[t + 0] = n.x * .5 * B, o[t + 1] = n.y * .5 * B, o[t + 2] = n.radius * B) : (o[t + 0] = 0, o[t + 1] = 0, o[t + 2] = 0), o[t + 3] = 0;
1283
1287
  }
1284
- return s[$.ints + 0] = B, s[$.ints + 1] = H.length, s[$.ints + 2] = U.count, s[$.ints + 3] = 0, e;
1288
+ return s[$.ints + 0] = V, s[$.ints + 1] = H.length, s[$.ints + 2] = U.count, s[$.ints + 3] = 0, e;
1285
1289
  }
1286
1290
  //#endregion
1287
1291
  //#region src/components/blob/composables/wgpuSetup.ts
1288
- var Be = 64, Ve = 8, He = 2;
1289
- function Ue(e) {
1290
- let { canvas: t, config: n, pointer: r, satellites: i, resolveFrame: a, shouldContinue: o } = e;
1291
- return function(e, s, c) {
1292
- let l = e.createShaderModule({
1292
+ var Be = 2;
1293
+ function Ve(e) {
1294
+ let { canvas: t, config: n, pointer: r, satellites: i, resolveFrame: a, shouldContinue: o, onResize: s, onDraw: c } = e;
1295
+ return function(e, l, u) {
1296
+ let d = e.createShaderModule({
1293
1297
  label: "[GooBlob] metaball.wgsl",
1294
1298
  code: Ie
1295
- }), u = e.createBuffer({
1299
+ }), f = e.createBuffer({
1296
1300
  label: "[GooBlob] uniforms",
1297
1301
  size: Le,
1298
- usage: Be | Ve
1299
- }), d = e.createBindGroupLayout({
1302
+ usage: 72
1303
+ }), p = e.createBindGroupLayout({
1300
1304
  label: "[GooBlob] bind-group-0",
1301
1305
  entries: [{
1302
1306
  binding: 0,
1303
- visibility: He,
1307
+ visibility: Be,
1304
1308
  buffer: { type: "uniform" }
1305
1309
  }]
1306
- }), f = e.createRenderPipeline({
1310
+ }), m = e.createRenderPipeline({
1307
1311
  label: "[GooBlob] pipeline",
1308
- layout: e.createPipelineLayout({ bindGroupLayouts: [d] }),
1312
+ layout: e.createPipelineLayout({ bindGroupLayouts: [p] }),
1309
1313
  vertex: {
1310
- module: l,
1314
+ module: d,
1311
1315
  entryPoint: "vs_main"
1312
1316
  },
1313
1317
  fragment: {
1314
- module: l,
1318
+ module: d,
1315
1319
  entryPoint: "fs_main",
1316
1320
  targets: [{
1317
- format: c,
1321
+ format: u,
1318
1322
  blend: {
1319
1323
  color: {
1320
1324
  srcFactor: "one",
@@ -1330,21 +1334,22 @@ function Ue(e) {
1330
1334
  }]
1331
1335
  },
1332
1336
  primitive: { topology: "triangle-list" }
1333
- }), p = e.createBindGroup({
1337
+ }), h = e.createBindGroup({
1334
1338
  label: "[GooBlob] bind-group",
1335
- layout: d,
1339
+ layout: p,
1336
1340
  entries: [{
1337
1341
  binding: 0,
1338
- resource: { buffer: u }
1342
+ resource: { buffer: f }
1339
1343
  }]
1340
- }), m = Re();
1341
- function h(e) {}
1342
- function g(o) {
1343
- let c = a(o);
1344
- if (!c) return;
1345
- ze(m, t, n, r, i, c), e.queue.writeBuffer(u, 0, m.buffer);
1346
- let l = s.getCurrentTexture().createView(), d = e.createCommandEncoder({ label: "[GooBlob] frame" }), h = d.beginRenderPass({ colorAttachments: [{
1347
- view: l,
1344
+ }), g = Re();
1345
+ function _(e) {
1346
+ e && s(e);
1347
+ }
1348
+ function v(o) {
1349
+ let s = a(o);
1350
+ ze(g, t, n, r, i, s), e.queue.writeBuffer(f, 0, g.buffer);
1351
+ let u = l.getCurrentTexture().createView(), d = e.createCommandEncoder({ label: "[GooBlob] frame" }), p = d.beginRenderPass({ colorAttachments: [{
1352
+ view: u,
1348
1353
  clearValue: {
1349
1354
  r: 0,
1350
1355
  g: 0,
@@ -1354,84 +1359,125 @@ function Ue(e) {
1354
1359
  loadOp: "clear",
1355
1360
  storeOp: "store"
1356
1361
  }] });
1357
- h.setPipeline(f), h.setBindGroup(0, p), h.draw(3, 1, 0, 0), h.end(), e.queue.submit([d.finish()]);
1362
+ p.setPipeline(m), p.setBindGroup(0, h), p.draw(3, 1, 0, 0), p.end(), e.queue.submit([d.finish()]), c(s);
1358
1363
  }
1359
1364
  return {
1360
- frame: g,
1365
+ frame: v,
1361
1366
  shouldContinue: o,
1362
- resize: h,
1367
+ resize: _,
1363
1368
  teardown: () => {
1364
- u.destroy();
1369
+ f.destroy();
1365
1370
  }
1366
1371
  };
1367
1372
  };
1368
1373
  }
1369
1374
  //#endregion
1375
+ //#region src/components/blob/composables/blobSimulation.ts
1376
+ function He(e, t) {
1377
+ return e && t ? {
1378
+ timeSec: e.timeSec,
1379
+ simulationTimeMs: e.simTimeMs,
1380
+ buffer: {
1381
+ width: t.w,
1382
+ height: t.h,
1383
+ dpr: t.dpr
1384
+ },
1385
+ simulationOrigin: {
1386
+ x: .5,
1387
+ y: .5
1388
+ }
1389
+ } : null;
1390
+ }
1391
+ function Ue(e) {
1392
+ let t = n(), r = F(!1), i = I(null), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = !1, d = null, f = null, p = null;
1393
+ e.satellites.onPinch((t) => e.pointer.click(t));
1394
+ let m = (e) => {
1395
+ let t = a.get(e);
1396
+ if (t) return t;
1397
+ let n = u(l(e));
1398
+ return a.size > 256 && a.clear(), a.set(e, n), n;
1399
+ }, h = () => e.mood.isSettled() && e.pointer.isAtRest() && e.satellites.isQuiescent(), g = () => {
1400
+ let e = h();
1401
+ return r.value = e, e && (i.value = He(d, f)), e;
1402
+ }, _ = () => {
1403
+ p !== null && (clearTimeout(p), p = null);
1404
+ }, v = (t) => {
1405
+ if (_(), typeof setTimeout > "u") return;
1406
+ let n = Math.min(Math.max(t - s, 16), 3e4);
1407
+ p = setTimeout(() => {
1408
+ p = null, e.wake();
1409
+ }, n);
1410
+ };
1411
+ return {
1412
+ resolveFrame: (n) => {
1413
+ let r = o ? (n - o) * 1e3 : 16;
1414
+ o = n;
1415
+ let i = Math.max(0, Math.min(r, 50)), a = e.getReducedMotion(), l = a || c ? 0 : e.config.tempo, u = l * i;
1416
+ if (s += u, t.setActive(e.pointer.active.value), l > 0 && e.pointer.active.value) {
1417
+ let n = e.pointer.rawPointer();
1418
+ t.setPointer(n.x * .5 + .5, n.y * .5 + .5);
1419
+ }
1420
+ t.tick(l === 0 ? 0 : i);
1421
+ let d = t.acceleration.value, f = t.velocity.value, p = -(d.x * f.x + d.y * f.y);
1422
+ return p > 0 && l > 0 && e.pointer.click(Math.min(.5, p * 4 + t.burst.value * .2)), a || e.mood.update({
1423
+ pointerActive: e.pointer.active.value,
1424
+ clicked: e.pointer.consumeClick(),
1425
+ idleMs: e.pointer.idleMs()
1426
+ }), e.mood.tick(u), a ? e.pointer.rest() : e.pointer.tick(u), e.satellites.tick(s, e.mood.params.value), {
1427
+ params: e.mood.params.value,
1428
+ rgb: m(e.color.value),
1429
+ simTimeMs: s,
1430
+ timeSec: n,
1431
+ resolveColor: m,
1432
+ rimColor: e.rimColor.value,
1433
+ paletteStops: e.paletteStops.value,
1434
+ satColors: e.satelliteColors?.value
1435
+ };
1436
+ },
1437
+ shouldContinue: () => {
1438
+ let t = g();
1439
+ if (c) return !1;
1440
+ if (!t) return _(), !0;
1441
+ let n = e.satellites.nextEventMs(s), r = e.mood.nextAutoMoodMs(), i = Number.isFinite(r) ? s + r : Infinity;
1442
+ return v(Math.min(n, i)), !1;
1443
+ },
1444
+ recordBackingSize: (e) => {
1445
+ f = e;
1446
+ },
1447
+ recordDraw: (e) => {
1448
+ d = e, g();
1449
+ },
1450
+ pause: () => {
1451
+ c = !0, _();
1452
+ },
1453
+ resume: () => {
1454
+ c = !1;
1455
+ },
1456
+ dispose: _,
1457
+ settled: P(r),
1458
+ settledFrame: P(i)
1459
+ };
1460
+ }
1461
+ //#endregion
1370
1462
  //#region src/components/blob/composables/useMetaballRenderer.ts
1371
1463
  function We(e) {
1372
- let { canvasRef: t, color: i, rimColor: a, paletteStops: o, satelliteColors: s, mood: c, pointer: l, satellites: p, config: m } = e, g = 0, _ = 0, v = n();
1373
- p.onPinch((e) => l.click(e));
1374
- let y = /* @__PURE__ */ new Map();
1375
- function x(e) {
1376
- let t = y.get(e);
1377
- if (t) return t;
1378
- let n = d(u(e));
1379
- return y.size > 256 && y.clear(), y.set(e, n), n;
1380
- }
1381
- let S = null, C = L(b("webgpu")), w = !1, T = I(!1), E = null;
1382
- function D() {
1383
- E !== null && (clearTimeout(E), E = null);
1384
- }
1385
- function O(e) {
1386
- if (D(), typeof setTimeout > "u") return;
1387
- let t = Math.min(Math.max(e - _, 16), 3e4);
1388
- E = setTimeout(() => {
1389
- E = null, S?.wake();
1390
- }, t);
1391
- }
1392
- r(t, {
1393
- pause: () => S?.suspend("off-screen-io"),
1394
- resume: () => S?.resume("off-screen-io")
1395
- }, {
1396
- rootMargin: "200px",
1397
- pauseWhenHidden: !1
1398
- });
1399
- function k(e) {
1400
- let t = g ? (e - g) * 1e3 : 16;
1401
- g = e;
1402
- let n = Math.max(0, Math.min(t, 50)), r = S?.reducedMotion ?? !1, u = r || w ? 0 : m.tempo, d = u * n;
1403
- if (_ += d, v.setActive(l.active.value), u > 0 && l.active.value) {
1404
- let e = l.rawPointer();
1405
- v.setPointer(e.x * .5 + .5, e.y * .5 + .5);
1406
- }
1407
- v.tick(u === 0 ? 0 : n);
1408
- let f = v.acceleration.value, h = v.velocity.value, y = -(f.x * h.x + f.y * h.y);
1409
- return y > 0 && u > 0 && l.click(Math.min(.5, y * 4 + v.burst.value * .2)), r || c.update({
1410
- pointerActive: l.active.value,
1411
- clicked: l.consumeClick(),
1412
- idleMs: l.idleMs()
1413
- }), c.tick(d), r ? l.rest() : l.tick(d), p.tick(_, c.params.value), {
1414
- params: c.params.value,
1415
- rgb: x(i.value),
1416
- simTimeMs: _,
1417
- timeSec: e,
1418
- resolveColor: x,
1419
- rimColor: a.value,
1420
- paletteStops: o.value,
1421
- satColors: s?.value
1422
- };
1423
- }
1424
- function A() {
1425
- let e = c.isSettled() && l.isAtRest() && p.isQuiescent();
1426
- if (T.value = e, w) return !1;
1427
- if (!e) return D(), !0;
1428
- let t = p.nextEventMs(_), n = c.nextAutoMoodMs(), r = Number.isFinite(n) ? _ + n : Infinity;
1429
- return O(Math.min(t, r)), !1;
1430
- }
1431
- let j = () => h() * (m.quality === "half" ? .5 : 1);
1432
- function M(t) {
1433
- S = f(t, {
1434
- dprPolicy: j,
1464
+ let { canvasRef: t, color: n, rimColor: r, paletteStops: i, satelliteColors: a, mood: o, pointer: s, satellites: c, config: l } = e, u = null, d = I(y("webgpu")), p = Ue({
1465
+ color: n,
1466
+ rimColor: r,
1467
+ paletteStops: i,
1468
+ satelliteColors: a,
1469
+ mood: o,
1470
+ pointer: s,
1471
+ satellites: c,
1472
+ config: l,
1473
+ getReducedMotion: () => u?.reducedMotion ?? !1,
1474
+ wake: () => u?.wake()
1475
+ }), m = () => f() * (l.quality === "half" ? .5 : 1);
1476
+ function h(t) {
1477
+ u = v(t, {
1478
+ dprPolicy: m,
1479
+ composeIntersectionPark: !0,
1480
+ intersectionRootMargin: "200px",
1435
1481
  revealBloom: e.revealBloom ?? !0,
1436
1482
  contextAttrs: {
1437
1483
  alpha: !0,
@@ -1439,59 +1485,61 @@ function We(e) {
1439
1485
  antialias: !1,
1440
1486
  preserveDrawingBuffer: !1
1441
1487
  },
1442
- setupWGPU: Ue({
1488
+ setupWGPU: Ve({
1443
1489
  canvas: t,
1444
- config: m,
1445
- pointer: l,
1446
- satellites: p,
1447
- resolveFrame: k,
1448
- shouldContinue: A,
1449
- getReducedMotion: () => S?.reducedMotion ?? !1
1490
+ config: l,
1491
+ pointer: s,
1492
+ satellites: c,
1493
+ resolveFrame: p.resolveFrame,
1494
+ shouldContinue: p.shouldContinue,
1495
+ onResize: p.recordBackingSize,
1496
+ onDraw: p.recordDraw
1450
1497
  }),
1451
1498
  setupGL: (e) => {
1452
- let { prog: n, vs: r, fs: i, vao: a, buf: o, locs: s } = Fe(e);
1453
- function c(n) {
1454
- e.viewport(0, 0, n?.w ?? t.width, n?.h ?? t.height);
1499
+ let { prog: n, vs: r, fs: i, vao: a, buf: o, locs: u } = Ne(e);
1500
+ function d(n) {
1501
+ n && p.recordBackingSize(n), e.viewport(0, 0, n?.w ?? t.width, n?.h ?? t.height);
1455
1502
  }
1456
- function u(r) {
1457
- Ne(e, n, a, s, t, m, l, p, k(r));
1503
+ function f(r) {
1504
+ let i = p.resolveFrame(r);
1505
+ Fe(e, n, a, u, t, l, s, c, i), p.recordDraw(i);
1458
1506
  }
1459
1507
  return {
1460
- frame: u,
1461
- shouldContinue: A,
1462
- resize: c,
1508
+ frame: f,
1509
+ shouldContinue: p.shouldContinue,
1510
+ resize: d,
1463
1511
  teardown: () => {
1464
1512
  e.deleteProgram(n), e.deleteShader(r), e.deleteShader(i), e.deleteBuffer(o), e.deleteVertexArray(a);
1465
1513
  }
1466
1514
  };
1467
1515
  },
1468
- onStatus: (e) => C.value = e
1469
- }), S.armAsync().catch(() => void 0);
1516
+ onStatus: (e) => d.value = e
1517
+ }), u.armAsync().catch(() => void 0);
1470
1518
  }
1471
- return z(t, (e) => {
1472
- e && !S && M(e);
1473
- }, { immediate: !0 }), z(i, () => S?.wake()), z(a, () => S?.wake()), z(o, () => S?.wake(), { deep: !0 }), s && z(s, () => S?.wake(), { deep: !0 }), N(() => {
1474
- D(), S?.dispose(), S = null;
1519
+ return R(t, (e) => {
1520
+ e && !u && h(e);
1521
+ }, { immediate: !0 }), R(n, () => u?.wake()), R(r, () => u?.wake()), R(i, () => u?.wake(), { deep: !0 }), a && R(a, () => u?.wake(), { deep: !0 }), M(() => {
1522
+ p.dispose(), u?.dispose(), u = null;
1475
1523
  }), {
1476
1524
  pause: () => {
1477
- w = !0, S?.suspend("manual");
1525
+ p.pause(), u?.suspend("manual");
1478
1526
  },
1479
1527
  resume: () => {
1480
- w = !1, S?.resume("manual");
1528
+ p.resume(), u?.resume("manual");
1481
1529
  },
1482
- wake: () => S?.wake(),
1483
- settled: T,
1484
- rendererStatus: F(C)
1530
+ wake: () => u?.wake(),
1531
+ settled: p.settled,
1532
+ settledFrame: p.settledFrame,
1533
+ rendererStatus: P(d)
1485
1534
  };
1486
1535
  }
1487
1536
  //#endregion
1488
1537
  //#region src/components/blob/Blob.vue?vue&type=script&setup=true&lang.ts
1489
- var Ge = ["aria-label", "disabled"], Ke = 1.3, qe = /* @__PURE__ */ e(/* @__PURE__ */ k({
1538
+ var Ge = ["aria-label", "disabled"], Ke = 1.3, qe = /*#__PURE__*/ t(/* @__PURE__ */ O({
1490
1539
  __name: "Blob",
1491
1540
  props: {
1492
1541
  color: {},
1493
1542
  config: {},
1494
- variant: {},
1495
1543
  seed: { default: "" },
1496
1544
  paused: {
1497
1545
  type: Boolean,
@@ -1508,94 +1556,93 @@ var Ge = ["aria-label", "disabled"], Ke = 1.3, qe = /* @__PURE__ */ e(/* @__PURE
1508
1556
  "update:paused",
1509
1557
  "rendererStatus"
1510
1558
  ],
1511
- setup(e, { expose: n, emit: r }) {
1512
- let i = r, a = A(s, null), o = e.config ?? a;
1513
- if (!o) throw Error("[glass-ui] Blob: no blob config. Pass an explicit `config` prop (e.g. BLOB_CONFIG_DEFAULTS) or provide(BLOB_CONFIG_KEY, cfg) from an ancestor. There is no silent defaults synthesis.");
1514
- let c = () => e.config ?? a ?? o, l = new Proxy(o, { get(t, n, r) {
1515
- return n === "variant" && e.variant != null ? e.variant : Reflect.get(t, n, r);
1516
- } }), u = R("canvasRef"), d = R("wrapperRef"), f = R("hitLayerRef"), p = T(() => !!e.pressLabel?.trim()), m = T(() => p.value && !e.disabled && !e.paused), h = T(() => m.value ? f.value : null), g = Math.min(1, Math.max(.25, o.geometry.bodyRadius / V * Ke)), _ = `${(g * 50).toFixed(2)}%`, v = _e(), y = ve(h, { hitRadius: () => g }), b = Ce(o, e.color + e.seed), x = t(), S = I(e.color), C = I(o.surface.rimColor), w = I([...o.color.paletteStops]), k = I([...o.color.satelliteColors ?? []]);
1517
- function N() {
1518
- let t = d.value, n = c();
1519
- x.invalidate(), S.value = x.resolve(e.color, t), C.value = x.resolve(n.surface.rimColor, t), w.value = n.color.paletteStops.map((e) => x.resolve(e, t)), k.value = (n.color.satelliteColors ?? []).map((e) => x.resolve(e, t));
1559
+ setup(t, { expose: n, emit: r }) {
1560
+ let i = r, a = k(o, null), s = t.config ?? a;
1561
+ if (!s) throw Error("[glass-ui] Blob: no blob config. Pass an explicit `config` prop (e.g. BLOB_CONFIG_DEFAULTS) or provide(BLOB_CONFIG_KEY, cfg) from an ancestor. There is no silent defaults synthesis.");
1562
+ let c = () => t.config ?? a ?? s, l = L("canvasRef"), u = L("wrapperRef"), d = L("hitLayerRef"), f = w(() => !!t.pressLabel?.trim()), p = w(() => f.value && !t.disabled && !t.paused), m = w(() => p.value ? d.value : null), h = Math.min(1, Math.max(.25, s.geometry.bodyRadius / B * Ke)), g = `${(h * 50).toFixed(2)}%`, _ = _e(), v = ve(m, { hitRadius: () => h }), y = xe(s, t.color + t.seed), b = e(), x = F(t.color), S = F(s.surface.rimColor), C = F([...s.color.paletteStops]), O = F([...s.color.satelliteColors ?? []]);
1563
+ function M() {
1564
+ let e = u.value, n = c();
1565
+ b.invalidate(), x.value = b.resolve(t.color, e), S.value = b.resolve(n.surface.rimColor, e), C.value = n.color.paletteStops.map((t) => b.resolve(t, e)), O.value = (n.color.satelliteColors ?? []).map((t) => b.resolve(t, e));
1520
1566
  }
1521
- let F = We({
1522
- canvasRef: u,
1523
- color: S,
1524
- rimColor: C,
1525
- paletteStops: w,
1526
- satelliteColors: k,
1527
- mood: v,
1528
- pointer: y,
1529
- satellites: b,
1530
- config: l
1567
+ let P = We({
1568
+ canvasRef: l,
1569
+ color: x,
1570
+ rimColor: S,
1571
+ paletteStops: C,
1572
+ satelliteColors: O,
1573
+ mood: _,
1574
+ pointer: v,
1575
+ satellites: y,
1576
+ config: s
1531
1577
  });
1532
- F.rendererStatus && z(F.rendererStatus, (e) => i("rendererStatus", e), {
1578
+ P.rendererStatus && R(P.rendererStatus, (e) => i("rendererStatus", e), {
1533
1579
  immediate: !0,
1534
1580
  flush: "sync"
1535
- }), z(d, N, { immediate: !0 });
1536
- let L = null;
1537
- typeof document < "u" && (L = new MutationObserver(N), L.observe(document.documentElement, {
1581
+ }), R(u, M, { immediate: !0 });
1582
+ let I = null;
1583
+ typeof document < "u" && (I = new MutationObserver(M), I.observe(document.documentElement, {
1538
1584
  attributes: !0,
1539
1585
  attributeFilter: ["class"]
1540
- })), z(T(() => e.color), (t) => {
1541
- N(), b.reseed(t + e.seed);
1542
- }), z(() => {
1586
+ })), R(w(() => t.color), (e) => {
1587
+ M(), y.reseed(e + t.seed);
1588
+ }), R(() => {
1543
1589
  let e = c();
1544
1590
  return [
1545
1591
  e.color.paletteStops.join("|"),
1546
1592
  (e.color.satelliteColors ?? []).join("|"),
1547
1593
  e.surface.rimColor
1548
1594
  ];
1549
- }, () => N(), { deep: !0 }), z(() => y.active.value, (e) => {
1550
- e && F.wake();
1551
- }), z(() => e.paused, (e) => e ? F.pause() : F.resume(), { immediate: !0 }), M(() => {
1552
- L?.disconnect(), L = null;
1595
+ }, () => M(), { deep: !0 }), R(() => v.active.value, (e) => {
1596
+ e && P.wake();
1597
+ }), R(() => t.paused, (e) => e ? P.pause() : P.resume(), { immediate: !0 }), j(() => {
1598
+ I?.disconnect(), I = null;
1553
1599
  });
1554
- function B() {
1555
- b.nudge();
1600
+ function z() {
1601
+ y.nudge();
1556
1602
  }
1557
- function H(e) {
1558
- v.setMood(e, { source: "manual" });
1603
+ function V(e) {
1604
+ _.setMood(e, { source: "manual" });
1559
1605
  }
1560
- function U() {
1561
- y.click(o.interaction.clickImpulse);
1606
+ function H() {
1607
+ v.click(s.interaction.clickImpulse);
1562
1608
  }
1563
- function W() {
1564
- U(), i("click");
1609
+ function U() {
1610
+ H(), i("click");
1565
1611
  }
1566
1612
  return n({
1567
- nudge: B,
1568
- setMood: H,
1569
- pulse: U,
1570
- currentMood: v.currentMood,
1571
- pause: F.pause,
1572
- resume: F.resume,
1573
- settled: F.settled,
1574
- rendererStatus: F.rendererStatus
1575
- }), (t, n) => (P(), D("div", {
1613
+ nudge: z,
1614
+ setMood: V,
1615
+ pulse: H,
1616
+ currentMood: _.currentMood,
1617
+ pause: P.pause,
1618
+ resume: P.resume,
1619
+ settled: P.settled,
1620
+ settledFrame: P.settledFrame,
1621
+ rendererStatus: P.rendererStatus
1622
+ }), (e, n) => (N(), E("div", {
1576
1623
  ref_key: "wrapperRef",
1577
- ref: d,
1624
+ ref: u,
1578
1625
  class: "goo-blob-wrapper",
1579
- style: j({ "--blob-color": e.color })
1580
- }, [O("canvas", {
1626
+ style: A({ "--blob-color": t.color })
1627
+ }, [D("canvas", {
1581
1628
  ref_key: "canvasRef",
1582
- ref: u,
1629
+ ref: l,
1583
1630
  class: "goo-blob-canvas",
1584
1631
  "aria-hidden": "true",
1585
1632
  "data-testid": "goo-blob-canvas"
1586
- }, null, 512), p.value ? (P(), D("button", {
1633
+ }, null, 512), f.value ? (N(), E("button", {
1587
1634
  key: 0,
1588
1635
  ref_key: "hitLayerRef",
1589
- ref: f,
1636
+ ref: d,
1590
1637
  type: "button",
1591
1638
  class: "goo-blob-hit",
1592
- "aria-label": e.pressLabel,
1593
- disabled: e.disabled || e.paused,
1594
- style: j({ "--blob-hit-radius": _ }),
1639
+ "aria-label": t.pressLabel,
1640
+ disabled: t.disabled || t.paused,
1641
+ style: A({ "--blob-hit-radius": g }),
1595
1642
  "data-testid": "goo-blob-hit",
1596
- onClick: W
1597
- }, null, 12, Ge)) : E("", !0)], 4));
1643
+ onClick: U
1644
+ }, null, 12, Ge)) : T("", !0)], 4));
1598
1645
  }
1599
- }), [["__scopeId", "data-v-dc84a327"]]);
1646
+ }), [["__scopeId", "data-v-bf4ba5b9"]]);
1600
1647
  //#endregion
1601
- export { i as BLOB_CONFIG_DEFAULTS, s as BLOB_CONFIG_KEY, l as BLOB_HERO, qe as Blob, o as LIGHTNESS_FLOOR_BRACKET, c as LIGHTNESS_FLOOR_DEFAULT, a as clampLightnessFloor, _e as useBlobMood, ve as useBlobPointer, Ce as useBlobSatellites, We as useMetaballRenderer };
1648
+ export { r as BLOB_CONFIG_DEFAULTS, o as BLOB_CONFIG_KEY, c as BLOB_HERO, qe as Blob, a as LIGHTNESS_FLOOR_BRACKET, s as LIGHTNESS_FLOOR_DEFAULT, i as clampLightnessFloor, _e as useBlobMood, ve as useBlobPointer, xe as useBlobSatellites };