@kolkrabbi/design-editor 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/README.md +3 -1
  2. package/dist/BufferResource-CKQMSOM4.js +265 -0
  3. package/dist/CanvasPool-ilDNHrRx.js +30 -0
  4. package/dist/CanvasRenderer-CDbc3nH9.js +3396 -0
  5. package/dist/Geometry-D3fkwmax.js +3724 -0
  6. package/dist/{OrbitControls-BAhLQ5d8.js → OrbitControls-CE3qSrHQ.js} +10260 -9043
  7. package/dist/RenderTargetSystem-umK0aqrs.js +2394 -0
  8. package/dist/WebGLRenderer-DVKPZbKc.js +2145 -0
  9. package/dist/WebGPURenderer-DHSBocAL.js +1656 -0
  10. package/dist/browserAll-CJ593myQ.js +983 -0
  11. package/dist/canvasUtils-CXoNqK7T.js +168 -0
  12. package/dist/defaultFilter.vert-C9efGgir.js +888 -0
  13. package/dist/design-editor.css +2 -2
  14. package/dist/design-editor.js +40809 -26749
  15. package/dist/getTextureBatchBindGroup-ChWkOJ3t.js +19 -0
  16. package/dist/{host-IfZgcJFg.js → host-6EhdLf5-.js} +506 -559
  17. package/dist/{host-Cidlc8xP.js → host-DPFYZP9I.js} +134 -88
  18. package/dist/init-4Y6mtayI.js +441 -0
  19. package/dist/phase-D3rwI6OO.js +1719 -0
  20. package/dist/pipeline-DfTD40M-.js +4825 -0
  21. package/dist/rolldown-runtime-B0aSnxlc.js +20 -0
  22. package/dist/src-zDOFeQWX.js +4314 -0
  23. package/dist/webworkerAll-wTH3MKcZ.js +2 -0
  24. package/package.json +26 -21
  25. package/dist/favicon/favicon.svg +0 -12
  26. package/dist/fonts/Right-Grotesk/PPRightGrotesk-Black.woff2 +0 -0
  27. package/dist/fonts/Right-Grotesk/PPRightGrotesk-BlackItalic.woff2 +0 -0
  28. package/dist/fonts/Right-Grotesk/PPRightGrotesk-Bold.woff2 +0 -0
  29. package/dist/fonts/Right-Grotesk/PPRightGrotesk-BoldItalic.woff2 +0 -0
  30. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBlack.woff2 +0 -0
  31. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBlackItalic.woff2 +0 -0
  32. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBold.woff2 +0 -0
  33. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBoldItalic.woff2 +0 -0
  34. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactDark.woff2 +0 -0
  35. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactDarkItalic.woff2 +0 -0
  36. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactFine.woff2 +0 -0
  37. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactFineItalic.woff2 +0 -0
  38. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactLight.woff2 +0 -0
  39. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactLightItalic.woff2 +0 -0
  40. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactMedium.woff2 +0 -0
  41. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactMediumItalic.woff2 +0 -0
  42. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactRegular.woff2 +0 -0
  43. package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactRegularItalic.woff2 +0 -0
  44. package/dist/fonts/Right-Grotesk/PPRightGrotesk-Dark.woff2 +0 -0
  45. package/dist/fonts/Right-Grotesk/PPRightGrotesk-DarkItalic.woff2 +0 -0
  46. package/dist/fonts/Right-Grotesk/PPRightGrotesk-Fine.woff2 +0 -0
  47. package/dist/fonts/Right-Grotesk/PPRightGrotesk-FineItalic.woff2 +0 -0
  48. package/dist/fonts/Right-Grotesk/PPRightGrotesk-Light.woff2 +0 -0
  49. package/dist/fonts/Right-Grotesk/PPRightGrotesk-LightItalic.woff2 +0 -0
  50. package/dist/fonts/Right-Grotesk/PPRightGrotesk-Medium.woff2 +0 -0
  51. package/dist/fonts/Right-Grotesk/PPRightGrotesk-MediumItalic.woff2 +0 -0
  52. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBlack.woff2 +0 -0
  53. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBlackItalic.woff2 +0 -0
  54. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBold.woff2 +0 -0
  55. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBoldItalic.woff2 +0 -0
  56. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowDark.woff2 +0 -0
  57. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowDarkItalic.woff2 +0 -0
  58. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowFine.woff2 +0 -0
  59. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowFineItalic.woff2 +0 -0
  60. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowLight.woff2 +0 -0
  61. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowLightItalic.woff2 +0 -0
  62. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowMedium.woff2 +0 -0
  63. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowMediumItalic.woff2 +0 -0
  64. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowRegular.woff2 +0 -0
  65. package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowRegularItalic.woff2 +0 -0
  66. package/dist/fonts/Right-Grotesk/PPRightGrotesk-Regular.woff2 +0 -0
  67. package/dist/fonts/Right-Grotesk/PPRightGrotesk-RegularItalic.woff2 +0 -0
  68. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBlack.woff2 +0 -0
  69. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBlackItalic.woff2 +0 -0
  70. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBold.woff2 +0 -0
  71. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBoldItalic.woff2 +0 -0
  72. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialDark.woff2 +0 -0
  73. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialDarkItalic.woff2 +0 -0
  74. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialFine.woff2 +0 -0
  75. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialFineItalic.woff2 +0 -0
  76. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialLight.woff2 +0 -0
  77. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialLightItalic.woff2 +0 -0
  78. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialMedium.woff2 +0 -0
  79. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialMediumItalic.woff2 +0 -0
  80. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialRegular.woff2 +0 -0
  81. package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialRegularItalic.woff2 +0 -0
  82. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBlack.woff2 +0 -0
  83. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBlackItalic.woff2 +0 -0
  84. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBold.woff2 +0 -0
  85. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBoldItalic.woff2 +0 -0
  86. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallDark.woff2 +0 -0
  87. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallDarkItalic.woff2 +0 -0
  88. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallFine.woff2 +0 -0
  89. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallFineItalic.woff2 +0 -0
  90. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallLight.woff2 +0 -0
  91. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallLightItalic.woff2 +0 -0
  92. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallMedium.woff2 +0 -0
  93. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallMediumItalic.woff2 +0 -0
  94. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallRegular.woff2 +0 -0
  95. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallRegularItalic.woff2 +0 -0
  96. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBlack.woff2 +0 -0
  97. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBlackItalic.woff2 +0 -0
  98. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBold.woff2 +0 -0
  99. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBoldItalic.woff2 +0 -0
  100. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightDark.woff2 +0 -0
  101. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightDarkItalic.woff2 +0 -0
  102. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightFine.woff2 +0 -0
  103. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightFineItalic.woff2 +0 -0
  104. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightLight.woff2 +0 -0
  105. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightLightItalic.woff2 +0 -0
  106. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightMedium.woff2 +0 -0
  107. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightMediumItalic.woff2 +0 -0
  108. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightRegular.woff2 +0 -0
  109. package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightRegularItalic.woff2 +0 -0
  110. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBlack.woff2 +0 -0
  111. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBlackItalic.woff2 +0 -0
  112. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBold.woff2 +0 -0
  113. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBoldItalic.woff2 +0 -0
  114. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideDark.woff2 +0 -0
  115. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideDarkItalic.woff2 +0 -0
  116. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideFine.woff2 +0 -0
  117. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideFineItalic.woff2 +0 -0
  118. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideLight.woff2 +0 -0
  119. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideLightItalic.woff2 +0 -0
  120. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideMedium.woff2 +0 -0
  121. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideMediumItalic.woff2 +0 -0
  122. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideRegular.woff2 +0 -0
  123. package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideRegularItalic.woff2 +0 -0
  124. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Bold.woff2 +0 -0
  125. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-BoldItalic.woff2 +0 -0
  126. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Dark.woff2 +0 -0
  127. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Fine.woff2 +0 -0
  128. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-FineItalic.woff2 +0 -0
  129. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Light.woff2 +0 -0
  130. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Medium.woff2 +0 -0
  131. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Regular.woff2 +0 -0
  132. package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-RegularItalic.woff2 +0 -0
  133. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactLight.woff2 +0 -0
  134. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactLightItalic.woff2 +0 -0
  135. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactMedium.woff2 +0 -0
  136. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactMediumItalic.woff2 +0 -0
  137. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-Regular.woff2 +0 -0
  138. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-RegularItalic.woff2 +0 -0
  139. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialBold.woff2 +0 -0
  140. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialBoldItalic.woff2 +0 -0
  141. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialLight.woff2 +0 -0
  142. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialLightItalic.woff2 +0 -0
  143. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-WideBold.woff2 +0 -0
  144. package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-WideBoldItalic.woff2 +0 -0
  145. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Black.ttf +0 -0
  146. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-BlackItalic.ttf +0 -0
  147. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Bold.ttf +0 -0
  148. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-BoldItalic.ttf +0 -0
  149. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBlack.ttf +0 -0
  150. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBlackItalic.ttf +0 -0
  151. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBold.ttf +0 -0
  152. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBoldItalic.ttf +0 -0
  153. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactDark.ttf +0 -0
  154. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactDarkItalic.ttf +0 -0
  155. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactFine.ttf +0 -0
  156. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactFineItalic.ttf +0 -0
  157. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactLight.ttf +0 -0
  158. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactLightItalic.ttf +0 -0
  159. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactMedium.ttf +0 -0
  160. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactMediumItalic.ttf +0 -0
  161. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactRegular.ttf +0 -0
  162. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactRegularItalic.ttf +0 -0
  163. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Dark.ttf +0 -0
  164. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-DarkItalic.ttf +0 -0
  165. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Fine.ttf +0 -0
  166. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-FineItalic.ttf +0 -0
  167. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Light.ttf +0 -0
  168. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-LightItalic.ttf +0 -0
  169. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Medium.ttf +0 -0
  170. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-MediumItalic.ttf +0 -0
  171. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBlack.ttf +0 -0
  172. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBlackItalic.ttf +0 -0
  173. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBold.ttf +0 -0
  174. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBoldItalic.ttf +0 -0
  175. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowDark.ttf +0 -0
  176. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowDarkItalic.ttf +0 -0
  177. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowFine.ttf +0 -0
  178. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowFineItalic.ttf +0 -0
  179. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowLight.ttf +0 -0
  180. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowLightItalic.ttf +0 -0
  181. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowMedium.ttf +0 -0
  182. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowMediumItalic.ttf +0 -0
  183. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowRegular.ttf +0 -0
  184. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowRegularItalic.ttf +0 -0
  185. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Regular.ttf +0 -0
  186. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-RegularItalic.ttf +0 -0
  187. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBlack.ttf +0 -0
  188. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBlackItalic.ttf +0 -0
  189. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBold.ttf +0 -0
  190. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBoldItalic.ttf +0 -0
  191. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialDark.ttf +0 -0
  192. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialDarkItalic.ttf +0 -0
  193. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialFine.ttf +0 -0
  194. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialFineItalic.ttf +0 -0
  195. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialLight.ttf +0 -0
  196. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialLightItalic.ttf +0 -0
  197. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialMedium.ttf +0 -0
  198. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialMediumItalic.ttf +0 -0
  199. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialRegular.ttf +0 -0
  200. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialRegularItalic.ttf +0 -0
  201. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBlack.ttf +0 -0
  202. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBlackItalic.ttf +0 -0
  203. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBold.ttf +0 -0
  204. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBoldItalic.ttf +0 -0
  205. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallDark.ttf +0 -0
  206. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallDarkItalic.ttf +0 -0
  207. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallFine.ttf +0 -0
  208. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallFineItalic.ttf +0 -0
  209. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallLight.ttf +0 -0
  210. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallLightItalic.ttf +0 -0
  211. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallMedium.ttf +0 -0
  212. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallMediumItalic.ttf +0 -0
  213. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallRegular.ttf +0 -0
  214. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallRegularItalic.ttf +0 -0
  215. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBlack.ttf +0 -0
  216. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBlackItalic.ttf +0 -0
  217. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBold.ttf +0 -0
  218. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBoldItalic.ttf +0 -0
  219. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightDark.ttf +0 -0
  220. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightDarkItalic.ttf +0 -0
  221. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightFine.ttf +0 -0
  222. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightFineItalic.ttf +0 -0
  223. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightLight.ttf +0 -0
  224. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightLightItalic.ttf +0 -0
  225. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightMedium.ttf +0 -0
  226. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightMediumItalic.ttf +0 -0
  227. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightRegular.ttf +0 -0
  228. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightRegularItalic.ttf +0 -0
  229. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBlack.ttf +0 -0
  230. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBlackItalic.ttf +0 -0
  231. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBold.ttf +0 -0
  232. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBoldItalic.ttf +0 -0
  233. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideDark.ttf +0 -0
  234. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideDarkItalic.ttf +0 -0
  235. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideFine.ttf +0 -0
  236. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideFineItalic.ttf +0 -0
  237. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideLight.ttf +0 -0
  238. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideLightItalic.ttf +0 -0
  239. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideMedium.ttf +0 -0
  240. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideMediumItalic.ttf +0 -0
  241. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideRegular.ttf +0 -0
  242. package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideRegularItalic.ttf +0 -0
  243. package/dist/fonts/TG/TGGullhamrarVF.ttf +0 -0
  244. package/dist/fonts/TG/TGMalromurRomanVF.ttf +0 -0
  245. package/dist/fonts/TG/TGRotVF.ttf +0 -0
  246. package/dist/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2 +0 -0
  247. package/dist/fonts/jetbrains-mono/JetBrainsMono-MediumItalic.woff2 +0 -0
  248. package/dist/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2 +0 -0
  249. package/dist/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2 +0 -0
  250. package/dist/meshPalettes-BJODHYrY.js +0 -892
