shaders 3.0.443 → 3.0.445

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 (468) hide show
  1. package/dist/cli.js +2 -2
  2. package/dist/core/{AngularBlur-CJsRS1Ri.js → AngularBlur-D33jrcZd.js} +2 -2
  3. package/dist/core/{Arc-CNesL3S9.js → Arc-BG8Bpknl.js} +2 -2
  4. package/dist/core/{Ascii-z7til0PQ.js → Ascii-DE0vAAOX.js} +2 -2
  5. package/dist/core/{Aurora-BAuYUYGc.js → Aurora-Cu4JGjCD.js} +3 -3
  6. package/dist/core/{BarShift-qVwbTMcq.js → BarShift-o_IvV0t_.js} +5 -5
  7. package/dist/core/{BarnDoors-DrOAeSqj.js → BarnDoors-JraHuTwe.js} +2 -2
  8. package/dist/core/{Beam-BW6yblZw.js → Beam-DshQatlM.js} +2 -2
  9. package/dist/core/{Bend-B7PMQ3T5.js → Bend-KJzYWEJV.js} +4 -4
  10. package/dist/core/{Blob-CRJ5N0hK.js → Blob-BJxkqvOO.js} +3 -3
  11. package/dist/core/{BlockDissolve-D-6Wy66g.js → BlockDissolve-CsIQWUpY.js} +2 -2
  12. package/dist/core/{BlockNoise-Ct9Fae_7.js → BlockNoise-DVI-0PnC.js} +3 -3
  13. package/dist/core/{BlueNoise-Cu7rJuP0.js → BlueNoise-CzBN6i38.js} +2 -2
  14. package/dist/core/{Blur-BrdVVSPq.js → Blur-W95k4Lxz.js} +1 -1
  15. package/dist/core/{Boids-DIzUaLGM.js → Boids-BJ6wxFC8.js} +2 -2
  16. package/dist/core/{BokehBlur-yYb03spN.js → BokehBlur-CbOO__cN.js} +2 -2
  17. package/dist/core/{BrickPattern-BL_MOS_A.js → BrickPattern-eQv5DrKE.js} +3 -3
  18. package/dist/core/{BrightnessContrast-CiKimIcA.js → BrightnessContrast-CmH2DvaZ.js} +1 -1
  19. package/dist/core/{BrushedMetal-dvYjizvg.js → BrushedMetal-D-7M7ZuM.js} +5 -5
  20. package/dist/core/{Bulge-CogpoPKe.js → Bulge-KmBnaVMx.js} +4 -4
  21. package/dist/core/{CRTScreen-X64EnHMB.js → CRTScreen-t7dyfO5u.js} +1 -1
  22. package/dist/core/{CarbonFiber-CTy3P-Qk.js → CarbonFiber-D4jap49E.js} +4 -4
  23. package/dist/core/{Chalkboard-CnHUOHtc.js → Chalkboard-H6-0OXC3.js} +2 -2
  24. package/dist/core/{ChannelBlur-MwnpNLSZ.js → ChannelBlur-BKJfnu91.js} +1 -1
  25. package/dist/core/{CheckerWipe-CCNc70ye.js → CheckerWipe-acIaflfK.js} +2 -2
  26. package/dist/core/{Checkerboard-C97ZiLyQ.js → Checkerboard-NwKMLVHe.js} +2 -2
  27. package/dist/core/{Chevron-ABT6D1wM.js → Chevron-eBbFV2ud.js} +3 -3
  28. package/dist/core/{ChromaFlow-7tJQEFm9.js → ChromaFlow-ex7l4tTK.js} +2 -2
  29. package/dist/core/{ChromaticAberration-D7-fxyEd.js → ChromaticAberration-Bbi9vNxS.js} +2 -2
  30. package/dist/core/{Circle-I0DIAypS.js → Circle-DdFWEti1.js} +2 -2
  31. package/dist/core/{ColorWheel-CEqzzrN-.js → ColorWheel-BqcyPqcj.js} +3 -3
  32. package/dist/core/{CompressionArtifacts-C24nRoC3.js → CompressionArtifacts-DqWq-4h8.js} +1 -1
  33. package/dist/core/{ConcentricSpin-CAu-PGNH.js → ConcentricSpin-CtI1hKio.js} +5 -5
  34. package/dist/core/{ConicGradient-n12K5TLj.js → ConicGradient-HmImN4LO.js} +3 -3
  35. package/dist/core/{ContourLines-FOStIWDr.js → ContourLines-BMom2vMu.js} +2 -2
  36. package/dist/core/{CornerPin-DsUVMFcX.js → CornerPin-D_-luriU.js} +3 -3
  37. package/dist/core/{Crescent-9i_5WPA-.js → Crescent-CY6MeN9V.js} +2 -2
  38. package/dist/core/{Cross-HiA69xGL.js → Cross-ClImej9a.js} +2 -2
  39. package/dist/core/{Crystal-BBjEm9m4.js → Crystal-CMrqHLFD.js} +4 -4
  40. package/dist/core/{CurlNoise-1jifziI0.js → CurlNoise-C_QZBT5m.js} +3 -3
  41. package/dist/core/{CursorRipples-D4agAYHK.js → CursorRipples-Bmlex_IF.js} +2 -2
  42. package/dist/core/{CursorTrail-C-FrY0e2.js → CursorTrail-B68x1Cv-.js} +3 -3
  43. package/dist/core/{DataMosh-DXcM1I4Y.js → DataMosh-FZQWg5Ui.js} +1 -1
  44. package/dist/core/{DiamondGradient-CQ5jeKEc.js → DiamondGradient-C0hD1lNN.js} +3 -3
  45. package/dist/core/{DiamondWipe-B1EXgweH.js → DiamondWipe-B8rFSwsV.js} +2 -2
  46. package/dist/core/{DiffuseBlur-CmD97dHb.js → DiffuseBlur--Gn4bDwC.js} +2 -2
  47. package/dist/core/{DisplacementMap-JV_CNJfU.js → DisplacementMap-DQk8S4sK.js} +4 -4
  48. package/dist/core/{Dither-NJDWpGb3.js → Dither-rB9M7FS7.js} +2 -2
  49. package/dist/core/{DotGrid-B2w7RFcv.js → DotGrid-DszAbmy5.js} +3 -3
  50. package/dist/core/{DropShadow-CLWp-bon.js → DropShadow-BS3S178o.js} +2 -2
  51. package/dist/core/{Duotone-Be2jx-jZ.js → Duotone-Cf_ybegD.js} +2 -2
  52. package/dist/core/{Ellipse-BR6qXidK.js → Ellipse-DY8FgSSx.js} +2 -2
  53. package/dist/core/{Emboss-C8ElxLo3.js → Emboss-RxgVyKyU.js} +4 -4
  54. package/dist/core/{Engraving-D67DM--1.js → Engraving-C0OuioUr.js} +2 -2
  55. package/dist/core/{ErosionNoise-FeEMQOkR.js → ErosionNoise-B-I3VFiY.js} +2 -2
  56. package/dist/core/{Exposure-CZ1gfqpf.js → Exposure-360tdOrT.js} +1 -1
  57. package/dist/core/{FallingLines-ifuQ01oA.js → FallingLines-4sVKJMDj.js} +3 -3
  58. package/dist/core/{FilmGrain-p5sawa_f.js → FilmGrain-CgzuRidb.js} +1 -1
  59. package/dist/core/{FilmStock-BD5wv1TV.js → FilmStock-BW9k3EPE.js} +1 -1
  60. package/dist/core/{Flip-MKiLH9jJ.js → Flip-DqdxtYHS.js} +2 -2
  61. package/dist/core/{FloatingParticles-Bn8CmtwG.js → FloatingParticles-BI8Y9Gcv.js} +2 -2
  62. package/dist/core/{FlowField-BdFeRmif.js → FlowField-CV0Is569.js} +5 -5
  63. package/dist/core/{Flower-BwDBwcSk.js → Flower-IaNzANoa.js} +2 -2
  64. package/dist/core/{FlowingGradient-RYOS36eB.js → FlowingGradient-CEAAa11t.js} +3 -3
  65. package/dist/core/{FlutedGlass-Ong8W4Ih.js → FlutedGlass-CF6mZMq4.js} +3 -3
  66. package/dist/core/{Fog-C-X8msRb.js → Fog-D9OYGwhY.js} +2 -2
  67. package/dist/core/{Form3D-BZ_vaLWe.js → Form3D-CJKutcFA.js} +3 -3
  68. package/dist/core/{FractalNoise-BPj8RPkE.js → FractalNoise-DelBWQyb.js} +3 -3
  69. package/dist/core/{Frost-DmxlFu63.js → Frost-Br7b9n4L.js} +5 -5
  70. package/dist/core/{GaborNoise-Boc8ieHd.js → GaborNoise-DViNgIse.js} +3 -3
  71. package/dist/core/{Glass-D5p21MIw.js → Glass-IwPea9h1.js} +4 -4
  72. package/dist/core/{GlassTiles-BP4CzdI3.js → GlassTiles-DpPHPKv7.js} +3 -5
  73. package/dist/core/{Glitch-cJguD7jS.js → Glitch-CKmX-agV.js} +1 -1
  74. package/dist/core/{Glow-BabfcnwS.js → Glow-CVcVetaa.js} +1 -1
  75. package/dist/core/{Godrays-BpiKSlNR.js → Godrays-CNNHJzNz.js} +3 -3
  76. package/dist/core/{Goo-BaQEtOyr.js → Goo-BUXnhwTk.js} +5 -5
  77. package/dist/core/{GradientMap-BtKtW-4M.js → GradientMap-DqGEXRl9.js} +2 -2
  78. package/dist/core/{Grayscale-Bgwugyvv.js → Grayscale-DiJAjdx3.js} +1 -1
  79. package/dist/core/{Grid-5cEDkyWX.js → Grid-utmP7uyR.js} +2 -2
  80. package/dist/core/{GridDistortion-Byf4G720.js → GridDistortion-Bn6D5dfC.js} +3 -3
  81. package/dist/core/{Group-DUEQSUir.js → Group-u-o7qE0Y.js} +1 -1
  82. package/dist/core/{HTMLInCanvas-uW1O3Z-R.js → HTMLInCanvas-sK9HN-gI.js} +1 -1
  83. package/dist/core/{Halftone-BiSLVvGF.js → Halftone-C5La06l6.js} +2 -2
  84. package/dist/core/{Heart-RAGeVEVH.js → Heart-CGLx1F8D.js} +2 -2
  85. package/dist/core/{Heatmap-Ds65scO7.js → Heatmap-CE5DLeJp.js} +5 -5
  86. package/dist/core/{HexGrid-H1N5Y1XD.js → HexGrid-CqB-yMWN.js} +2 -2
  87. package/dist/core/{Hologram-DpDfyeSz.js → Hologram-CctodmpA.js} +5 -5
  88. package/dist/core/{Holographic-Ckubuqn8.js → Holographic-DSz4qfkn.js} +5 -5
  89. package/dist/core/{HueShift-C_a5UVHy.js → HueShift-Cfq-ijQP.js} +1 -1
  90. package/dist/core/{ImageTexture-CM-dPJQ4.js → ImageTexture-DdzAYFTi.js} +1 -1
  91. package/dist/core/{InkFlow-CY7sCKpI.js → InkFlow-CCPfoQXs.js} +2 -2
  92. package/dist/core/{Invert-DhHrtwHQ.js → Invert-CtUHcYmv.js} +1 -1
  93. package/dist/core/{IrisWipe-BnOMUdEV.js → IrisWipe-DWVFMn81.js} +2 -2
  94. package/dist/core/{IsometricCubes-CXPz62PB.js → IsometricCubes-m-mYnbqN.js} +2 -2
  95. package/dist/core/{Kaleidoscope-CSgi0E5B.js → Kaleidoscope-DMNLVgx6.js} +4 -4
  96. package/dist/core/{KeyFrames-C3I4poq8.js → KeyFrames-jgrfR3Hj.js} +2 -2
  97. package/dist/core/{LensFlare-DxvbKXgt.js → LensFlare-CuWJsfwE.js} +3 -3
  98. package/dist/core/{LightEdge-niXz_FAk.js → LightEdge-WMxb-xKB.js} +5 -5
  99. package/dist/core/{LightLeak-B7Pt1tt4.js → LightLeak-DfOngFp7.js} +3 -3
  100. package/dist/core/{LinearBlur-CXNcduWQ.js → LinearBlur-iLXYGof_.js} +2 -2
  101. package/dist/core/{LinearGradient-CYiaWIXd.js → LinearGradient-DLrJban6.js} +3 -3
  102. package/dist/core/{LinearWipe-gwLhEveK.js → LinearWipe-C_fWBl4i.js} +2 -2
  103. package/dist/core/{LiquidMetal-D0sgLjcd.js → LiquidMetal-DHM8kVNr.js} +5 -5
  104. package/dist/core/{Liquify-h08a8S-C.js → Liquify-FQWL8j4t.js} +4 -4
  105. package/dist/core/{MagneticFilings-BlNWPVwS.js → MagneticFilings-BUzSkycD.js} +2 -2
  106. package/dist/core/{Marble-bps2lOWc.js → Marble-BnHffB3C.js} +3 -3
  107. package/dist/core/{Mirror-8miSUAyZ.js → Mirror-B_v4FunG.js} +3 -3
  108. package/dist/core/{MultiPointGradient-C-9_Q6CM.js → MultiPointGradient-5NGBm90u.js} +2 -2
  109. package/dist/core/{Neon-RDh1tAjH.js → Neon-BjBSg2FR.js} +4 -4
  110. package/dist/core/{NoiseDissolve-DjlWGdUc.js → NoiseDissolve-kDP6-h9F.js} +2 -2
  111. package/dist/core/{ObjectTracker-DW4aEBRv.js → ObjectTracker-vU1bVmIJ.js} +3 -3
  112. package/dist/core/{PagePeel-JsbScYi4.js → PagePeel-BgDvgtIV.js} +1 -1
  113. package/dist/core/{Paper-BGTU0GOF.js → Paper-_alN4JdS.js} +1 -1
  114. package/dist/core/{Parallelogram-RC3MxzlN.js → Parallelogram--Cil139y.js} +2 -2
  115. package/dist/core/{ParticleField-XypD7Eru.js → ParticleField-DZ7um7tu.js} +1 -1
  116. package/dist/core/{ParticleFlow-DBw7m9C6.js → ParticleFlow-CmRP2S8W.js} +2 -2
  117. package/dist/core/{Particles-CvpZvfe3.js → Particles-DFw2E9SE.js} +3 -3
  118. package/dist/core/{PerlinNoise-CHVaarmz.js → PerlinNoise-BmNpwJtM.js} +3 -3
  119. package/dist/core/{Perspective-zyCZAb3_.js → Perspective-DVcUW7jR.js} +4 -4
  120. package/dist/core/{PixelSort-B-zefB9S.js → PixelSort-Bz5dIrqH.js} +1 -1
  121. package/dist/core/{PixelThrow-BZ6erf3G.js → PixelThrow-DEMX8VOw.js} +2 -2
  122. package/dist/core/{Pixelate-D1e7buDQ.js → Pixelate-D-eWrHTE.js} +1 -1
  123. package/dist/core/{Plasma-CBrx8Xu-.js → Plasma-C_EIkpQi.js} +3 -3
  124. package/dist/core/{Plastic-CcS4iAJM.js → Plastic-CYeefb91.js} +5 -5
  125. package/dist/core/{PolarCoordinates-B9SuYLgF.js → PolarCoordinates-DmpUBdGX.js} +3 -3
  126. package/dist/core/{Polygon-N0l1KfIO.js → Polygon-DEEUdZd6.js} +2 -2
  127. package/dist/core/{Posterize-u2et79Pv.js → Posterize-B8oVbNZL.js} +1 -1
  128. package/dist/core/{Prism-BnDsPBcD.js → Prism-Btijlm0t.js} +3 -3
  129. package/dist/core/{ProgressiveBlur-D9FiTJQy.js → ProgressiveBlur-BoRFh6Tn.js} +2 -2
  130. package/dist/core/{RadialGradient-C4oB78ya.js → RadialGradient-CNDiMPZM.js} +3 -3
  131. package/dist/core/{RadialWipe-Dzb7i6wy.js → RadialWipe-C213vCrJ.js} +2 -2
  132. package/dist/core/{RandomBars-DO9j43mN.js → RandomBars-hOY9hNS7.js} +2 -2
  133. package/dist/core/{ReactionDiffusion-DG1NSPhM.js → ReactionDiffusion--UjME4_r.js} +2 -2
  134. package/dist/core/{RectangularCoordinates-Ck1gXdGx.js → RectangularCoordinates-DB7rPJ2Z.js} +3 -3
  135. package/dist/core/{ReflectivePlane-DFQDgLYC.js → ReflectivePlane-D92GjNLR.js} +2 -2
  136. package/dist/core/{Repeater-CT35_BhW.js → Repeater-CJjylN6O.js} +2 -2
  137. package/dist/core/{Ring-DywDgKDv.js → Ring-CJYQP2Qm.js} +2 -2
  138. package/dist/core/{RippleWipe-ePWlg-DT.js → RippleWipe-DJlrObO0.js} +2 -2
  139. package/dist/core/{Ripples-fTSMeqiE.js → Ripples-Brj67b7H.js} +3 -3
  140. package/dist/core/{RoundedRect-B0lxuFfM.js → RoundedRect-3vfFsHAl.js} +2 -2
  141. package/dist/core/{Saturation-ClaD54dk.js → Saturation-lx3DV3Up.js} +1 -1
  142. package/dist/core/{Scratches-D8ZIBZ50.js → Scratches-CMFr8AfL.js} +3 -3
  143. package/dist/core/{Sharpness-CsnT4s1o.js → Sharpness-ByZbUAd0.js} +1 -1
  144. package/dist/core/{Shatter-D_V7GBel.js → Shatter-B1_rLacw.js} +2 -2
  145. package/dist/core/{SimplexNoise-tI2G3Wzn.js → SimplexNoise-zItLLG1j.js} +3 -3
  146. package/dist/core/{SineWave-BGsYyEFg.js → SineWave-BvrhRcvv.js} +3 -3
  147. package/dist/core/{SliceWipe-s4pWdINK.js → SliceWipe-9bUWTClo.js} +1 -1
  148. package/dist/core/{Smoke-C3SLe_rD.js → Smoke-YixCTJbh.js} +3 -3
  149. package/dist/core/{SmokeFill-BuKZtbX8.js → SmokeFill-Cccbyi4g.js} +4 -4
  150. package/dist/core/{SmokeFlow-5fnVH2a9.js → SmokeFlow-DJ3sQPH1.js} +3 -3
  151. package/dist/core/{Solarize-TP85IPV7.js → Solarize-CZeTsJG8.js} +1 -1
  152. package/dist/core/{SolidColor-16e4q89i.js → SolidColor-DB8l6xRl.js} +1 -1
  153. package/dist/core/{Spherize-C4qsnql6.js → Spherize-BdYP0Auv.js} +3 -3
  154. package/dist/core/{Spiral-rPHDFACm.js → Spiral-PPqgFMRM.js} +3 -3
  155. package/dist/core/{Star-BDFhZWLo.js → Star-mgLhY4e_.js} +2 -2
  156. package/dist/core/{Stone-CCXo9IgA.js → Stone-CehIcoVu.js} +2 -2
  157. package/dist/core/{Strands-DCzYUsCX.js → Strands-Dzj-5h31.js} +3 -3
  158. package/dist/core/{Stretch-CjhYXAth.js → Stretch-C82iJhQu.js} +4 -4
  159. package/dist/core/{Stripes-CN2TFWGw.js → Stripes-C3XL9mWC.js} +3 -3
  160. package/dist/core/{StudioBackground-I_XxtKjr.js → StudioBackground-CDpLmvMH.js} +3 -3
  161. package/dist/core/{SunBurst-CGQkdsXl.js → SunBurst-fFeTV8O4.js} +3 -3
  162. package/dist/core/{Surface3D-CpCPTs0u.js → Surface3D-BFGuR3YZ.js} +2 -2
  163. package/dist/core/{Swirl-BCnlG3G8.js → Swirl-DGZs_YDx.js} +3 -3
  164. package/dist/core/{Teardrop-DX-YZkNC.js → Teardrop-DN7t-3HU.js} +2 -2
  165. package/dist/core/{Text-oI5d7_UD.js → Text-DuQnSDiW.js} +6 -5
  166. package/dist/core/{ThinFilm-CEYaV4nn.js → ThinFilm-DhQXCGw9.js} +4 -4
  167. package/dist/core/{TiltShift-C8GluqAm.js → TiltShift-CpHBxw5I.js} +2 -2
  168. package/dist/core/{TimeTrail-CPiSo5Of.js → TimeTrail-j89dMqNU.js} +2 -2
  169. package/dist/core/{Tint-NA7BO-Qk.js → Tint-WmBROyUm.js} +2 -2
  170. package/dist/core/{Trapezoid-BOGSQvW5.js → Trapezoid-RrEwHfyH.js} +2 -2
  171. package/dist/core/{TriangularGrid-Zx3I4CqA.js → TriangularGrid-D7r3Nhss.js} +3 -3
  172. package/dist/core/{Tritone-Bl69W4Y4.js → Tritone-BREi33uL.js} +2 -2
  173. package/dist/core/{Truchet-RJI0-v6x.js → Truchet-CTjP4x60.js} +2 -2
  174. package/dist/core/{Twirl-CrIawDs2.js → Twirl-Bvk8-3JT.js} +4 -4
  175. package/dist/core/{VHS-B12KbScc.js → VHS-et86dWDU.js} +1 -1
  176. package/dist/core/{VenetianBlinds-CGfPlhGd.js → VenetianBlinds-Bv0f2lFw.js} +2 -2
  177. package/dist/core/{Vesica-DekjxkHL.js → Vesica-BV2Sz5VV.js} +2 -2
  178. package/dist/core/{Vibrance-DKKduAD8.js → Vibrance-Q9Mrvfs-.js} +1 -1
  179. package/dist/core/{VideoTexture-1xg_a680.js → VideoTexture-BUY69Gqp.js} +1 -1
  180. package/dist/core/{Vignette-CDRCMNb2.js → Vignette-DyScJQWj.js} +2 -2
  181. package/dist/core/{Voronoi-EWj3WFqv.js → Voronoi-DxoT7iRa.js} +3 -3
  182. package/dist/core/{Water-BdGrOEuE.js → Water-CE1rY4LR.js} +5 -5
  183. package/dist/core/{Watercolor-BGIcnGZu.js → Watercolor-Buk5FkKR.js} +2 -2
  184. package/dist/core/{WaveDistortion-BNlrOaur.js → WaveDistortion-Ca6y77xt.js} +5 -5
  185. package/dist/core/{WaveletNoise-Jv-694xX.js → WaveletNoise-Y7LdptK_.js} +3 -3
  186. package/dist/core/{Weave-HNS6xvOs.js → Weave-CTpPvAhK.js} +2 -2
  187. package/dist/core/{WebcamTexture-DVKxGpWI.js → WebcamTexture-85gdzpo_.js} +3 -2
  188. package/dist/core/{Wool-D7uM0JRs.js → Wool-DJJkx7S2.js} +2 -2
  189. package/dist/core/{WorleyNoise-DsDWmRCp.js → WorleyNoise-C_CHhfMF.js} +3 -3
  190. package/dist/core/{ZoomBlur-S2GfQojf.js → ZoomBlur-8tmVWx1n.js} +2 -2
  191. package/dist/core/{coords-0A7CojvN.js → coords-BkIjixe_.js} +717 -44
  192. package/dist/core/{glass-BjUqcmHP.js → glass-sOqjtPJD.js} +1 -1
  193. package/dist/core/gpu/composer.d.ts +7 -0
  194. package/dist/core/gpu/composer.d.ts.map +1 -1
  195. package/dist/core/gpu/index.d.ts +22 -3
  196. package/dist/core/gpu/index.d.ts.map +1 -1
  197. package/dist/core/gpu/kit/edges.d.ts +19 -1
  198. package/dist/core/gpu/kit/edges.d.ts.map +1 -1
  199. package/dist/core/gpu/kit/index.d.ts +1 -0
  200. package/dist/core/gpu/kit/index.d.ts.map +1 -1
  201. package/dist/core/gpu/kit/sampling.d.ts +34 -0
  202. package/dist/core/gpu/kit/sampling.d.ts.map +1 -0
  203. package/dist/core/gpu/kit/sdf.d.ts.map +1 -1
  204. package/dist/core/gpu/kit/uvTransform.d.ts +13 -3
  205. package/dist/core/gpu/kit/uvTransform.d.ts.map +1 -1
  206. package/dist/core/gpu/passManager.d.ts +5 -1
  207. package/dist/core/gpu/passManager.d.ts.map +1 -1
  208. package/dist/core/gpu/porters.d.ts +1 -0
  209. package/dist/core/gpu/porters.d.ts.map +1 -1
  210. package/dist/core/gpu/root.d.ts +26 -4
  211. package/dist/core/gpu/root.d.ts.map +1 -1
  212. package/dist/core/gpu/support.d.ts +119 -0
  213. package/dist/core/gpu/support.d.ts.map +1 -0
  214. package/dist/core/gpu/uniformStore.d.ts.map +1 -1
  215. package/dist/core/index.d.ts +3 -0
  216. package/dist/core/index.d.ts.map +1 -1
  217. package/dist/core/index.js +457 -358
  218. package/dist/core/{noiseColor-w3B94vmT.js → noiseColor-CY6QVFgB.js} +2 -2
  219. package/dist/core/{porters-B1jqpcE3.js → porters-Bl3WB9VW.js} +2 -2
  220. package/dist/core/presetRenderer.d.ts +13 -1
  221. package/dist/core/presetRenderer.d.ts.map +1 -1
  222. package/dist/core/registry.js +199 -198
  223. package/dist/core/shaderRegistry-CSTwovjI.js +425 -0
  224. package/dist/core/shaders/AngularBlur/index.js +5 -4
  225. package/dist/core/shaders/Arc/index.js +5 -4
  226. package/dist/core/shaders/Ascii/index.js +5 -4
  227. package/dist/core/shaders/Aurora/index.js +5 -4
  228. package/dist/core/shaders/BarShift/index.js +5 -4
  229. package/dist/core/shaders/BarnDoors/index.js +5 -4
  230. package/dist/core/shaders/Beam/index.js +5 -4
  231. package/dist/core/shaders/Bend/index.js +5 -4
  232. package/dist/core/shaders/Blob/index.js +5 -4
  233. package/dist/core/shaders/BlockDissolve/index.js +5 -4
  234. package/dist/core/shaders/BlockNoise/index.js +6 -5
  235. package/dist/core/shaders/BlueNoise/index.js +6 -5
  236. package/dist/core/shaders/Blur/index.js +5 -4
  237. package/dist/core/shaders/Boids/index.js +5 -4
  238. package/dist/core/shaders/BokehBlur/index.js +5 -4
  239. package/dist/core/shaders/BrickPattern/index.js +5 -4
  240. package/dist/core/shaders/BrightnessContrast/index.js +5 -4
  241. package/dist/core/shaders/BrushedMetal/index.js +7 -6
  242. package/dist/core/shaders/Bulge/index.js +5 -4
  243. package/dist/core/shaders/CRTScreen/index.js +5 -4
  244. package/dist/core/shaders/CarbonFiber/index.js +7 -6
  245. package/dist/core/shaders/Chalkboard/index.js +5 -4
  246. package/dist/core/shaders/ChannelBlur/index.js +5 -4
  247. package/dist/core/shaders/CheckerWipe/index.js +5 -4
  248. package/dist/core/shaders/Checkerboard/index.js +5 -4
  249. package/dist/core/shaders/Chevron/index.js +5 -4
  250. package/dist/core/shaders/ChromaFlow/index.js +5 -4
  251. package/dist/core/shaders/ChromaticAberration/index.js +5 -4
  252. package/dist/core/shaders/Circle/index.js +5 -4
  253. package/dist/core/shaders/ColorWheel/index.js +5 -4
  254. package/dist/core/shaders/CompressionArtifacts/index.js +5 -4
  255. package/dist/core/shaders/ConcentricSpin/index.js +5 -4
  256. package/dist/core/shaders/ConicGradient/index.js +5 -4
  257. package/dist/core/shaders/ContourLines/index.js +5 -4
  258. package/dist/core/shaders/CornerPin/index.js +5 -4
  259. package/dist/core/shaders/Crescent/index.js +5 -4
  260. package/dist/core/shaders/Cross/index.js +5 -4
  261. package/dist/core/shaders/Crystal/index.js +7 -6
  262. package/dist/core/shaders/CurlNoise/index.js +6 -5
  263. package/dist/core/shaders/CursorRipples/index.js +5 -4
  264. package/dist/core/shaders/CursorTrail/index.js +5 -4
  265. package/dist/core/shaders/DataMosh/index.js +5 -4
  266. package/dist/core/shaders/DiamondGradient/index.js +5 -4
  267. package/dist/core/shaders/DiamondWipe/index.js +5 -4
  268. package/dist/core/shaders/DiffuseBlur/index.js +5 -4
  269. package/dist/core/shaders/DisplacementMap/index.js +5 -4
  270. package/dist/core/shaders/Dither/index.js +5 -4
  271. package/dist/core/shaders/DotGrid/index.js +5 -4
  272. package/dist/core/shaders/DropShadow/index.js +5 -4
  273. package/dist/core/shaders/Duotone/index.js +5 -4
  274. package/dist/core/shaders/Ellipse/index.js +5 -4
  275. package/dist/core/shaders/Emboss/index.js +7 -6
  276. package/dist/core/shaders/Engraving/index.js +5 -4
  277. package/dist/core/shaders/ErosionNoise/index.js +6 -5
  278. package/dist/core/shaders/Exposure/index.js +5 -4
  279. package/dist/core/shaders/FallingLines/index.js +5 -4
  280. package/dist/core/shaders/FilmGrain/index.js +5 -4
  281. package/dist/core/shaders/FilmStock/index.js +5 -4
  282. package/dist/core/shaders/Flip/index.js +5 -4
  283. package/dist/core/shaders/FloatingParticles/index.js +5 -4
  284. package/dist/core/shaders/FlowField/index.js +5 -4
  285. package/dist/core/shaders/Flower/index.js +5 -4
  286. package/dist/core/shaders/FlowingGradient/index.js +5 -4
  287. package/dist/core/shaders/FlutedGlass/index.js +5 -4
  288. package/dist/core/shaders/Fog/index.js +5 -4
  289. package/dist/core/shaders/Form3D/index.js +5 -4
  290. package/dist/core/shaders/FractalNoise/index.js +5 -4
  291. package/dist/core/shaders/Frost/index.js +7 -6
  292. package/dist/core/shaders/GaborNoise/index.js +6 -5
  293. package/dist/core/shaders/Glass/index.js +7 -6
  294. package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
  295. package/dist/core/shaders/GlassTiles/index.js +5 -4
  296. package/dist/core/shaders/Glitch/index.js +5 -4
  297. package/dist/core/shaders/Glow/index.js +5 -4
  298. package/dist/core/shaders/Godrays/index.js +5 -4
  299. package/dist/core/shaders/Goo/index.js +7 -6
  300. package/dist/core/shaders/GradientMap/index.js +5 -4
  301. package/dist/core/shaders/Grayscale/index.js +5 -4
  302. package/dist/core/shaders/Grid/index.js +5 -4
  303. package/dist/core/shaders/GridDistortion/index.js +5 -4
  304. package/dist/core/shaders/Group/index.js +5 -4
  305. package/dist/core/shaders/HTMLInCanvas/index.js +5 -4
  306. package/dist/core/shaders/Halftone/index.js +5 -4
  307. package/dist/core/shaders/Heart/index.js +5 -4
  308. package/dist/core/shaders/Heatmap/index.js +7 -6
  309. package/dist/core/shaders/HexGrid/index.js +5 -4
  310. package/dist/core/shaders/Hologram/index.js +7 -6
  311. package/dist/core/shaders/Holographic/index.js +7 -6
  312. package/dist/core/shaders/HueShift/index.js +5 -4
  313. package/dist/core/shaders/ImageTexture/index.js +5 -4
  314. package/dist/core/shaders/InkFlow/index.js +5 -4
  315. package/dist/core/shaders/Invert/index.js +5 -4
  316. package/dist/core/shaders/IrisWipe/index.js +5 -4
  317. package/dist/core/shaders/IsometricCubes/index.js +5 -4
  318. package/dist/core/shaders/Kaleidoscope/index.js +5 -4
  319. package/dist/core/shaders/KeyFrames/index.js +5 -4
  320. package/dist/core/shaders/LensFlare/index.js +5 -4
  321. package/dist/core/shaders/LightEdge/index.js +7 -6
  322. package/dist/core/shaders/LightLeak/index.js +5 -4
  323. package/dist/core/shaders/LinearBlur/index.js +5 -4
  324. package/dist/core/shaders/LinearGradient/index.js +5 -4
  325. package/dist/core/shaders/LinearWipe/index.js +5 -4
  326. package/dist/core/shaders/LiquidMetal/index.js +7 -6
  327. package/dist/core/shaders/Liquify/index.js +5 -4
  328. package/dist/core/shaders/MagneticFilings/index.js +5 -4
  329. package/dist/core/shaders/Marble/index.js +5 -4
  330. package/dist/core/shaders/Mirror/index.js +5 -4
  331. package/dist/core/shaders/MultiPointGradient/index.js +5 -4
  332. package/dist/core/shaders/Neon/index.js +6 -5
  333. package/dist/core/shaders/NoiseDissolve/index.js +5 -4
  334. package/dist/core/shaders/ObjectTracker/index.js +6 -5
  335. package/dist/core/shaders/PagePeel/index.js +5 -4
  336. package/dist/core/shaders/Paper/index.js +5 -4
  337. package/dist/core/shaders/Parallelogram/index.js +5 -4
  338. package/dist/core/shaders/ParticleField/index.js +5 -4
  339. package/dist/core/shaders/ParticleFlow/index.js +5 -4
  340. package/dist/core/shaders/Particles/index.js +6 -5
  341. package/dist/core/shaders/PerlinNoise/index.js +6 -5
  342. package/dist/core/shaders/Perspective/index.js +5 -4
  343. package/dist/core/shaders/PixelSort/index.js +5 -4
  344. package/dist/core/shaders/PixelThrow/index.js +5 -4
  345. package/dist/core/shaders/Pixelate/index.js +5 -4
  346. package/dist/core/shaders/Plasma/index.js +5 -4
  347. package/dist/core/shaders/Plastic/index.js +7 -6
  348. package/dist/core/shaders/PolarCoordinates/index.js +5 -4
  349. package/dist/core/shaders/Polygon/index.js +5 -4
  350. package/dist/core/shaders/Posterize/index.js +5 -4
  351. package/dist/core/shaders/Prism/index.js +5 -4
  352. package/dist/core/shaders/ProgressiveBlur/index.js +5 -4
  353. package/dist/core/shaders/RadialGradient/index.js +5 -4
  354. package/dist/core/shaders/RadialWipe/index.js +5 -4
  355. package/dist/core/shaders/RandomBars/index.js +5 -4
  356. package/dist/core/shaders/ReactionDiffusion/index.js +5 -4
  357. package/dist/core/shaders/RectangularCoordinates/index.js +5 -4
  358. package/dist/core/shaders/ReflectivePlane/index.js +5 -4
  359. package/dist/core/shaders/Repeater/index.js +5 -4
  360. package/dist/core/shaders/Ring/index.js +5 -4
  361. package/dist/core/shaders/RippleWipe/index.js +5 -4
  362. package/dist/core/shaders/Ripples/index.js +5 -4
  363. package/dist/core/shaders/RoundedRect/index.js +5 -4
  364. package/dist/core/shaders/Saturation/index.js +5 -4
  365. package/dist/core/shaders/Scratches/index.js +6 -5
  366. package/dist/core/shaders/Sharpness/index.js +5 -4
  367. package/dist/core/shaders/Shatter/index.js +5 -4
  368. package/dist/core/shaders/SimplexNoise/index.js +5 -4
  369. package/dist/core/shaders/SineWave/index.js +5 -4
  370. package/dist/core/shaders/SliceWipe/index.js +5 -4
  371. package/dist/core/shaders/Smoke/index.js +5 -4
  372. package/dist/core/shaders/SmokeFill/index.js +7 -6
  373. package/dist/core/shaders/SmokeFlow/index.js +5 -4
  374. package/dist/core/shaders/Solarize/index.js +5 -4
  375. package/dist/core/shaders/SolidColor/index.js +2 -2
  376. package/dist/core/shaders/Spherize/index.d.ts.map +1 -1
  377. package/dist/core/shaders/Spherize/index.js +5 -4
  378. package/dist/core/shaders/Spiral/index.js +5 -4
  379. package/dist/core/shaders/Star/index.js +5 -4
  380. package/dist/core/shaders/Stone/index.js +4 -3
  381. package/dist/core/shaders/Strands/index.js +5 -4
  382. package/dist/core/shaders/Stretch/index.js +5 -4
  383. package/dist/core/shaders/Stripes/index.js +5 -4
  384. package/dist/core/shaders/StudioBackground/index.js +5 -4
  385. package/dist/core/shaders/SunBurst/index.js +5 -4
  386. package/dist/core/shaders/Surface3D/index.js +5 -4
  387. package/dist/core/shaders/Swirl/index.js +5 -4
  388. package/dist/core/shaders/Teardrop/index.js +5 -4
  389. package/dist/core/shaders/Text/index.d.ts.map +1 -1
  390. package/dist/core/shaders/Text/index.js +6 -5
  391. package/dist/core/shaders/ThinFilm/index.js +6 -5
  392. package/dist/core/shaders/TiltShift/index.js +5 -4
  393. package/dist/core/shaders/TimeTrail/index.js +5 -4
  394. package/dist/core/shaders/Tint/index.js +5 -4
  395. package/dist/core/shaders/Trapezoid/index.js +5 -4
  396. package/dist/core/shaders/TriangularGrid/index.js +5 -4
  397. package/dist/core/shaders/Tritone/index.js +5 -4
  398. package/dist/core/shaders/Truchet/index.js +5 -4
  399. package/dist/core/shaders/Twirl/index.js +5 -4
  400. package/dist/core/shaders/VHS/index.js +5 -4
  401. package/dist/core/shaders/VenetianBlinds/index.js +5 -4
  402. package/dist/core/shaders/Vesica/index.js +5 -4
  403. package/dist/core/shaders/Vibrance/index.js +5 -4
  404. package/dist/core/shaders/VideoTexture/index.js +5 -4
  405. package/dist/core/shaders/Vignette/index.js +5 -4
  406. package/dist/core/shaders/Voronoi/index.js +5 -4
  407. package/dist/core/shaders/Water/index.js +7 -6
  408. package/dist/core/shaders/Watercolor/index.js +5 -4
  409. package/dist/core/shaders/WaveDistortion/index.js +5 -4
  410. package/dist/core/shaders/WaveletNoise/index.js +6 -5
  411. package/dist/core/shaders/Weave/index.js +5 -4
  412. package/dist/core/shaders/WebcamTexture/index.js +5 -4
  413. package/dist/core/shaders/Wool/index.js +4 -3
  414. package/dist/core/shaders/WorleyNoise/index.js +5 -4
  415. package/dist/core/shaders/ZoomBlur/index.js +5 -4
  416. package/dist/core/{shapeEffectBounds-DRyn6AvG.js → shapeEffectBounds-Cl58vRlg.js} +1 -1
  417. package/dist/core/support-6QRFK3xB.js +74 -0
  418. package/dist/core/telemetry/collector.d.ts.map +1 -1
  419. package/dist/core/telemetry/index.js +6 -5
  420. package/dist/core/utilities/boundingBox.d.ts +14 -0
  421. package/dist/core/utilities/boundingBox.d.ts.map +1 -1
  422. package/dist/core/utilities/transformations/index.js +1 -1
  423. package/dist/js/bundle.js +162 -162
  424. package/dist/js/createShader.d.ts.map +1 -1
  425. package/dist/js/createShader.js +43 -13
  426. package/dist/js/createSharedDevice.d.ts +11 -9
  427. package/dist/js/createSharedDevice.d.ts.map +1 -1
  428. package/dist/js/createSharedDevice.js +2 -1
  429. package/dist/js/index.d.ts +2 -0
  430. package/dist/js/index.d.ts.map +1 -1
  431. package/dist/js/index.js +2 -1
  432. package/dist/js/types.d.ts +40 -10
  433. package/dist/js/types.d.ts.map +1 -1
  434. package/dist/react/Shader.js +27 -11
  435. package/dist/react/bundle.js +159 -159
  436. package/dist/react/engine/Shader.d.ts +7 -0
  437. package/dist/react/engine/Shader.d.ts.map +1 -1
  438. package/dist/react/index.d.ts +2 -0
  439. package/dist/react/index.d.ts.map +1 -1
  440. package/dist/react/index.js +2 -1
  441. package/dist/solid/engine/Preview.js +1 -0
  442. package/dist/solid/engine/Shader.d.ts +7 -0
  443. package/dist/solid/engine/Shader.d.ts.map +1 -1
  444. package/dist/solid/engine/Shader.js +29 -10
  445. package/dist/solid/index.d.ts +2 -0
  446. package/dist/solid/index.d.ts.map +1 -1
  447. package/dist/solid/index.js +6 -1
  448. package/dist/svelte/engine/Shader.svelte.d.ts +7 -0
  449. package/dist/svelte/index.d.ts +2 -0
  450. package/dist/svelte/index.js +27 -11
  451. package/dist/svelte/source/engine/Shader.svelte +49 -13
  452. package/dist/svelte/source/index.js +2 -0
  453. package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +41 -24
  454. package/dist/vue/engine/Shader.vue.d.ts +9 -1
  455. package/dist/vue/engine/Shader.vue.d.ts.map +1 -1
  456. package/dist/vue/index.d.ts +2 -0
  457. package/dist/vue/index.d.ts.map +1 -1
  458. package/dist/vue/index.js +2 -1
  459. package/package.json +1 -13
  460. package/dist/core/shaderRegistry-BrbiIqjD.js +0 -425
  461. package/dist/pixi/createShaderSprite.d.ts +0 -54
  462. package/dist/pixi/createShaderSprite.d.ts.map +0 -1
  463. package/dist/pixi/index.d.ts +0 -20
  464. package/dist/pixi/index.d.ts.map +0 -1
  465. package/dist/pixi/index.js +0 -153
  466. /package/dist/core/{fonts-BLmvxkGd.js → fonts-BtGjHq1w.js} +0 -0
  467. /package/dist/core/{noiseStylize-4za6Obes.js → noiseStylize-BsZQT7ig.js} +0 -0
  468. /package/dist/core/{transformations-P50Uo_Ju.js → transformations-t0d2-uSX.js} +0 -0