@@ -1,8 +1,8 @@
1
- import { B as e, D as t, K as n, L as r, O as i, W as a, at as o, c as s, d as c, it as l, k as u, l as d, nt as f, o as p, p as m, rt as h, s as g, t as _, tt as v, z as y } from "./OrbitControls-BAhLQ5d8.js";
1
+ import { G as e, M as t, N as n, U as r, W as i, X as a, Y as o, a as s, at as c, ct as l, d as u, f as d, g as f, h as p, j as m, ot as h, p as g, st as _, t as v, u as y } from "./OrbitControls-CE3qSrHQ.js";
2
2
  //#region src/filters/gl/synthBase.js
3
3
  var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position.xy, 0.0, 1.0);\n }\n", x = class {
4
4
  constructor(e, { autoLoop: t = !1 } = {}) {
5
- this.canvas = e, this.autoLoop = t, this.renderer = new o({
5
+ this.canvas = e, this.autoLoop = t, this.renderer = new s({
6
6
  canvas: e,
7
7
  antialias: !0,
8
8
  preserveDrawingBuffer: !0,
@@ -11,8 +11,8 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
11
11
  }
12
12
  setSource(e) {
13
13
  this.tex && this.tex.dispose();
14
- let t = new d(e);
15
- t.minFilter = i, t.magFilter = i, t.wrapS = c, t.wrapT = c, this.tex = t, this.imageAspect = (e.width || 1) / (e.height || 1), this._onImage?.();
14
+ let n = new g(e);
15
+ n.minFilter = t, n.magFilter = t, n.wrapS = p, n.wrapT = p, this.tex = n, this.imageAspect = (e.width || 1) / (e.height || 1), this._onImage?.();
16
16
  }
17
17
  touchSource() {
18
18
  this.tex && (this.tex.needsUpdate = !0);
@@ -76,20 +76,20 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
76
76
  this._raf && cancelAnimationFrame(this._raf), this._raf = null, this._dispose?.(), this.tex && this.tex.dispose(), this.renderer.dispose();
77
77
  }
78
78
  }, S = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uPrev;\n uniform sampler2D uImage;\n uniform vec2 uScale;\n uniform vec2 uOffset;\n uniform float uDecay;\n uniform float uTaps; // active heads (1..4)\n uniform float uZoom; // per-step feedback zoom\n uniform float uRot; // per-step rotation, rad\n uniform float uDrift; // per-step radial offset (chromatic convergence)\n uniform float uChroma; // per-head colour amount (0 = mono, 1 = full tint)\n uniform float uMix; // live source contribution (0 = pure feedback)\n uniform vec4 uGap; // per-head spacing multipliers (even/triplet/shift)\n uniform vec2 uOrigin; // feedback transform centre (the tunnel vanishing point)\n\n vec3 head(float g, vec3 tint, float on) {\n vec2 c = vUv - uOrigin;\n float a = uRot * g;\n float s = sin(a), co = cos(a);\n c = mat2(co, -s, s, co) * c;\n c *= pow(uZoom, g);\n c += normalize(c + 1e-4) * (uDrift * g);\n vec3 col = texture2D(uPrev, c + uOrigin).rgb;\n return mix(col, col * tint, uChroma) * on;\n }\n\n void main() {\n vec3 fbk = vec3(0.0);\n fbk += head(uGap.x, vec3(1.0, 0.25, 0.20), step(0.5, uTaps));\n fbk += head(uGap.y, vec3(0.30, 1.0, 0.35), step(1.5, uTaps));\n fbk += head(uGap.z, vec3(0.35, 0.50, 1.0), step(2.5, uTaps));\n fbk += head(uGap.w, vec3(1.0, 0.72, 0.25), step(3.5, uTaps));\n fbk = fbk / max(1.0, uTaps) * uDecay;\n vec3 src = texture2D(uImage, vUv * uScale + uOffset).rgb;\n gl_FragColor = vec4(clamp(max(fbk, src * uMix), 0.0, 1.0), 1.0);\n }\n", C = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uTex;\n uniform float uTime;\n uniform float uSat; // saturation boost (1 = none)\n uniform float uLock; // 70s palette colorize mix (0 = off)\n uniform float uHue; // hue cycle speed (0 = off)\n uniform float uGain; // output brightness (1 = none)\n vec3 satBoost(vec3 c, float s) { float l = dot(c, vec3(0.299, 0.587, 0.114)); return clamp(mix(vec3(l), c, s), 0.0, 1.0); }\n mat3 hueRot(float a) {\n float c = cos(a), s = sin(a);\n mat3 w = mat3(0.299, 0.299, 0.299, 0.587, 0.587, 0.587, 0.114, 0.114, 0.114);\n mat3 u = mat3(0.701, -0.299, -0.300, -0.587, 0.413, -0.588, -0.114, -0.114, 0.886);\n mat3 v = mat3(0.168, -0.328, 1.250, 0.330, 0.035, -1.050, -0.497, 0.292, -0.203);\n return w + u * c + v * s;\n }\n // Map luma → a vintage 70s ramp: rust · ochre · cream · teal · blue.\n vec3 pal70(float t) {\n t = clamp(t, 0.0, 1.0) * 4.0;\n vec3 a = vec3(0.75, 0.22, 0.17), b = vec3(0.88, 0.54, 0.12), c = vec3(0.95, 0.91, 0.84), d = vec3(0.16, 0.62, 0.56), e = vec3(0.17, 0.37, 0.54);\n if (t < 1.0) return mix(a, b, t);\n if (t < 2.0) return mix(b, c, t - 1.0);\n if (t < 3.0) return mix(c, d, t - 2.0);\n return mix(d, e, t - 3.0);\n }\n void main() {\n vec3 col = texture2D(uTex, vUv).rgb;\n if (uHue > 0.001) col = clamp(hueRot(uTime * uHue) * col, 0.0, 1.0);\n col = satBoost(col, uSat);\n col = mix(col, pal70(dot(col, vec3(0.299, 0.587, 0.114))), uLock);\n col = clamp(col * uGain, 0.0, 1.0);\n gl_FragColor = vec4(col, 1.0);\n }\n", w = {
79
- minFilter: i,
80
- magFilter: i,
79
+ minFilter: t,
80
+ magFilter: t,
81
81
  depthBuffer: !1,
82
82
  stencilBuffer: !1
83
83
  }, T = class extends x {
84
84
  _setup() {
85
- this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new a(), this.geo = new e(2, 2), this.rtA = new l(2, 2, w), this.rtB = new l(2, 2, w), this.fbMat = new n({
85
+ this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.rtA = new l(2, 2, w), this.rtB = new l(2, 2, w), this.fbMat = new a({
86
86
  vertexShader: b,
87
87
  fragmentShader: S,
88
88
  uniforms: {
89
89
  uPrev: { value: null },
90
90
  uImage: { value: null },
91
- uScale: { value: new v(1, 1) },
92
- uOffset: { value: new v(0, 0) },
91
+ uScale: { value: new c(1, 1) },
92
+ uOffset: { value: new c(0, 0) },
93
93
  uDecay: { value: .92 },
94
94
  uTaps: { value: 3 },
95
95
  uZoom: { value: 1 },
@@ -97,10 +97,10 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
97
97
  uDrift: { value: .02 },
98
98
  uChroma: { value: .6 },
99
99
  uMix: { value: 1 },
100
- uGap: { value: new h(1, 2, 3, 4) },
101
- uOrigin: { value: new v(.5, .5) }
100
+ uGap: { value: new _(1, 2, 3, 4) },
101
+ uOrigin: { value: new c(.5, .5) }
102
102
  }
103
- }), this.copyMat = new n({
103
+ }), this.copyMat = new a({
104
104
  vertexShader: b,
105
105
  fragmentShader: C,
106
106
  uniforms: {
@@ -111,7 +111,7 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
111
111
  uHue: { value: 0 },
112
112
  uGain: { value: 1 }
113
113
  }
114
- }), this.quad = new u(this.geo, this.fbMat), this.scene.add(this.quad);
114
+ }), this.quad = new n(this.geo, this.fbMat), this.scene.add(this.quad);
115
115
  }
116
116
  _applyFit() {
117
117
  let { sx: e, sy: t, ox: n, oy: r } = this.coverFit();
@@ -182,9 +182,9 @@ function E(e, t, n, r = [
182
182
  //#region src/filters/gl/scanEngine.js
183
183
  var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying vec3 vColor;\n varying float vLuma;\n void main() {\n vec3 c = texture2D(uImage, uv).rgb;\n float luma = dot(c, vec3(0.299, 0.587, 0.114));\n vColor = c;\n vLuma = luma;\n vec3 p = position;\n p.z += (luma - 0.5) * uDisplace;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(p, 1.0);\n }\n", O = "\n precision highp float;\n varying vec3 vColor;\n varying float vLuma;\n uniform float uMono;\n uniform float uOpacity;\n uniform vec3 uTint;\n void main() {\n vec3 col = mix(vColor, uTint * (0.25 + vLuma), uMono);\n gl_FragColor = vec4(col, uOpacity);\n }\n", k = Math.PI * 2, A = class extends x {
184
184
  _setup() {
185
- this.scene = new a(), this.camera = new y(45, 1, .1, 100);
186
- let [e, t, r] = E(0, .4, 3);
187
- this.camera.position.set(e, t, r), this.controls = new _(this.camera, this.canvas), this.controls.enableDamping = !0, this.controls.dampingFactor = .08, this.controls.enablePan = !1, this.controls.minDistance = 1.5, this.controls.maxDistance = 8, this.controls.target.set(0, 0, 0), this.controls.update(), this.mat = new n({
185
+ this.scene = new o(), this.camera = new i(45, 1, .1, 100);
186
+ let [e, t, n] = E(0, .4, 3);
187
+ this.camera.position.set(e, t, n), this.controls = new v(this.camera, this.canvas), this.controls.enableDamping = !0, this.controls.dampingFactor = .08, this.controls.enablePan = !1, this.controls.minDistance = 1.5, this.controls.maxDistance = 8, this.controls.target.set(0, 0, 0), this.controls.update(), this.mat = new a({
188
188
  vertexShader: D,
189
189
  fragmentShader: O,
190
190
  transparent: !0,
@@ -193,20 +193,20 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
193
193
  uDisplace: { value: 1 },
194
194
  uMono: { value: 0 },
195
195
  uOpacity: { value: 1 },
196
- uTint: { value: new m("#9fe7ff") }
196
+ uTint: { value: new f("#9fe7ff") }
197
197
  }
198
- }), this.mesh = null, this.rows = 140, this.cols = 220, this._camKey = "", this._bg = new m("#0b0e13"), this._buildMesh();
198
+ }), this.mesh = null, this.rows = 140, this.cols = 220, this._camKey = "", this._bg = new f("#0b0e13"), this._buildMesh();
199
199
  }
200
200
  _buildMesh() {
201
- let e = Math.max(8, Math.round(this.cols)), n = Math.max(8, Math.round(this.rows)), r = this.imageAspect || 1, i = new Float32Array(e * n * 3), a = new Float32Array(e * n * 2);
202
- for (let t = 0; t < n; t++) for (let o = 0; o < e; o++) {
203
- let s = t * e + o, c = o / (e - 1), l = t / (n - 1);
204
- i[s * 3] = (c - .5) * 2 * r, i[s * 3 + 1] = (.5 - l) * 2, i[s * 3 + 2] = 0, a[s * 2] = c, a[s * 2 + 1] = 1 - l;
201
+ let e = Math.max(8, Math.round(this.cols)), t = Math.max(8, Math.round(this.rows)), n = this.imageAspect || 1, r = new Float32Array(e * t * 3), i = new Float32Array(e * t * 2);
202
+ for (let a = 0; a < t; a++) for (let o = 0; o < e; o++) {
203
+ let s = a * e + o, c = o / (e - 1), l = a / (t - 1);
204
+ r[s * 3] = (c - .5) * 2 * n, r[s * 3 + 1] = (.5 - l) * 2, r[s * 3 + 2] = 0, i[s * 2] = c, i[s * 2 + 1] = 1 - l;
205
205
  }
206
- let o = [];
207
- for (let t = 0; t < n; t++) for (let n = 0; n < e - 1; n++) o.push(t * e + n, t * e + n + 1);
208
- let s = new g();
209
- s.setAttribute("position", new p(i, 3)), s.setAttribute("uv", new p(a, 2)), s.setIndex(o), this.mesh && (this.scene.remove(this.mesh), this.mesh.geometry.dispose()), this.mesh = new t(s, this.mat), this.scene.add(this.mesh);
206
+ let a = [];
207
+ for (let n = 0; n < t; n++) for (let t = 0; t < e - 1; t++) a.push(n * e + t, n * e + t + 1);
208
+ let o = new u();
209
+ o.setAttribute("position", new y(r, 3)), o.setAttribute("uv", new y(i, 2)), o.setIndex(a), this.mesh && (this.scene.remove(this.mesh), this.mesh.geometry.dispose()), this.mesh = new m(o, this.mat), this.scene.add(this.mesh);
210
210
  }
211
211
  _onImage() {
212
212
  this.mat.uniforms.uImage.value = this.tex, this._buildMesh();
@@ -249,9 +249,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
249
249
  case "pull":
250
250
  r *= 1 + .6 * (.5 + .5 * a);
251
251
  break;
252
- default:
253
- t = i;
254
- break;
252
+ default: t = i;
255
253
  }
256
254
  }
257
255
  return n = Math.max(-1.4, Math.min(1.4, n)), {
@@ -276,23 +274,23 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
276
274
  this.controls.dispose(), this.mesh && this.mesh.geometry.dispose(), this.mat.dispose();
277
275
  }
278
276
  }, j = 160, M = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uImage;\n uniform vec2 uScale, uOffset;\n void main() { gl_FragColor = texture2D(uImage, vUv * uScale + uOffset); }\n", N = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uImage;\n uniform vec2 uScale, uOffset;\n uniform float uSlit;\n uniform int uAxis;\n void main() {\n float cross = (uAxis == 0) ? vUv.y : vUv.x;\n vec2 suv = (uAxis == 0) ? vec2(uSlit, cross) : vec2(cross, uSlit);\n gl_FragColor = texture2D(uImage, suv * uScale + uOffset);\n }\n", P = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uStrip, uImage;\n uniform vec2 uScale, uOffset;\n uniform float uHead, uDir, uOrig, uSmooth;\n uniform int uAxis, uMode; // uMode 0 = chop, 1 = finish\n vec2 sUV(float pos, float cross) { return (uAxis == 0) ? vec2(pos, cross) : vec2(cross, pos); }\n float toPos(float along) {\n if (uMode == 1) { float t = (uDir > 0.0) ? along : 1.0 - along; return fract(uHead - t); }\n return (uDir > 0.0) ? along : 1.0 - along;\n }\n void main() {\n float along = (uAxis == 0) ? vUv.x : vUv.y;\n float cross = (uAxis == 0) ? vUv.y : vUv.x;\n float r = uSmooth * 0.03;\n vec4 e = texture2D(uStrip, sUV(toPos(along), cross)) * 0.383\n + (texture2D(uStrip, sUV(toPos(along + r), cross)) + texture2D(uStrip, sUV(toPos(along - r), cross))) * 0.242\n + (texture2D(uStrip, sUV(toPos(along + 2.0 * r), cross)) + texture2D(uStrip, sUV(toPos(along - 2.0 * r), cross))) * 0.0665;\n vec4 s = texture2D(uImage, vUv * uScale + uOffset);\n gl_FragColor = mix(e, s, uOrig);\n }\n", F = {
279
- minFilter: i,
280
- magFilter: i,
277
+ minFilter: t,
278
+ magFilter: t,
281
279
  depthBuffer: !1,
282
280
  stencilBuffer: !1
283
281
  }, I = class extends x {
284
282
  _setup() {
285
- this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new a(), this.geo = new e(2, 2), this.quad = new u(this.geo, null), this.scene.add(this.quad), this.scrollMul = 1, this._acc = 0, this.headPx = 0, this.strip = null;
283
+ this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.quad = new n(this.geo, null), this.scene.add(this.quad), this.scrollMul = 1, this._acc = 0, this.headPx = 0, this.strip = null;
286
284
  let t = () => ({
287
285
  uImage: { value: null },
288
- uScale: { value: new v(1, 1) },
289
- uOffset: { value: new v(0, 0) }
286
+ uScale: { value: new c(1, 1) },
287
+ uOffset: { value: new c(0, 0) }
290
288
  });
291
- this.srcMat = new n({
289
+ this.srcMat = new a({
292
290
  vertexShader: b,
293
291
  fragmentShader: M,
294
292
  uniforms: t()
295
- }), this.slitMat = new n({
293
+ }), this.slitMat = new a({
296
294
  vertexShader: b,
297
295
  fragmentShader: N,
298
296
  uniforms: {
@@ -300,7 +298,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
300
298
  uSlit: { value: .5 },
301
299
  uAxis: { value: 0 }
302
300
  }
303
- }), this.dispMat = new n({
301
+ }), this.dispMat = new a({
304
302
  vertexShader: b,
305
303
  fragmentShader: P,
306
304
  uniforms: {
@@ -386,20 +384,20 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
386
384
  mirrorX: 2,
387
385
  mirrorY: 3,
388
386
  quad: 4
389
- }, ee = class extends x {
387
+ }, z = class extends x {
390
388
  _setup() {
391
- this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new a(), this.geo = new e(2, 2), this.mat = new n({
389
+ this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.mat = new a({
392
390
  vertexShader: b,
393
391
  fragmentShader: L,
394
392
  uniforms: {
395
393
  uImage: { value: null },
396
- uScale: { value: new v(1, 1) },
397
- uOffset: { value: new v(0, 0) },
394
+ uScale: { value: new c(1, 1) },
395
+ uOffset: { value: new c(0, 0) },
398
396
  uTime: { value: 0 },
399
- uOrigin: { value: new v(.5, .5) },
400
- uZoomV: { value: new v(1, 1) },
401
- uPan: { value: new v(0, 0) },
402
- uDrift: { value: new v(0, 0) },
397
+ uOrigin: { value: new c(.5, .5) },
398
+ uZoomV: { value: new c(1, 1) },
399
+ uPan: { value: new c(0, 0) },
400
+ uDrift: { value: new c(0, 0) },
403
401
  uRot: { value: 0 },
404
402
  uSpin: { value: .1 },
405
403
  uTwist: { value: 0 },
@@ -413,7 +411,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
413
411
  uSat: { value: 1 },
414
412
  uLock: { value: 0 }
415
413
  }
416
- }), this.quad = new u(this.geo, this.mat), this.scene.add(this.quad);
414
+ }), this.quad = new n(this.geo, this.mat), this.scene.add(this.quad);
417
415
  }
418
416
  _applyFit() {
419
417
  let { sx: e, sy: t, ox: n, oy: r } = this.coverFit();
@@ -439,7 +437,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
439
437
  _dispose() {
440
438
  this.mat.dispose(), this.geo.dispose();
441
439
  }
442
- }, z = Math.PI * 2, B = {
440
+ }, ee = Math.PI * 2, B = {
443
441
  off: null,
444
442
  orbit: (e, t) => [.5 + t * Math.cos(e), .5 + t * Math.sin(e)],
445
443
  figure8: (e, t) => [.5 + t * Math.sin(e), .5 + t * Math.sin(2 * e) * .5],
@@ -450,67 +448,105 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
450
448
  return [.5 + n * Math.cos(e), .5 + n * Math.sin(e)];
451
449
  }
452
450
  }, V = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position.xy, 0.0, 1.0);\n }\n", H = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uPrev;\n uniform vec2 uMouse;\n uniform float uRadius;\n uniform float uDecay;\n uniform float uAspect;\n uniform float uActive;\n void main() {\n float prev = texture2D(uPrev, vUv).r;\n vec2 d = vUv - uMouse;\n d.x *= uAspect;\n float blob = smoothstep(uRadius, 0.0, length(d)) * uActive;\n float v = max(prev * uDecay, blob);\n gl_FragColor = vec4(vec3(v), 1.0);\n }\n", U = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uImage;\n uniform sampler2D uTrail;\n uniform vec2 uImageScale;\n uniform vec2 uImageOffset;\n uniform float uStrength;\n uniform float uRGBShift;\n uniform vec2 uTexel;\n void main() {\n // Trail intensity at this pixel, plus its gradient (points toward the\n // cursor's bright centre → the refraction direction).\n float t = texture2D(uTrail, vUv).r;\n float tL = texture2D(uTrail, vUv - vec2(uTexel.x, 0.0)).r;\n float tR = texture2D(uTrail, vUv + vec2(uTexel.x, 0.0)).r;\n float tD = texture2D(uTrail, vUv - vec2(0.0, uTexel.y)).r;\n float tU = texture2D(uTrail, vUv + vec2(0.0, uTexel.y)).r;\n vec2 grad = vec2(tR - tL, tU - tD);\n vec2 dir = length(grad) > 1e-5 ? normalize(grad) : vec2(0.0);\n\n vec2 disp = grad * uStrength;\n // Chromatic aberration — R/G/B read at positions offset along the trail\n // direction, magnitude = trail intensity x shift.\n vec2 chroma = dir * t * uRGBShift;\n\n vec2 base = vUv * uImageScale + uImageOffset;\n float r = texture2D(uImage, base + disp + chroma).r;\n float g = texture2D(uImage, base + disp).g;\n float b = texture2D(uImage, base + disp - chroma).b;\n gl_FragColor = vec4(r, g, b, 1.0);\n }\n", W = .5, G = class {
453
- constructor(t, { autoLoop: s = !1 } = {}) {
454
- this.canvas = t, this.autoLoop = s, this.renderer = new o({
455
- canvas: t,
451
+ constructor(i, { autoLoop: u = !1 } = {}) {
452
+ this.canvas = i, this.autoLoop = u, this.renderer = new s({
453
+ canvas: i,
456
454
  antialias: !1,
457
455
  alpha: !0,
458
456
  preserveDrawingBuffer: !0
459
- }), this.renderer.setClearColor(0, 0), this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new a(), this.geo = new e(2, 2), this.target = new v(.5, .5), this.eased = new v(.5, .5), this.active = 0, this.params = {
457
+ }), this.renderer.setClearColor(0, 0), this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.target = new c(.5, .5), this.eased = new c(.5, .5), this.active = 0, this.params = {
460
458
  strength: .25,
461
459
  radius: .18,
462
460
  decay: .94,
463
461
  rgbShift: .03
464
- }, this.size = new v(1, 1), this.imageAspect = 1, this.texture = null, this._raf = null, this.paused = !1, this.timeScale = 1, this.motion = {
462
+ }, this.size = new c(1, 1), this.imageAspect = 1, this.texture = null, this._raf = null, this.paused = !1, this.timeScale = 1, this.motion = {
465
463
  shape: "off",
466
464
  speed: 1,
467
465
  size: .6,
468
466
  pulse: 0
469
- }, this.time = 0, this.last = performance.now();
470
- let c = {
471
- minFilter: i,
472
- magFilter: i,
467
+ }, this.time = 0, this.last = performance.now(), this.cursorPath = [], this.cursorDur = 0, this.cursorReplay = !1, this._recording = !1, this._recBuf = null, this._recStart = 0, this._onCanvasMove = null, this._paramPathRef = void 0, this.onCursorPath = null;
468
+ let d = {
469
+ minFilter: t,
470
+ magFilter: t,
473
471
  depthBuffer: !1,
474
472
  stencilBuffer: !1
475
473
  };
476
- this.rtA = new l(2, 2, c), this.rtB = new l(2, 2, c), this.trailMat = new n({
474
+ this.rtA = new l(2, 2, d), this.rtB = new l(2, 2, d), this.trailMat = new a({
477
475
  vertexShader: V,
478
476
  fragmentShader: H,
479
477
  uniforms: {
480
478
  uPrev: { value: null },
481
- uMouse: { value: new v(.5, .5) },
479
+ uMouse: { value: new c(.5, .5) },
482
480
  uRadius: { value: this.params.radius },
483
481
  uDecay: { value: this.params.decay },
484
482
  uAspect: { value: 1 },
485
483
  uActive: { value: 0 }
486
484
  }
487
- }), this.displayMat = new n({
485
+ }), this.displayMat = new a({
488
486
  vertexShader: V,
489
487
  fragmentShader: U,
490
488
  uniforms: {
491
489
  uImage: { value: null },
492
490
  uTrail: { value: null },
493
- uImageScale: { value: new v(1, 1) },
494
- uImageOffset: { value: new v(0, 0) },
491
+ uImageScale: { value: new c(1, 1) },
492
+ uImageOffset: { value: new c(0, 0) },
495
493
  uStrength: { value: this.params.strength },
496
494
  uRGBShift: { value: this.params.rgbShift },
497
- uTexel: { value: new v(.5, .5) }
495
+ uTexel: { value: new c(.5, .5) }
498
496
  }
499
- }), this.quad = new u(this.geo, this.trailMat), this.scene.add(this.quad), this._clearTargets(), this.autoLoop && this.start();
497
+ }), this.quad = new n(this.geo, this.trailMat), this.scene.add(this.quad), this._clearTargets(), this.autoLoop && this.start();
500
498
  }
501
499
  _clearTargets() {
502
500
  this.renderer.setRenderTarget(this.rtA), this.renderer.clear(), this.renderer.setRenderTarget(this.rtB), this.renderer.clear(), this.renderer.setRenderTarget(null);
503
501
  }
504
502
  setSource(e) {
505
503
  this.texture && this.texture.dispose();
506
- let t = new d(e);
507
- t.minFilter = i, t.magFilter = i, t.wrapS = c, t.wrapT = c, this.texture = t, this.imageAspect = (e.width || 1) / (e.height || 1), this.displayMat.uniforms.uImage.value = t, this._updateFit();
504
+ let n = new g(e);
505
+ n.minFilter = t, n.magFilter = t, n.wrapS = p, n.wrapT = p, this.texture = n, this.imageAspect = (e.width || 1) / (e.height || 1), this.displayMat.uniforms.uImage.value = n, this._updateFit();
508
506
  }
509
507
  touchSource() {
510
508
  this.texture && (this.texture.needsUpdate = !0);
511
509
  }
512
510
  setParams(e) {
513
- e.strength != null && (this.params.strength = e.strength), e.radius != null && (this.params.radius = e.radius), e.decay != null && (this.params.decay = e.decay), e.rgbShift != null && (this.params.rgbShift = e.rgbShift), e.speed != null && this.setTimeScale(e.speed), (e.px != null || e.py != null) && this.setPointer(e.px ?? this.target.x, e.py ?? this.target.y), e.motionShape != null && (this.motion.shape = e.motionShape), e.motionSpeed != null && (this.motion.speed = e.motionSpeed), e.motionSize != null && (this.motion.size = e.motionSize), e.motionPulse != null && (this.motion.pulse = e.motionPulse), this._apply();
511
+ e.strength != null && (this.params.strength = e.strength), e.radius != null && (this.params.radius = e.radius), e.decay != null && (this.params.decay = e.decay), e.rgbShift != null && (this.params.rgbShift = e.rgbShift), e.speed != null && this.setTimeScale(e.speed), (e.px != null || e.py != null) && this.setPointer(e.px ?? this.target.x, e.py ?? this.target.y), e.motionShape != null && (this.motion.shape = e.motionShape), e.motionSpeed != null && (this.motion.speed = e.motionSpeed), e.motionSize != null && (this.motion.size = e.motionSize), e.motionPulse != null && (this.motion.pulse = e.motionPulse), e.cursorReplay != null && (this.cursorReplay = !!e.cursorReplay), e.cursorDur != null && (this.cursorDur = e.cursorDur), e.cursorPath !== void 0 && e.cursorPath !== this._paramPathRef && !this._recording && (this._paramPathRef = e.cursorPath, this.cursorPath = Array.isArray(e.cursorPath) ? e.cursorPath : []), e.cursorRecord != null && (e.cursorRecord && !this._recording ? this.startCursorRecord() : !e.cursorRecord && this._recording && this.stopCursorRecord()), this._apply();
512
+ }
513
+ startCursorRecord() {
514
+ this.cursorReplay = !1, this._recBuf = [], this._recStart = performance.now(), this._recording = !0, !this._onCanvasMove && this.canvas && (this._onCanvasMove = (e) => {
515
+ let t = this.canvas.getBoundingClientRect();
516
+ if (!t.width || !t.height) return;
517
+ let n = (e.clientX - t.left) / t.width, r = 1 - (e.clientY - t.top) / t.height;
518
+ this.pushCursorSample(Math.min(1, Math.max(0, n)), Math.min(1, Math.max(0, r)));
519
+ }, this.canvas.addEventListener("pointermove", this._onCanvasMove));
520
+ }
521
+ pushCursorSample(e, t) {
522
+ this._recording && (this._recBuf.push({
523
+ t: performance.now() - this._recStart,
524
+ x: e,
525
+ y: t
526
+ }), this.setPointer(e, t));
527
+ }
528
+ stopCursorRecord() {
529
+ if (!this._recording) return this.cursorPath;
530
+ this._recording = !1, this._onCanvasMove && this.canvas && this.canvas.removeEventListener("pointermove", this._onCanvasMove), this._onCanvasMove = null;
531
+ let e = this._recBuf || [];
532
+ if (this._recBuf = null, e.length >= 2) {
533
+ let t = e[e.length - 1].t || 1;
534
+ this.cursorPath = e.map((e) => ({
535
+ t: e.t / t,
536
+ x: e.x,
537
+ y: e.y
538
+ })), this.cursorDur = t / 1e3;
539
+ }
540
+ return this.onCursorPath?.(this.cursorPath, this.cursorDur), this.cursorPath;
541
+ }
542
+ clearCursorPath() {
543
+ this.cursorPath = [], this.cursorDur = 0, this.cursorReplay = !1, this.onCursorPath?.(this.cursorPath, 0);
544
+ }
545
+ _sampleCursor(e) {
546
+ let t = this.cursorPath, n = 1;
547
+ for (; n < t.length && t[n].t < e;) n += 1;
548
+ let r = t[n - 1], i = t[Math.min(n, t.length - 1)], a = i.t - r.t || 1, o = Math.min(1, Math.max(0, (e - r.t) / a));
549
+ return [r.x + (i.x - r.x) * o, r.y + (i.y - r.y) * o];
514
550
  }
515
551
  _apply() {
516
552
  this.trailMat.uniforms.uRadius.value = this.params.radius, this.trailMat.uniforms.uDecay.value = this.params.decay, this.displayMat.uniforms.uStrength.value = this.params.strength, this.displayMat.uniforms.uRGBShift.value = this.params.rgbShift;
@@ -553,15 +589,20 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
553
589
  };
554
590
  this._raf = requestAnimationFrame(e);
555
591
  }
556
- frame(e) {
592
+ frame(e, t) {
557
593
  this.paused || (this.time += e * this.timeScale);
558
- let t = B[this.motion.shape];
559
- if (t) {
560
- let [e, n] = t(this.time * this.motion.speed, this.motion.size * .5);
561
- this.target.set(e, n), this.active = 1;
594
+ let n = !1;
595
+ if (this.cursorReplay && this.cursorPath.length >= 2) {
596
+ let e = t == null ? this.cursorDur ? (this.time % this.cursorDur + this.cursorDur) % this.cursorDur / this.cursorDur : 0 : (t % 1 + 1) % 1, [r, i] = this._sampleCursor(e);
597
+ this.target.set(r, i), this.active = 1, n = !0;
598
+ }
599
+ let r = n ? null : B[this.motion.shape];
600
+ if (r) {
601
+ let [e, t] = r(this.time * this.motion.speed, this.motion.size * .5);
602
+ this.target.set(e, t), this.active = 1;
562
603
  }
563
- let n = this.motion.pulse ? 1 + this.motion.pulse * Math.sin(this.time * z * .5 * this.motion.speed) : 1;
564
- if (this.trailMat.uniforms.uRadius.value = this.params.radius * n, !this.paused && e > 0 || this.active > .001) {
604
+ let i = this.motion.pulse ? 1 + this.motion.pulse * Math.sin(this.time * ee * .5 * this.motion.speed) : 1;
605
+ if (this.trailMat.uniforms.uRadius.value = this.params.radius * i, !this.paused && e > 0 || this.active > .001) {
565
606
  this.eased.lerp(this.target, .12 * this.timeScale), this.quad.material = this.trailMat, this.trailMat.uniforms.uPrev.value = this.rtA.texture, this.trailMat.uniforms.uMouse.value.copy(this.eased), this.trailMat.uniforms.uActive.value = this.active, this.renderer.setRenderTarget(this.rtB), this.renderer.render(this.scene, this.camera);
566
607
  let e = this.rtA;
567
608
  this.rtA = this.rtB, this.rtB = e, this.active *= .9;
@@ -569,7 +610,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
569
610
  this.renderer.setRenderTarget(null), this.texture ? (this.quad.material = this.displayMat, this.displayMat.uniforms.uTrail.value = this.rtA.texture, this.renderer.render(this.scene, this.camera)) : this.renderer.clear();
570
611
  }
571
612
  dispose() {
572
- this._raf && cancelAnimationFrame(this._raf), this._raf = null, this.rtA.dispose(), this.rtB.dispose(), this.trailMat.dispose(), this.displayMat.dispose(), this.geo.dispose(), this.texture && this.texture.dispose(), this.renderer.dispose();
613
+ this._onCanvasMove && this.canvas && this.canvas.removeEventListener("pointermove", this._onCanvasMove), this._onCanvasMove = null, this._raf && cancelAnimationFrame(this._raf), this._raf = null, this.rtA.dispose(), this.rtB.dispose(), this.trailMat.dispose(), this.displayMat.dispose(), this.geo.dispose(), this.texture && this.texture.dispose(), this.renderer.dispose();
573
614
  }
574
615
  }, K = {
575
616
  glass: 0,
@@ -582,15 +623,15 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
582
623
  trails: T,
583
624
  scan: A,
584
625
  slitscan: I,
585
- disco: ee,
626
+ disco: z,
586
627
  distort: G,
587
628
  lens: class {
588
629
  constructor(t, { autoLoop: r = !1 } = {}) {
589
- this.canvas = t, this.autoLoop = r, this.playing = !0, this.time = 0, this.flow = 1, this._raf = null, this.last = performance.now(), this.renderer = new o({
630
+ this.canvas = t, this.autoLoop = r, this.playing = !0, this.time = 0, this.flow = 1, this._raf = null, this.last = performance.now(), this.renderer = new s({
590
631
  canvas: t,
591
632
  antialias: !0,
592
633
  preserveDrawingBuffer: !0
593
- }), this.scene = new a(), this.cam = new s(), this.uniforms = {
634
+ }), this.scene = new o(), this.cam = new d(), this.uniforms = {
594
635
  uPhoto: { value: null },
595
636
  uHasPhoto: { value: 0 },
596
637
  uTime: { value: 0 },
@@ -601,26 +642,26 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
601
642
  uFrost: { value: 0 },
602
643
  uSheen: { value: .5 },
603
644
  uLightAngle: { value: Math.PI * .25 },
604
- uTint: { value: new f(1, 1, 1) },
645
+ uTint: { value: new h(1, 1, 1) },
605
646
  uTintAmt: { value: 0 },
606
647
  uReflect: { value: 0 },
607
648
  uFit: { value: 0 },
608
649
  uZoom: { value: 1 },
609
- uOffset: { value: new v(0, 0) },
610
- uBg: { value: new f(.02, .025, .04) },
650
+ uOffset: { value: new c(0, 0) },
651
+ uBg: { value: new h(.02, .025, .04) },
611
652
  uShape: { value: 0 },
612
653
  uSize: { value: .45 },
613
654
  uRadius: { value: .08 },
614
655
  uEdge: { value: .02 },
615
656
  uMagnify: { value: .1 },
616
- uGlassPos: { value: new v(.5, .5) },
657
+ uGlassPos: { value: new c(.5, .5) },
617
658
  uViewAspect: { value: 1 },
618
659
  uImgAspect: { value: 1 }
619
- }, this.mat = new n({
660
+ }, this.mat = new a({
620
661
  vertexShader: q,
621
662
  fragmentShader: J,
622
663
  uniforms: this.uniforms
623
- }), this.geo = new e(2, 2), this.scene.add(new u(this.geo, this.mat)), this.autoLoop && this.start();
664
+ }), this.geo = new e(2, 2), this.scene.add(new n(this.geo, this.mat)), this.autoLoop && this.start();
624
665
  }
625
666
  resize(e, t) {
626
667
  !this.renderer || e < 1 || t < 1 || (this.renderer.setPixelRatio(Math.min(2, window.devicePixelRatio || 1)), this.renderer.setSize(e, t, !1), this.uniforms.uViewAspect.value = e / t);
@@ -631,8 +672,8 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
631
672
  this.uniforms.uHasPhoto.value = 0;
632
673
  return;
633
674
  }
634
- let t = new d(e);
635
- t.minFilter = i, t.magFilter = i, t.wrapS = t.wrapT = c, this.tex && this.tex.dispose(), this.tex = t, this.uniforms.uPhoto.value = t, this.uniforms.uHasPhoto.value = 1, this.uniforms.uImgAspect.value = (e.width || 1) / (e.height || 1);
675
+ let n = new g(e);
676
+ n.minFilter = t, n.magFilter = t, n.wrapS = n.wrapT = p, this.tex && this.tex.dispose(), this.tex = n, this.uniforms.uPhoto.value = n, this.uniforms.uHasPhoto.value = 1, this.uniforms.uImgAspect.value = (e.width || 1) / (e.height || 1);
636
677
  }
637
678
  touchSource() {
638
679
  this.tex && (this.tex.needsUpdate = !0);
@@ -704,15 +745,20 @@ function $(e, t) {
704
745
  function te(e, t, n) {
705
746
  t.setParams(n);
706
747
  }
707
- function ne(e, t, { dt: n }) {
708
- t.frame(n);
748
+ function ne(e, t, { dt: n, u: r }) {
749
+ t.frame(n, r);
709
750
  }
710
751
  function re(e) {
711
- if (e) try {
752
+ if (!e) return;
753
+ let t = e.renderer;
754
+ try {
712
755
  typeof e.dispose == "function" ? e.dispose() : typeof e.destroy == "function" && e.destroy();
713
756
  } catch (e) {
714
757
  console.warn("[gl] engine dispose failed (ignored):", e?.message ?? e);
715
758
  }
759
+ try {
760
+ t?.forceContextLoss?.();
761
+ } catch {}
716
762
  }
717
763
  //#endregion
718
764
  export { te as applyParams, X as createEngine, re as destroyEngine, ne as driveEngine, Z as setCameraDrag, Q as setSource, $ as touchSource };