@@ -1,264 +1,280 @@
1
- import { Dt as packConvertedStops, Ht as composeNodeTree, Lt as SHARED_SAMPLER_LAYOUT, Ot as packStops, S as maxPixelRatioForDevice, Vt as collectStructuralHashInputs, Xt as needsTransformation, Y as createComputeDispatcher, Yt as boundingBoxToUVParams, Zt as screenUVToBoxLocal$1, kt as getAnimatedTimeState, t as SystemUniforms, vn as FieldHandle, xn as updateFieldValue, yn as createUniformStore } from "./coords-0A7CojvN.js";
2
- import "./glass-BjUqcmHP.js";
3
- import "./Neon-RDh1tAjH.js";
4
- import "./Emboss-C8ElxLo3.js";
5
- import "./Form3D-BZ_vaLWe.js";
6
- import "./ThinFilm-CEYaV4nn.js";
7
- import { o as transformColorSpace } from "./transformations-P50Uo_Ju.js";
8
- import { _ as sortStops, a as buildDimensionalPlan, c as isDimensionalValue, d as colorToRGBA, f as setColorSpaceModeGpu, g as resolveStops, h as colorStopsTransform, i as boxHalfExtentsUV, l as resolveDimensionalProp, n as rootPassthrough, o as buildExtraSizeProps, p as MAX_COLOR_STOPS, r as createGpuUniformsMap, s as isDimensionalProp, u as setShaderCanvasDimensions } from "./porters-B1jqpcE3.js";
9
- import "./AngularBlur-CJsRS1Ri.js";
10
- import "./Arc-CNesL3S9.js";
11
- import "./Ascii-z7til0PQ.js";
12
- import "./Aurora-BAuYUYGc.js";
13
- import "./BarnDoors-DrOAeSqj.js";
14
- import "./BarShift-qVwbTMcq.js";
15
- import "./Beam-BW6yblZw.js";
16
- import "./Bend-B7PMQ3T5.js";
17
- import "./Blob-CRJ5N0hK.js";
18
- import "./BlockDissolve-D-6Wy66g.js";
19
- import "./noiseColor-w3B94vmT.js";
20
- import "./BlockNoise-Ct9Fae_7.js";
21
- import "./BlueNoise-Cu7rJuP0.js";
22
- import "./Blur-BrdVVSPq.js";
23
- import "./Boids-DIzUaLGM.js";
24
- import "./BokehBlur-yYb03spN.js";
25
- import "./BrickPattern-BL_MOS_A.js";
26
- import "./BrightnessContrast-CiKimIcA.js";
27
- import { a as SVG3D_TYPES, c as isVolumetricShapeType, i as SVG3D_DEFAULTS, l as shape3dBoundingRadius, n as SHAPE3D_DEFAULTS, o as is3dShapeType, r as SHAPE3D_TYPES, s as isSvg3dShapeType } from "./shapeEffectBounds-DRyn6AvG.js";
28
- import "./BrushedMetal-dvYjizvg.js";
29
- import "./Bulge-CogpoPKe.js";
30
- import "./CarbonFiber-CTy3P-Qk.js";
31
- import "./Chalkboard-CnHUOHtc.js";
32
- import "./ChannelBlur-MwnpNLSZ.js";
33
- import "./Checkerboard-C97ZiLyQ.js";
34
- import "./CheckerWipe-CCNc70ye.js";
35
- import "./Chevron-ABT6D1wM.js";
36
- import "./ChromaFlow-7tJQEFm9.js";
37
- import "./ChromaticAberration-D7-fxyEd.js";
38
- import "./Circle-I0DIAypS.js";
39
- import "./ColorWheel-CEqzzrN-.js";
40
- import "./CompressionArtifacts-C24nRoC3.js";
41
- import "./ConcentricSpin-CAu-PGNH.js";
42
- import "./ConicGradient-n12K5TLj.js";
43
- import "./ContourLines-FOStIWDr.js";
44
- import "./CornerPin-DsUVMFcX.js";
45
- import "./Crescent-9i_5WPA-.js";
46
- import "./Cross-HiA69xGL.js";
47
- import "./CRTScreen-X64EnHMB.js";
48
- import "./Crystal-BBjEm9m4.js";
49
- import "./CurlNoise-1jifziI0.js";
50
- import "./CursorRipples-D4agAYHK.js";
51
- import "./CursorTrail-C-FrY0e2.js";
52
- import "./DataMosh-DXcM1I4Y.js";
53
- import "./DiamondGradient-CQ5jeKEc.js";
54
- import "./DiamondWipe-B1EXgweH.js";
55
- import "./DiffuseBlur-CmD97dHb.js";
56
- import "./DisplacementMap-JV_CNJfU.js";
57
- import "./Dither-NJDWpGb3.js";
58
- import "./DotGrid-B2w7RFcv.js";
59
- import "./DropShadow-CLWp-bon.js";
60
- import "./Duotone-Be2jx-jZ.js";
61
- import "./Ellipse-BR6qXidK.js";
62
- import "./Engraving-D67DM--1.js";
63
- import "./ErosionNoise-FeEMQOkR.js";
64
- import "./Exposure-CZ1gfqpf.js";
65
- import "./FallingLines-ifuQ01oA.js";
66
- import "./FilmGrain-p5sawa_f.js";
67
- import "./FilmStock-BD5wv1TV.js";
68
- import "./Flip-MKiLH9jJ.js";
69
- import "./FloatingParticles-Bn8CmtwG.js";
70
- import "./Flower-BwDBwcSk.js";
71
- import "./FlowField-BdFeRmif.js";
72
- import "./FlowingGradient-RYOS36eB.js";
73
- import "./FlutedGlass-Ong8W4Ih.js";
74
- import "./Fog-C-X8msRb.js";
75
- import "./FractalNoise-BPj8RPkE.js";
76
- import "./Frost-DmxlFu63.js";
77
- import "./GaborNoise-Boc8ieHd.js";
78
- import "./Glass-D5p21MIw.js";
79
- import "./GlassTiles-BP4CzdI3.js";
80
- import "./Glitch-cJguD7jS.js";
81
- import "./Glow-BabfcnwS.js";
82
- import "./Godrays-BpiKSlNR.js";
83
- import "./Goo-BaQEtOyr.js";
84
- import "./GradientMap-BtKtW-4M.js";
85
- import "./Grayscale-Bgwugyvv.js";
86
- import "./Grid-5cEDkyWX.js";
87
- import "./GridDistortion-Byf4G720.js";
88
- import "./Group-DUEQSUir.js";
89
- import "./Halftone-BiSLVvGF.js";
90
- import "./Heart-RAGeVEVH.js";
91
- import "./Heatmap-Ds65scO7.js";
92
- import "./HexGrid-H1N5Y1XD.js";
93
- import "./Hologram-DpDfyeSz.js";
94
- import "./Holographic-Ckubuqn8.js";
95
- import "./HTMLInCanvas-uW1O3Z-R.js";
96
- import "./HueShift-C_a5UVHy.js";
97
- import "./ImageTexture-CM-dPJQ4.js";
98
- import "./InkFlow-CY7sCKpI.js";
99
- import "./Invert-DhHrtwHQ.js";
100
- import "./IrisWipe-BnOMUdEV.js";
101
- import "./IsometricCubes-CXPz62PB.js";
102
- import "./Kaleidoscope-CSgi0E5B.js";
103
- import "./KeyFrames-C3I4poq8.js";
104
- import "./LensFlare-DxvbKXgt.js";
105
- import "./LightEdge-niXz_FAk.js";
106
- import "./LightLeak-B7Pt1tt4.js";
107
- import "./LinearBlur-CXNcduWQ.js";
108
- import "./LinearGradient-CYiaWIXd.js";
109
- import "./LinearWipe-gwLhEveK.js";
110
- import "./LiquidMetal-D0sgLjcd.js";
111
- import "./Liquify-h08a8S-C.js";
112
- import "./MagneticFilings-BlNWPVwS.js";
113
- import "./Marble-bps2lOWc.js";
114
- import "./Mirror-8miSUAyZ.js";
115
- import "./MultiPointGradient-C-9_Q6CM.js";
116
- import "./NoiseDissolve-DjlWGdUc.js";
117
- import "./fonts-BLmvxkGd.js";
118
- import "./ObjectTracker-DW4aEBRv.js";
119
- import "./PagePeel-JsbScYi4.js";
120
- import "./Paper-BGTU0GOF.js";
121
- import "./Parallelogram-RC3MxzlN.js";
122
- import "./ParticleField-XypD7Eru.js";
123
- import "./ParticleFlow-DBw7m9C6.js";
124
- import "./Particles-CvpZvfe3.js";
125
- import "./PerlinNoise-CHVaarmz.js";
126
- import "./Perspective-zyCZAb3_.js";
127
- import "./Pixelate-D1e7buDQ.js";
128
- import "./PixelSort-B-zefB9S.js";
129
- import "./PixelThrow-BZ6erf3G.js";
130
- import "./Plasma-CBrx8Xu-.js";
131
- import "./Plastic-CcS4iAJM.js";
132
- import "./PolarCoordinates-B9SuYLgF.js";
133
- import "./Polygon-N0l1KfIO.js";
134
- import "./Posterize-u2et79Pv.js";
135
- import "./Prism-BnDsPBcD.js";
136
- import "./ProgressiveBlur-D9FiTJQy.js";
137
- import "./RadialGradient-C4oB78ya.js";
138
- import "./RadialWipe-Dzb7i6wy.js";
139
- import "./RandomBars-DO9j43mN.js";
140
- import "./ReactionDiffusion-DG1NSPhM.js";
141
- import "./RectangularCoordinates-Ck1gXdGx.js";
142
- import "./ReflectivePlane-DFQDgLYC.js";
143
- import "./Repeater-CT35_BhW.js";
144
- import "./Ring-DywDgKDv.js";
145
- import "./Ripples-fTSMeqiE.js";
146
- import "./RippleWipe-ePWlg-DT.js";
147
- import "./RoundedRect-B0lxuFfM.js";
148
- import "./Saturation-ClaD54dk.js";
149
- import "./Scratches-D8ZIBZ50.js";
150
- import "./Sharpness-CsnT4s1o.js";
151
- import "./Shatter-D_V7GBel.js";
152
- import "./SimplexNoise-tI2G3Wzn.js";
153
- import "./SineWave-BGsYyEFg.js";
154
- import "./SliceWipe-s4pWdINK.js";
155
- import "./Smoke-C3SLe_rD.js";
156
- import "./SmokeFill-BuKZtbX8.js";
157
- import "./SmokeFlow-5fnVH2a9.js";
158
- import "./Solarize-TP85IPV7.js";
159
- import "./SolidColor-16e4q89i.js";
160
- import "./Spherize-C4qsnql6.js";
161
- import "./Spiral-rPHDFACm.js";
162
- import "./Star-BDFhZWLo.js";
163
- import "./noiseStylize-4za6Obes.js";
164
- import "./Stone-CCXo9IgA.js";
165
- import "./Strands-DCzYUsCX.js";
166
- import "./Stretch-CjhYXAth.js";
167
- import "./Stripes-CN2TFWGw.js";
168
- import "./StudioBackground-I_XxtKjr.js";
169
- import "./SunBurst-CGQkdsXl.js";
170
- import "./Surface3D-CpCPTs0u.js";
171
- import "./Swirl-BCnlG3G8.js";
172
- import "./Teardrop-DX-YZkNC.js";
173
- import "./Text-oI5d7_UD.js";
174
- import "./TiltShift-C8GluqAm.js";
175
- import "./TimeTrail-CPiSo5Of.js";
176
- import "./Tint-NA7BO-Qk.js";
177
- import "./Trapezoid-BOGSQvW5.js";
178
- import "./TriangularGrid-Zx3I4CqA.js";
179
- import "./Tritone-Bl69W4Y4.js";
180
- import "./Truchet-RJI0-v6x.js";
181
- import "./Twirl-CrIawDs2.js";
182
- import "./VenetianBlinds-CGfPlhGd.js";
183
- import "./Vesica-DekjxkHL.js";
184
- import "./VHS-B12KbScc.js";
185
- import "./Vibrance-DKKduAD8.js";
186
- import "./VideoTexture-1xg_a680.js";
187
- import "./Vignette-CDRCMNb2.js";
188
- import "./Voronoi-EWj3WFqv.js";
189
- import "./Water-BdGrOEuE.js";
190
- import "./Watercolor-BGIcnGZu.js";
191
- import "./WaveDistortion-BNlrOaur.js";
192
- import "./WaveletNoise-Jv-694xX.js";
193
- import "./Weave-HNS6xvOs.js";
194
- import "./WebcamTexture-DVKxGpWI.js";
195
- import "./Wool-D7uM0JRs.js";
196
- import "./WorleyNoise-DsDWmRCp.js";
197
- import "./ZoomBlur-S2GfQojf.js";
198
- import { t as getAllShaders } from "./shaderRegistry-BrbiIqjD.js";
1
+ import { $t as resolveBoundingBox, Cn as FieldHandle, Dt as packConvertedStops, En as updateFieldValue, Ot as packStops, Qt as isIdentityBoundingBox, S as maxPixelRatioForDevice, Ut as collectStructuralHashInputs, Wt as composeNodeTree, Y as createComputeDispatcher, Zt as DEFAULT_BOUNDING_BOX, en as boundingBoxToUVParams, kt as getAnimatedTimeState, nn as screenUVToBoxLocal$1, t as SystemUniforms, tn as needsTransformation, wn as createUniformStore, zt as SHARED_SAMPLER_LAYOUT } from "./coords-BkIjixe_.js";
2
+ import { a as getWebGPUSupport, c as isWebGPUSupported, i as getGpuUnusableReason, l as markGpuUnusable, n as debugError, o as isGpuUnavailableError, r as debugWarn, s as isShadersDebug, t as GpuUnavailableError, u as setShadersDebug } from "./support-6QRFK3xB.js";
3
+ import "./glass-sOqjtPJD.js";
4
+ import "./Neon-BjBSg2FR.js";
5
+ import "./Emboss-RxgVyKyU.js";
6
+ import "./Form3D-CJKutcFA.js";
7
+ import "./ThinFilm-DhQXCGw9.js";
8
+ import { o as transformColorSpace } from "./transformations-t0d2-uSX.js";
9
+ import { _ as sortStops, a as buildDimensionalPlan, c as isDimensionalValue, d as colorToRGBA, f as setColorSpaceModeGpu, g as resolveStops, h as colorStopsTransform, i as boxHalfExtentsUV, l as resolveDimensionalProp, n as rootPassthrough, o as buildExtraSizeProps, p as MAX_COLOR_STOPS, r as createGpuUniformsMap, s as isDimensionalProp, u as setShaderCanvasDimensions } from "./porters-Bl3WB9VW.js";
10
+ import "./AngularBlur-D33jrcZd.js";
11
+ import "./Arc-BG8Bpknl.js";
12
+ import "./Ascii-DE0vAAOX.js";
13
+ import "./Aurora-Cu4JGjCD.js";
14
+ import "./BarnDoors-JraHuTwe.js";
15
+ import "./BarShift-o_IvV0t_.js";
16
+ import "./Beam-DshQatlM.js";
17
+ import "./Bend-KJzYWEJV.js";
18
+ import "./Blob-BJxkqvOO.js";
19
+ import "./BlockDissolve-CsIQWUpY.js";
20
+ import "./noiseColor-CY6QVFgB.js";
21
+ import "./BlockNoise-DVI-0PnC.js";
22
+ import "./BlueNoise-CzBN6i38.js";
23
+ import "./Blur-W95k4Lxz.js";
24
+ import "./Boids-BJ6wxFC8.js";
25
+ import "./BokehBlur-CbOO__cN.js";
26
+ import "./BrickPattern-eQv5DrKE.js";
27
+ import "./BrightnessContrast-CmH2DvaZ.js";
28
+ import { a as SVG3D_TYPES, c as isVolumetricShapeType, i as SVG3D_DEFAULTS, l as shape3dBoundingRadius, n as SHAPE3D_DEFAULTS, o as is3dShapeType, r as SHAPE3D_TYPES, s as isSvg3dShapeType } from "./shapeEffectBounds-Cl58vRlg.js";
29
+ import "./BrushedMetal-D-7M7ZuM.js";
30
+ import "./Bulge-KmBnaVMx.js";
31
+ import "./CarbonFiber-D4jap49E.js";
32
+ import "./Chalkboard-H6-0OXC3.js";
33
+ import "./ChannelBlur-BKJfnu91.js";
34
+ import "./Checkerboard-NwKMLVHe.js";
35
+ import "./CheckerWipe-acIaflfK.js";
36
+ import "./Chevron-eBbFV2ud.js";
37
+ import "./ChromaFlow-ex7l4tTK.js";
38
+ import "./ChromaticAberration-Bbi9vNxS.js";
39
+ import "./Circle-DdFWEti1.js";
40
+ import "./ColorWheel-BqcyPqcj.js";
41
+ import "./CompressionArtifacts-DqWq-4h8.js";
42
+ import "./ConcentricSpin-CtI1hKio.js";
43
+ import "./ConicGradient-HmImN4LO.js";
44
+ import "./ContourLines-BMom2vMu.js";
45
+ import "./CornerPin-D_-luriU.js";
46
+ import "./Crescent-CY6MeN9V.js";
47
+ import "./Cross-ClImej9a.js";
48
+ import "./CRTScreen-t7dyfO5u.js";
49
+ import "./Crystal-CMrqHLFD.js";
50
+ import "./CurlNoise-C_QZBT5m.js";
51
+ import "./CursorRipples-Bmlex_IF.js";
52
+ import "./CursorTrail-B68x1Cv-.js";
53
+ import "./DataMosh-FZQWg5Ui.js";
54
+ import "./DiamondGradient-C0hD1lNN.js";
55
+ import "./DiamondWipe-B8rFSwsV.js";
56
+ import "./DiffuseBlur--Gn4bDwC.js";
57
+ import "./DisplacementMap-DQk8S4sK.js";
58
+ import "./Dither-rB9M7FS7.js";
59
+ import "./DotGrid-DszAbmy5.js";
60
+ import "./DropShadow-BS3S178o.js";
61
+ import "./Duotone-Cf_ybegD.js";
62
+ import "./Ellipse-DY8FgSSx.js";
63
+ import "./Engraving-C0OuioUr.js";
64
+ import "./ErosionNoise-B-I3VFiY.js";
65
+ import "./Exposure-360tdOrT.js";
66
+ import "./FallingLines-4sVKJMDj.js";
67
+ import "./FilmGrain-CgzuRidb.js";
68
+ import "./FilmStock-BW9k3EPE.js";
69
+ import "./Flip-DqdxtYHS.js";
70
+ import "./FloatingParticles-BI8Y9Gcv.js";
71
+ import "./Flower-IaNzANoa.js";
72
+ import "./FlowField-CV0Is569.js";
73
+ import "./FlowingGradient-CEAAa11t.js";
74
+ import "./FlutedGlass-CF6mZMq4.js";
75
+ import "./Fog-D9OYGwhY.js";
76
+ import "./FractalNoise-DelBWQyb.js";
77
+ import "./Frost-Br7b9n4L.js";
78
+ import "./GaborNoise-DViNgIse.js";
79
+ import "./Glass-IwPea9h1.js";
80
+ import "./GlassTiles-DpPHPKv7.js";
81
+ import "./Glitch-CKmX-agV.js";
82
+ import "./Glow-CVcVetaa.js";
83
+ import "./Godrays-CNNHJzNz.js";
84
+ import "./Goo-BUXnhwTk.js";
85
+ import "./GradientMap-DqGEXRl9.js";
86
+ import "./Grayscale-DiJAjdx3.js";
87
+ import "./Grid-utmP7uyR.js";
88
+ import "./GridDistortion-Bn6D5dfC.js";
89
+ import "./Group-u-o7qE0Y.js";
90
+ import "./Halftone-C5La06l6.js";
91
+ import "./Heart-CGLx1F8D.js";
92
+ import "./Heatmap-CE5DLeJp.js";
93
+ import "./HexGrid-CqB-yMWN.js";
94
+ import "./Hologram-CctodmpA.js";
95
+ import "./Holographic-DSz4qfkn.js";
96
+ import "./HTMLInCanvas-sK9HN-gI.js";
97
+ import "./HueShift-Cfq-ijQP.js";
98
+ import "./ImageTexture-DdzAYFTi.js";
99
+ import "./InkFlow-CCPfoQXs.js";
100
+ import "./Invert-CtUHcYmv.js";
101
+ import "./IrisWipe-DWVFMn81.js";
102
+ import "./IsometricCubes-m-mYnbqN.js";
103
+ import "./Kaleidoscope-DMNLVgx6.js";
104
+ import "./KeyFrames-jgrfR3Hj.js";
105
+ import "./LensFlare-CuWJsfwE.js";
106
+ import "./LightEdge-WMxb-xKB.js";
107
+ import "./LightLeak-DfOngFp7.js";
108
+ import "./LinearBlur-iLXYGof_.js";
109
+ import "./LinearGradient-DLrJban6.js";
110
+ import "./LinearWipe-C_fWBl4i.js";
111
+ import "./LiquidMetal-DHM8kVNr.js";
112
+ import "./Liquify-FQWL8j4t.js";
113
+ import "./MagneticFilings-BUzSkycD.js";
114
+ import "./Marble-BnHffB3C.js";
115
+ import "./Mirror-B_v4FunG.js";
116
+ import "./MultiPointGradient-5NGBm90u.js";
117
+ import "./NoiseDissolve-kDP6-h9F.js";
118
+ import "./fonts-BtGjHq1w.js";
119
+ import "./ObjectTracker-vU1bVmIJ.js";
120
+ import "./PagePeel-BgDvgtIV.js";
121
+ import "./Paper-_alN4JdS.js";
122
+ import "./Parallelogram--Cil139y.js";
123
+ import "./ParticleField-DZ7um7tu.js";
124
+ import "./ParticleFlow-CmRP2S8W.js";
125
+ import "./Particles-DFw2E9SE.js";
126
+ import "./PerlinNoise-BmNpwJtM.js";
127
+ import "./Perspective-DVcUW7jR.js";
128
+ import "./Pixelate-D-eWrHTE.js";
129
+ import "./PixelSort-Bz5dIrqH.js";
130
+ import "./PixelThrow-DEMX8VOw.js";
131
+ import "./Plasma-C_EIkpQi.js";
132
+ import "./Plastic-CYeefb91.js";
133
+ import "./PolarCoordinates-DmpUBdGX.js";
134
+ import "./Polygon-DEEUdZd6.js";
135
+ import "./Posterize-B8oVbNZL.js";
136
+ import "./Prism-Btijlm0t.js";
137
+ import "./ProgressiveBlur-BoRFh6Tn.js";
138
+ import "./RadialGradient-CNDiMPZM.js";
139
+ import "./RadialWipe-C213vCrJ.js";
140
+ import "./RandomBars-hOY9hNS7.js";
141
+ import "./ReactionDiffusion--UjME4_r.js";
142
+ import "./RectangularCoordinates-DB7rPJ2Z.js";
143
+ import "./ReflectivePlane-D92GjNLR.js";
144
+ import "./Repeater-CJjylN6O.js";
145
+ import "./Ring-CJYQP2Qm.js";
146
+ import "./Ripples-Brj67b7H.js";
147
+ import "./RippleWipe-DJlrObO0.js";
148
+ import "./RoundedRect-3vfFsHAl.js";
149
+ import "./Saturation-lx3DV3Up.js";
150
+ import "./Scratches-CMFr8AfL.js";
151
+ import "./Sharpness-ByZbUAd0.js";
152
+ import "./Shatter-B1_rLacw.js";
153
+ import "./SimplexNoise-zItLLG1j.js";
154
+ import "./SineWave-BvrhRcvv.js";
155
+ import "./SliceWipe-9bUWTClo.js";
156
+ import "./Smoke-YixCTJbh.js";
157
+ import "./SmokeFill-Cccbyi4g.js";
158
+ import "./SmokeFlow-DJ3sQPH1.js";
159
+ import "./Solarize-CZeTsJG8.js";
160
+ import "./SolidColor-DB8l6xRl.js";
161
+ import "./Spherize-BdYP0Auv.js";
162
+ import "./Spiral-PPqgFMRM.js";
163
+ import "./Star-mgLhY4e_.js";
164
+ import "./noiseStylize-BsZQT7ig.js";
165
+ import "./Stone-CehIcoVu.js";
166
+ import "./Strands-Dzj-5h31.js";
167
+ import "./Stretch-C82iJhQu.js";
168
+ import "./Stripes-C3XL9mWC.js";
169
+ import "./StudioBackground-CDpLmvMH.js";
170
+ import "./SunBurst-fFeTV8O4.js";
171
+ import "./Surface3D-BFGuR3YZ.js";
172
+ import "./Swirl-DGZs_YDx.js";
173
+ import "./Teardrop-DN7t-3HU.js";
174
+ import "./Text-DuQnSDiW.js";
175
+ import "./TiltShift-CpHBxw5I.js";
176
+ import "./TimeTrail-j89dMqNU.js";
177
+ import "./Tint-WmBROyUm.js";
178
+ import "./Trapezoid-RrEwHfyH.js";
179
+ import "./TriangularGrid-D7r3Nhss.js";
180
+ import "./Tritone-BREi33uL.js";
181
+ import "./Truchet-CTjP4x60.js";
182
+ import "./Twirl-Bvk8-3JT.js";
183
+ import "./VenetianBlinds-Bv0f2lFw.js";
184
+ import "./Vesica-BV2Sz5VV.js";
185
+ import "./VHS-et86dWDU.js";
186
+ import "./Vibrance-Q9Mrvfs-.js";
187
+ import "./VideoTexture-BUY69Gqp.js";
188
+ import "./Vignette-DyScJQWj.js";
189
+ import "./Voronoi-DxoT7iRa.js";
190
+ import "./Water-CE1rY4LR.js";
191
+ import "./Watercolor-Buk5FkKR.js";
192
+ import "./WaveDistortion-Ca6y77xt.js";
193
+ import "./WaveletNoise-Y7LdptK_.js";
194
+ import "./Weave-CTpPvAhK.js";
195
+ import "./WebcamTexture-85gdzpo_.js";
196
+ import "./Wool-DJJkx7S2.js";
197
+ import "./WorleyNoise-C_CHhfMF.js";
198
+ import "./ZoomBlur-8tmVWx1n.js";
199
+ import { t as getAllShaders } from "./shaderRegistry-CSTwovjI.js";
199
200
  import * as d from "typegpu/data";
200
201
  import tgpu, { common } from "typegpu";
201
202
  var OPTIONAL_FEATURES = ["float32-filterable", "timestamp-query"];
202
203
  var rootsByDevice = /* @__PURE__ */ new WeakMap();
203
204
  var lostCallbacks = /* @__PURE__ */ new WeakMap();
204
205
  var lostDevices = /* @__PURE__ */ new WeakSet();
205
- var replacementRoots = /* @__PURE__ */ new WeakMap();
206
+ var defaultRootPromise = null;
207
+ var destroyedDefaultRoots = /* @__PURE__ */ new WeakSet();
206
208
  async function acquireRoot(options = {}) {
207
- if (options.device) {
209
+ if (options.device && !lostDevices.has(options.device)) {
208
210
  const device = options.device;
209
- if (!lostDevices.has(device)) {
210
- let root = rootsByDevice.get(device);
211
- if (!root) {
212
- root = tgpu.initFromDevice({ device });
213
- rootsByDevice.set(device, root);
214
- }
215
- wireDeviceLost(root, options.onDeviceLost);
216
- return {
217
- root,
218
- device,
219
- adapter: options.adapter,
220
- createdDevice: false
221
- };
222
- }
223
- let replacement;
224
- for (;;) {
225
- const cached = replacementRoots.get(device);
226
- if (!cached) break;
227
- const cachedCtx = await cached.catch(() => null);
228
- if (cachedCtx && !lostDevices.has(cachedCtx.device)) {
229
- replacement = cached;
230
- break;
231
- }
232
- if (replacementRoots.get(device) === cached) replacementRoots.delete(device);
211
+ let root = rootsByDevice.get(device);
212
+ if (!root) {
213
+ root = tgpu.initFromDevice({ device });
214
+ rootsByDevice.set(device, root);
233
215
  }
234
- if (!replacement) {
235
- console.warn("[gpu] injected GPU device was lost — creating a replacement device for recovery");
236
- replacement = createOwnRoot();
237
- replacementRoots.set(device, replacement);
238
- }
239
- const ctx$1 = await replacement;
240
- wireDeviceLost(ctx$1.root, options.onDeviceLost);
216
+ const release$1 = wireDeviceLost(root, options.onDeviceLost);
241
217
  return {
242
- root: ctx$1.root,
243
- device: ctx$1.device,
244
- adapter: ctx$1.adapter,
245
- createdDevice: false
218
+ root,
219
+ device,
220
+ adapter: options.adapter,
221
+ createdDevice: false,
222
+ release: release$1
246
223
  };
247
224
  }
248
- const ctx = await createOwnRoot();
249
- wireDeviceLost(ctx.root, options.onDeviceLost);
225
+ if (options.device) debugWarn("[gpu] injected GPU device was lost — falling back to the shared default device");
226
+ const ctx = await acquireDefaultRoot();
227
+ const release = wireDeviceLost(ctx.root, options.onDeviceLost);
250
228
  return {
251
- ...ctx,
252
- adapter: options.adapter,
253
- createdDevice: true
229
+ root: ctx.root,
230
+ device: ctx.device,
231
+ adapter: ctx.adapter,
232
+ createdDevice: false,
233
+ release
254
234
  };
255
235
  }
236
+ async function acquireDefaultRoot() {
237
+ for (;;) {
238
+ const cached = defaultRootPromise;
239
+ if (!cached) break;
240
+ const ctx = await cached.catch(() => null);
241
+ if (ctx && !destroyedDefaultRoots.has(cached) && !lostDevices.has(ctx.device)) return ctx;
242
+ if (defaultRootPromise === cached) defaultRootPromise = null;
243
+ }
244
+ const pending = createOwnRoot();
245
+ defaultRootPromise = pending;
246
+ try {
247
+ return await pending;
248
+ } catch (error) {
249
+ if (defaultRootPromise === pending) defaultRootPromise = null;
250
+ throw error;
251
+ }
252
+ }
253
+ function destroyDefaultGpuDevice() {
254
+ const pending = defaultRootPromise;
255
+ defaultRootPromise = null;
256
+ if (!pending) return;
257
+ destroyedDefaultRoots.add(pending);
258
+ pending.then((ctx) => {
259
+ lostDevices.add(ctx.device);
260
+ try {
261
+ ctx.root.destroy();
262
+ } catch {}
263
+ }).catch(() => {});
264
+ }
256
265
  async function createOwnRoot() {
257
- if (typeof navigator === "undefined" || !navigator.gpu) throw new Error("[gpu] WebGPU is not available in this environment (navigator.gpu is undefined). This renderer is WebGPU-only.");
258
- const root = await tgpu.init({
259
- adapter: { powerPreference: "high-performance" },
260
- device: { optionalFeatures: OPTIONAL_FEATURES }
261
- });
266
+ if (typeof navigator === "undefined" || !navigator.gpu) throw new GpuUnavailableError("unsupported", "[gpu] WebGPU is not available in this environment (navigator.gpu is undefined).");
267
+ let root;
268
+ try {
269
+ root = await tgpu.init({
270
+ adapter: { powerPreference: "high-performance" },
271
+ device: { optionalFeatures: OPTIONAL_FEATURES }
272
+ });
273
+ } catch (error) {
274
+ const info = await getWebGPUSupport();
275
+ throw new GpuUnavailableError(info.supported ? "no-device" : info.reason ?? "init-failed", void 0, { cause: error });
276
+ }
277
+ if (!root.device) throw new GpuUnavailableError("no-device", "[gpu] adapter returned no device.");
262
278
  rootsByDevice.set(root.device, root);
263
279
  return {
264
280
  root,
@@ -282,10 +298,13 @@ function wireDeviceLost(root, onDeviceLost) {
282
298
  root.device.lost.then((info) => {
283
299
  lostDevices.add(device);
284
300
  if (info.reason === "destroyed") return;
285
- for (const cb of lostCallbacks.get(device) ?? []) cb(info);
301
+ for (const cb of [...lostCallbacks.get(device) ?? []]) cb(info);
286
302
  });
287
303
  }
288
- if (onDeviceLost) callbacks.add(onDeviceLost);
304
+ if (!onDeviceLost) return () => {};
305
+ const set = callbacks;
306
+ set.add(onDeviceLost);
307
+ return () => set.delete(onDeviceLost);
289
308
  }
290
309
  function structuralHash(inputs) {
291
310
  let h = 2166136261;
@@ -387,7 +406,8 @@ function createPassManager(root, options) {
387
406
  const { textureManager, dispatcher } = options;
388
407
  const canvasFormat = options.canvasFormat ?? preferredCanvasFormat();
389
408
  const rttFormat = options.rttFormat ?? "rgba16float";
390
- const maxSampled = options.maxSampledTextures ?? 16;
409
+ const deviceMaxSampled = root.device?.limits?.maxSampledTexturesPerShaderStage;
410
+ const maxSampled = options.maxSampledTextures ?? (typeof deviceMaxSampled === "number" && deviceMaxSampled > 0 ? deviceMaxSampled : 16);
391
411
  const vertex = options.fullScreenTriangle ?? common.fullScreenTriangle;
392
412
  const rttTextures = /* @__PURE__ */ new Map();
393
413
  const liveTextures = /* @__PURE__ */ new Set();
@@ -402,7 +422,7 @@ function createPassManager(root, options) {
402
422
  nearestRepeat: s.nearestRepeat
403
423
  });
404
424
  } catch (e) {
405
- console.error(`[${LABEL}] failed to build sampler bind group:`, e);
425
+ debugError(`[${LABEL}] failed to build sampler bind group:`, e);
406
426
  return;
407
427
  }
408
428
  }
@@ -436,16 +456,16 @@ function createPassManager(root, options) {
436
456
  const media = mediaResources?.[key];
437
457
  const resource = rt ?? media;
438
458
  if (!resource) {
439
- console.error(`[${LABEL}] pass "${fragment.entry}" reads unknown texture "${key}"`);
459
+ debugError(`[${LABEL}] pass "${fragment.entry}" reads unknown texture "${key}"`);
440
460
  return;
441
461
  }
442
462
  entries[key] = resource.texture;
443
463
  }
444
- if (fragment.reads.length > maxSampled) console.warn(`[${LABEL}] pass samples ${fragment.reads.length} textures (> device limit ~${maxSampled}); composition may fail on this device.`);
464
+ if (fragment.reads.length > maxSampled) debugWarn(`[${LABEL}] pass samples ${fragment.reads.length} textures (> device limit ~${maxSampled}); composition may fail on this device.`);
445
465
  try {
446
466
  return root.createBindGroup(fragment.textureLayout, entries);
447
467
  } catch (e) {
448
- console.error(`[${LABEL}] failed to build texture bind group:`, e);
468
+ debugError(`[${LABEL}] failed to build texture bind group:`, e);
449
469
  return;
450
470
  }
451
471
  }
@@ -462,7 +482,7 @@ function createPassManager(root, options) {
462
482
  if (keys.length === 1) {
463
483
  const getSource = externalSources.get(keys[0]);
464
484
  if (!getSource) {
465
- console.error(`[${LABEL}] external read "${keys[0]}" has no registered source`);
485
+ debugError(`[${LABEL}] external read "${keys[0]}" has no registered source`);
466
486
  return;
467
487
  }
468
488
  return textureManager.createExternalTextureBinding({
@@ -552,7 +572,7 @@ function createPassManager(root, options) {
552
572
  const bg = pass.externalBinding?.update() ?? null;
553
573
  if (!bg) {
554
574
  if (!pass.externalSkipLogged) {
555
- console.warn(`[${LABEL}] external texture not ready — skipping pass (${pass.fragment.externalReads.join(", ")})`);
575
+ debugWarn(`[${LABEL}] external texture not ready — skipping pass (${pass.fragment.externalReads.join(", ")})`);
556
576
  pass.externalSkipLogged = true;
557
577
  }
558
578
  return;
@@ -1141,6 +1161,8 @@ var PerformanceTracker = class {
1141
1161
  this.lastGpuTime = null;
1142
1162
  }
1143
1163
  };
1164
+ var MAX_UNCAPTURED_VALIDATION_ERRORS = 32;
1165
+ var MAX_CONSECUTIVE_RENDER_ERRORS = 5;
1144
1166
  var globalEventManager = (() => {
1145
1167
  let instanceCount = 0;
1146
1168
  const callbacks = /* @__PURE__ */ new Set();
@@ -1149,7 +1171,7 @@ var globalEventManager = (() => {
1149
1171
  try {
1150
1172
  cb[key](arg);
1151
1173
  } catch (error) {
1152
- console.error("[Shaders] Error in pointer handler:", error);
1174
+ debugError("[Shaders] Error in pointer handler:", error);
1153
1175
  }
1154
1176
  });
1155
1177
  };
@@ -1261,6 +1283,13 @@ function shaderRendererGPU() {
1261
1283
  let firstRenderPending = false;
1262
1284
  let onDeviceLostCallback = null;
1263
1285
  let deviceLostFired = false;
1286
+ let failureReason = null;
1287
+ let onUnavailableCallback = null;
1288
+ let hasNotifiedUnavailable = false;
1289
+ let uncapturedErrorDevice = null;
1290
+ let uncapturedErrorHandler = null;
1291
+ let uncapturedValidationErrors = 0;
1292
+ let consecutiveRenderErrors = 0;
1264
1293
  const performanceTracker = new PerformanceTracker();
1265
1294
  const frameParams = {
1266
1295
  deltaTime: 0,
@@ -1351,7 +1380,7 @@ function shaderRendererGPU() {
1351
1380
  aspectRatio: aspectRatio()
1352
1381
  };
1353
1382
  };
1354
- const bboxActive = (node) => !!node.metadata.boundingBox && !!node.boundingBoxDeclaration;
1383
+ const bboxActive = (node) => !!node.metadata.boundingBox && !!node.boundingBoxDeclaration && !isIdentityBoundingBox(node.metadata.boundingBox);
1355
1384
  const computeNodeBoundsUV = (node) => {
1356
1385
  const decl = node.boundingBoxDeclaration;
1357
1386
  if (!decl || !node.uniforms) return null;
@@ -1756,7 +1785,7 @@ function shaderRendererGPU() {
1756
1785
  const parts = [];
1757
1786
  for (const [id, node] of nodes) {
1758
1787
  const m = node.metadata;
1759
- if (node.hasUvRemap || node.acceptsUVContext) parts.push(`aopac:${id}:${(m.opacity ?? 1) < 1}`);
1788
+ parts.push(`aopac:${id}:${(m.opacity ?? 1) < 1}`);
1760
1789
  const sc = node.uniforms.stopCount?.value;
1761
1790
  if (typeof sc === "number") parts.push(`stops:${id}:${sc > 1 ? sc : 0}`);
1762
1791
  for (const [prop, u] of Object.entries(node.uniforms)) {
@@ -1816,17 +1845,17 @@ function shaderRendererGPU() {
1816
1845
  try {
1817
1846
  for (const cb of bc.ir.onCleanup) cb();
1818
1847
  } catch (e) {
1819
- console.error("[gpu] composition onCleanup error:", e);
1848
+ debugError("[gpu] composition onCleanup error:", e);
1820
1849
  }
1821
1850
  try {
1822
1851
  bc.passManager.dispose();
1823
1852
  } catch (e) {
1824
- console.error("[gpu] passManager dispose error:", e);
1853
+ debugError("[gpu] passManager dispose error:", e);
1825
1854
  }
1826
1855
  try {
1827
1856
  bc.store.destroy();
1828
1857
  } catch (e) {
1829
- console.error("[gpu] store destroy error:", e);
1858
+ debugError("[gpu] store destroy error:", e);
1830
1859
  }
1831
1860
  liveCompositions.delete(bc);
1832
1861
  if (boundComposition === bc) boundComposition = null;
@@ -1858,6 +1887,7 @@ function shaderRendererGPU() {
1858
1887
  requestRender();
1859
1888
  };
1860
1889
  const requestRender = () => {
1890
+ if (failureReason) return;
1861
1891
  if (frameLoop.running) return;
1862
1892
  if (pendingRenderRAF !== null) return;
1863
1893
  if (typeof requestAnimationFrame !== "function") return;
@@ -1867,6 +1897,7 @@ function shaderRendererGPU() {
1867
1897
  });
1868
1898
  };
1869
1899
  const registerNode = (id, fragmentNodeFunc, parentId, metadata, uniforms = {}, componentDefinition, domCanvas) => {
1900
+ if (failureReason) return;
1870
1901
  if (fragmentNodeFunc === null) {
1871
1902
  const queueIndex = pendingRegistrationQueue.findIndex((item) => item.id === id);
1872
1903
  if (queueIndex !== -1) {
@@ -2017,7 +2048,7 @@ function shaderRendererGPU() {
2017
2048
  const newOpacity = metadata.opacity;
2018
2049
  node.metadata.opacity = newOpacity;
2019
2050
  writeSyntheticScalar(node, "_opacity", newOpacity);
2020
- if ((node.hasUvRemap || node.acceptsUVContext) && oldOpacity >= 1 !== newOpacity >= 1) needsRecompose = true;
2051
+ if (oldOpacity >= 1 !== newOpacity >= 1) needsRecompose = true;
2021
2052
  }
2022
2053
  if (metadata.renderOrder !== void 0 && node.metadata.renderOrder !== metadata.renderOrder) {
2023
2054
  node.metadata.renderOrder = metadata.renderOrder;
@@ -2104,10 +2135,12 @@ function shaderRendererGPU() {
2104
2135
  if (metadata.boundingBox !== void 0 && metadata.boundingBox !== null && node.boundingBoxDeclaration !== void 0) {
2105
2136
  const wasActive = bboxActive(node);
2106
2137
  node.metadata.boundingBox = metadata.boundingBox;
2107
- if (wasActive) {
2138
+ const nowActive = bboxActive(node);
2139
+ if (wasActive !== nowActive) needsRecompose = true;
2140
+ else if (nowActive) {
2108
2141
  const bb = bboxFieldValues(node);
2109
2142
  if (bb) for (const [k, v] of Object.entries(bb)) writeSyntheticScalar(node, `_bbox_${k}`, v);
2110
- } else needsRecompose = true;
2143
+ }
2111
2144
  } else if (metadata.boundingBox === null) {
2112
2145
  if (node.metadata.boundingBox !== void 0) {
2113
2146
  node.metadata.boundingBox = void 0;
@@ -2287,7 +2320,7 @@ function shaderRendererGPU() {
2287
2320
  height: bufH
2288
2321
  });
2289
2322
  } catch (e) {
2290
- console.error("[gpu] composition onResize error:", e);
2323
+ debugError("[gpu] composition onResize error:", e);
2291
2324
  }
2292
2325
  for (const node of nodes.values()) {
2293
2326
  if (transformActive(node)) writeSyntheticScalar(node, "_xform_aspectRatio", aspectRatio());
@@ -2371,11 +2404,11 @@ function shaderRendererGPU() {
2371
2404
  for (const cb of callbacks) try {
2372
2405
  cb(frameParams);
2373
2406
  } catch (e) {
2374
- console.error("[gpu] render callback error:", e);
2407
+ debugError("[gpu] render callback error:", e);
2375
2408
  }
2376
2409
  };
2377
2410
  const renderFrameInternal = (overrideDeltaTime) => {
2378
- if (!canRender()) return;
2411
+ if (failureReason || !canRender()) return;
2379
2412
  const now = performance.now();
2380
2413
  let delta;
2381
2414
  if (overrideDeltaTime !== void 0) delta = overrideDeltaTime;
@@ -2398,29 +2431,29 @@ function shaderRendererGPU() {
2398
2431
  frameParams.dimensions.height = currentHeight;
2399
2432
  let built = null;
2400
2433
  let renderComp = null;
2401
- runFrameSequence({
2402
- updateDrivers: () => {
2403
- updateMouseDrivers();
2404
- updateAnimatedTime();
2405
- updateChildBounds();
2406
- },
2407
- ensureComposition: () => {
2408
- if (structuralDirty || desiredHash === null) {
2409
- desiredHash = computeStructuralHash();
2410
- structuralDirty = false;
2411
- }
2412
- if (desiredHash === null) return false;
2413
- built = pipelineCache.getOrBuild(desiredHash, () => buildComposition(desiredHash));
2414
- bindComposition(built);
2415
- return !!boundComposition;
2416
- },
2417
- beforeRender: () => runCallbacks(boundComposition.ir.onBeforeRender),
2418
- flush: () => {
2419
- writeSystemUniforms(boundComposition.store);
2420
- boundComposition.store.flush();
2421
- },
2422
- render: () => {
2423
- try {
2434
+ try {
2435
+ runFrameSequence({
2436
+ updateDrivers: () => {
2437
+ updateMouseDrivers();
2438
+ updateAnimatedTime();
2439
+ updateChildBounds();
2440
+ },
2441
+ ensureComposition: () => {
2442
+ if (structuralDirty || desiredHash === null) {
2443
+ desiredHash = computeStructuralHash();
2444
+ structuralDirty = false;
2445
+ }
2446
+ if (desiredHash === null) return false;
2447
+ built = pipelineCache.getOrBuild(desiredHash, () => buildComposition(desiredHash));
2448
+ bindComposition(built);
2449
+ return !!boundComposition;
2450
+ },
2451
+ beforeRender: () => runCallbacks(boundComposition.ir.onBeforeRender),
2452
+ flush: () => {
2453
+ writeSystemUniforms(boundComposition.store);
2454
+ boundComposition.store.flush();
2455
+ },
2456
+ render: () => {
2424
2457
  if (enablePerformanceTracking) performance.mark("shader-gpu-start");
2425
2458
  renderComp = pipelineCache.renderValue ?? built;
2426
2459
  renderComp?.passManager.render(context, frameParams);
@@ -2435,20 +2468,22 @@ function shaderRendererGPU() {
2435
2468
  performance.clearMarks("shader-gpu-end");
2436
2469
  } catch {}
2437
2470
  }
2438
- } catch (error) {
2439
- console.error("[gpu] render frame error:", error);
2440
- }
2441
- },
2442
- markReady: () => {
2443
- pipelineCache.markReady(desiredHash);
2444
- if (firstRenderPending && !hasEmittedReady) {
2445
- hasEmittedReady = true;
2446
- firstRenderPending = false;
2447
- if (onReadyCallback) queueMicrotask(onReadyCallback);
2448
- }
2449
- },
2450
- afterRender: () => runCallbacks((renderComp ?? boundComposition).ir.onAfterRender)
2451
- });
2471
+ },
2472
+ markReady: () => {
2473
+ pipelineCache.markReady(desiredHash);
2474
+ if (firstRenderPending && !hasEmittedReady) {
2475
+ hasEmittedReady = true;
2476
+ firstRenderPending = false;
2477
+ if (onReadyCallback) queueMicrotask(onReadyCallback);
2478
+ }
2479
+ },
2480
+ afterRender: () => runCallbacks((renderComp ?? boundComposition).ir.onAfterRender)
2481
+ });
2482
+ consecutiveRenderErrors = 0;
2483
+ } catch (error) {
2484
+ noteRenderFailure(error);
2485
+ return;
2486
+ }
2452
2487
  if (enablePerformanceTracking) {
2453
2488
  performance.mark("shader-cpu-end");
2454
2489
  try {
@@ -2463,21 +2498,22 @@ function shaderRendererGPU() {
2463
2498
  performanceTracker.recordFrame(performance.now() - now);
2464
2499
  };
2465
2500
  const renderFrame = () => renderFrameInternal(void 0);
2466
- const renderAndWait = async () => {
2501
+ const renderAndWait = async (options) => {
2502
+ if (failureReason) return;
2467
2503
  if (!canRender()) throw new Error("Renderer is not ready");
2468
2504
  const wasAnimating = frameLoop.running;
2469
2505
  if (wasAnimating) stopAnimation();
2470
2506
  lastRenderTime = 0;
2471
2507
  renderFrame();
2472
- if (root) await awaitGpuIdle(root);
2508
+ if (root && options?.waitForGpu !== false) await awaitGpuIdle(root);
2473
2509
  if (wasAnimating) startAnimation();
2474
2510
  };
2475
- const renderSyntheticFrame = async (deltaSeconds) => {
2511
+ const renderSyntheticFrame = async (deltaSeconds, options) => {
2476
2512
  renderFrameInternal(deltaSeconds);
2477
- if (root) await awaitGpuIdle(root);
2513
+ if (root && options?.waitForGpu !== false) await awaitGpuIdle(root);
2478
2514
  };
2479
2515
  const startAnimation = () => {
2480
- if (frameLoop.running || !shouldAnimate) return;
2516
+ if (failureReason || frameLoop.running || !shouldAnimate) return;
2481
2517
  performanceTracker.setRendering(true);
2482
2518
  frameLoop.start();
2483
2519
  };
@@ -2587,22 +2623,94 @@ function shaderRendererGPU() {
2587
2623
  pendingRegistrationQueue = [];
2588
2624
  for (const q of queue) registerNode(q.id, q.definition.fragment, q.parentId, q.metadata, q.uniforms, q.definition, q.domCanvas);
2589
2625
  };
2626
+ const fail = (reason, error) => {
2627
+ if (failureReason) return;
2628
+ failureReason = reason;
2629
+ markGpuUnusable(reason);
2630
+ debugError(`[gpu] renderer stopped (${reason}):`, error);
2631
+ try {
2632
+ cleanup();
2633
+ } catch (e) {
2634
+ debugError("[gpu] cleanup during failure threw:", e);
2635
+ }
2636
+ if (!hasNotifiedUnavailable && onUnavailableCallback) {
2637
+ hasNotifiedUnavailable = true;
2638
+ const cb = onUnavailableCallback;
2639
+ queueMicrotask(() => {
2640
+ try {
2641
+ cb(reason, error);
2642
+ } catch (e) {
2643
+ debugError("[gpu] onUnavailable callback threw:", e);
2644
+ }
2645
+ });
2646
+ }
2647
+ };
2648
+ const noteRenderFailure = (error) => {
2649
+ if (isGpuUnavailableError(error)) {
2650
+ fail(error.reason, error);
2651
+ return;
2652
+ }
2653
+ consecutiveRenderErrors++;
2654
+ if (consecutiveRenderErrors === 1) debugError("[gpu] render error:", error);
2655
+ if (consecutiveRenderErrors >= MAX_CONSECUTIVE_RENDER_ERRORS) fail("render-failed", error);
2656
+ };
2657
+ const attachUncapturedErrorHandler = (device) => {
2658
+ if (!device || typeof device.addEventListener !== "function") return;
2659
+ detachUncapturedErrorHandler();
2660
+ uncapturedErrorDevice = device;
2661
+ uncapturedErrorHandler = (event) => {
2662
+ try {
2663
+ event.preventDefault();
2664
+ } catch {}
2665
+ const gpuError = event.error;
2666
+ debugError("[gpu] uncaptured device error:", gpuError);
2667
+ if (typeof GPUOutOfMemoryError !== "undefined" && gpuError instanceof GPUOutOfMemoryError) {
2668
+ fail("out-of-memory", gpuError);
2669
+ return;
2670
+ }
2671
+ if (typeof GPUInternalError !== "undefined" && gpuError instanceof GPUInternalError) {
2672
+ fail("gpu-error", gpuError);
2673
+ return;
2674
+ }
2675
+ uncapturedValidationErrors++;
2676
+ if (uncapturedValidationErrors >= MAX_UNCAPTURED_VALIDATION_ERRORS) fail("gpu-error", gpuError);
2677
+ };
2678
+ device.addEventListener("uncapturederror", uncapturedErrorHandler);
2679
+ };
2680
+ const detachUncapturedErrorHandler = () => {
2681
+ if (uncapturedErrorDevice && uncapturedErrorHandler) try {
2682
+ uncapturedErrorDevice.removeEventListener("uncapturederror", uncapturedErrorHandler);
2683
+ } catch {}
2684
+ uncapturedErrorDevice = null;
2685
+ uncapturedErrorHandler = null;
2686
+ };
2590
2687
  const fireDeviceLost = (reason) => {
2591
2688
  if (deviceLostFired) return;
2592
2689
  deviceLostFired = true;
2593
2690
  try {
2594
2691
  stopAnimation();
2595
2692
  } catch {}
2596
- if (onDeviceLostCallback) queueMicrotask(() => {
2597
- try {
2598
- onDeviceLostCallback?.(reason);
2599
- } catch (e) {
2600
- console.error("[gpu] onDeviceLost callback threw:", e);
2601
- }
2602
- });
2693
+ if (onDeviceLostCallback) {
2694
+ const cb = onDeviceLostCallback;
2695
+ queueMicrotask(() => {
2696
+ try {
2697
+ cb(reason);
2698
+ } catch (e) {
2699
+ debugError("[gpu] onDeviceLost callback threw:", e);
2700
+ }
2701
+ });
2702
+ return;
2703
+ }
2704
+ fail("device-lost", reason);
2603
2705
  };
2604
2706
  const initialize = async (options) => {
2605
2707
  if (options.context !== void 0) throw new Error("[gpu] initialize({ context }) is not supported — this renderer is WebGPU-only. Remove the WebGL `context` option.");
2708
+ if (failureReason) return;
2709
+ const pageWide = getGpuUnusableReason();
2710
+ if (pageWide) {
2711
+ fail(pageWide);
2712
+ return;
2713
+ }
2606
2714
  if (isInitialized || isInitializing) return;
2607
2715
  const { canvas, resizeTarget, enablePerformanceTracking: enableTracking = false, colorSpace = "p3-linear", toneMapping = "linear", gpu, forceFullFrameRate: forceFullFps = false, observeElement: shouldObserveElement = true, timeOrigin: initialTimeOrigin } = options;
2608
2716
  if (initialTimeOrigin != null) sharedTimeOrigin = initialTimeOrigin;
@@ -2625,6 +2733,7 @@ function shaderRendererGPU() {
2625
2733
  });
2626
2734
  if (abort.signal.aborted) return;
2627
2735
  root = rootCtx.root;
2736
+ attachUncapturedErrorHandler(root.device);
2628
2737
  pixelRatio = basePixelRatio();
2629
2738
  const lim = root.device.limits?.maxTextureDimension2D;
2630
2739
  if (typeof lim === "number" && lim > 0) cachedMaxTextureDim = lim;
@@ -2688,7 +2797,11 @@ function shaderRendererGPU() {
2688
2797
  if (currentWidth > 0 && currentHeight > 0) renderFrame();
2689
2798
  if (shouldAnimate) startAnimation();
2690
2799
  } catch (error) {
2691
- console.error("[gpu] initialization error:", error);
2800
+ const reason = isGpuUnavailableError(error) ? error.reason : "init-failed";
2801
+ isInitializing = false;
2802
+ if (initializationAbortController === abort) initializationAbortController = null;
2803
+ fail(reason, error);
2804
+ return;
2692
2805
  } finally {
2693
2806
  isInitializing = false;
2694
2807
  if (initializationAbortController === abort) initializationAbortController = null;
@@ -2721,6 +2834,10 @@ function shaderRendererGPU() {
2721
2834
  pendingRenderRAF = null;
2722
2835
  }
2723
2836
  stopAnimation();
2837
+ detachUncapturedErrorHandler();
2838
+ try {
2839
+ rootCtx?.release?.();
2840
+ } catch {}
2724
2841
  pipelineCache.clear();
2725
2842
  for (const c of [...liveCompositions]) disposeComposition(c);
2726
2843
  boundComposition = null;
@@ -2764,6 +2881,8 @@ function shaderRendererGPU() {
2764
2881
  firstRenderPending = false;
2765
2882
  onDeviceLostCallback = null;
2766
2883
  deviceLostFired = false;
2884
+ uncapturedValidationErrors = 0;
2885
+ consecutiveRenderErrors = 0;
2767
2886
  };
2768
2887
  const getPerformanceStats = () => {
2769
2888
  const nodeCount = Math.max(0, nodes.size - 1);
@@ -2866,6 +2985,21 @@ function shaderRendererGPU() {
2866
2985
  setOnDeviceLost: (callback) => {
2867
2986
  onDeviceLostCallback = callback;
2868
2987
  },
2988
+ setOnUnavailable: (callback) => {
2989
+ onUnavailableCallback = callback;
2990
+ if (callback && failureReason && !hasNotifiedUnavailable) {
2991
+ hasNotifiedUnavailable = true;
2992
+ const reason = failureReason;
2993
+ queueMicrotask(() => {
2994
+ try {
2995
+ callback(reason);
2996
+ } catch (e) {
2997
+ debugError("[gpu] onUnavailable callback threw:", e);
2998
+ }
2999
+ });
3000
+ }
3001
+ },
3002
+ getFailureReason: () => failureReason,
2869
3003
  __testing: {
2870
3004
  needsTransformation,
2871
3005
  findChildNodes,
@@ -2957,12 +3091,12 @@ function createRendererFromJSON(preset, options) {
2957
3091
  registerPresetNodes();
2958
3092
  coreRenderer.stopAnimation();
2959
3093
  }
2960
- async function renderFrame() {
3094
+ async function renderFrame(options$1) {
2961
3095
  if (!coreRenderer.isInitialized()) {
2962
- console.warn("[presetRenderer] Renderer not yet initialized, skipping frame");
3096
+ debugWarn("[presetRenderer] Renderer not yet initialized, skipping frame");
2963
3097
  return;
2964
3098
  }
2965
- await coreRenderer.renderAndWait();
3099
+ await coreRenderer.renderAndWait(options$1);
2966
3100
  }
2967
3101
  function updatePreset(newPreset) {
2968
3102
  nodeIdMap.forEach((_, nodeId) => {
@@ -3031,7 +3165,9 @@ function createRendererFromJSON(preset, options) {
3031
3165
  renderFrame,
3032
3166
  updatePreset,
3033
3167
  getGPUContext,
3034
- dispose
3168
+ dispose,
3169
+ setOnUnavailable: coreRenderer.setOnUnavailable,
3170
+ getFailureReason: coreRenderer.getFailureReason
3035
3171
  };
3036
3172
  }
3037
3173
  function resolveMaskDependencies(nodes) {
@@ -3111,41 +3247,4 @@ const boxLocalToScreenUV = (bx, by, g) => {
3111
3247
  y: sqy + g.centerY
3112
3248
  };
3113
3249
  };
3114
- const DEFAULT_BOUNDING_BOX = {
3115
- x: {
3116
- value: 0,
3117
- unit: "uv"
3118
- },
3119
- y: {
3120
- value: 0,
3121
- unit: "uv"
3122
- },
3123
- width: {
3124
- value: 1,
3125
- unit: "uv"
3126
- },
3127
- height: {
3128
- value: 1,
3129
- unit: "uv"
3130
- },
3131
- origin: "top-left",
3132
- rotation: 0
3133
- };
3134
- function resolveBoundingBox(bbox) {
3135
- if (!bbox || typeof bbox !== "object") return void 0;
3136
- const dim = (d$1, fallback) => d$1 && typeof d$1 === "object" ? {
3137
- value: d$1.value ?? fallback.value,
3138
- unit: d$1.unit ?? fallback.unit
3139
- } : { ...fallback };
3140
- return {
3141
- x: dim(bbox.x, DEFAULT_BOUNDING_BOX.x),
3142
- y: dim(bbox.y, DEFAULT_BOUNDING_BOX.y),
3143
- width: dim(bbox.width, DEFAULT_BOUNDING_BOX.width),
3144
- height: dim(bbox.height, DEFAULT_BOUNDING_BOX.height),
3145
- origin: bbox.origin ?? "top-left",
3146
- rotation: bbox.rotation ?? 0,
3147
- ...bbox.cornerRadius ? { cornerRadius: bbox.cornerRadius } : {},
3148
- ...bbox.lockAspect !== void 0 ? { lockAspect: bbox.lockAspect } : {}
3149
- };
3150
- }
3151
- export { DEFAULT_BOUNDING_BOX, MAX_COLOR_STOPS, SHAPE3D_DEFAULTS, SHAPE3D_TYPES, SVG3D_DEFAULTS, SVG3D_TYPES, boxLocalToScreenUV, createGpuUniformsMap, createRendererFromJSON, is3dShapeType, isDimensionalValue, isSvg3dShapeType, isVolumetricShapeType, resolveBoundingBox, resolveMaskDependencies, resolveStops, rootPassthrough, screenUVToBoxLocal, shaderRendererGPU, shape3dBoundingRadius, sortStops };
3250
+ export { DEFAULT_BOUNDING_BOX, GpuUnavailableError, MAX_COLOR_STOPS, SHAPE3D_DEFAULTS, SHAPE3D_TYPES, SVG3D_DEFAULTS, SVG3D_TYPES, boxLocalToScreenUV, createGpuUniformsMap, createRendererFromJSON, debugError, debugWarn, destroyDefaultGpuDevice, getWebGPUSupport, is3dShapeType, isDimensionalValue, isGpuUnavailableError, isShadersDebug, isSvg3dShapeType, isVolumetricShapeType, isWebGPUSupported, resolveBoundingBox, resolveMaskDependencies, resolveStops, rootPassthrough, screenUVToBoxLocal, setShadersDebug, shaderRendererGPU, shape3dBoundingRadius, sortStops };