shaders 2.2.23 → 2.2.25

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 (213) hide show
  1. package/dist/core/AngularBlur-Dl2gwk68.js +64 -0
  2. package/dist/core/Ascii-Dha_QpT3.js +286 -0
  3. package/dist/core/Beam-CTN9Ni43.js +139 -0
  4. package/dist/core/Blob-CxFDZovO.js +218 -0
  5. package/dist/core/Blur-Y2FsmFk_.js +77 -0
  6. package/dist/core/Bulge-Cb-t0xqI.js +132 -0
  7. package/dist/core/CRTScreen-CtERsenz.js +112 -0
  8. package/dist/core/ChannelBlur-CvM6GJgZ.js +118 -0
  9. package/dist/core/Checkerboard-CgB-egNY.js +83 -0
  10. package/dist/core/ChromaFlow-vRCwhQpN.js +222 -0
  11. package/dist/core/ChromaticAberration-FTquTQIL.js +88 -0
  12. package/dist/core/Circle-Daziv5d7.js +67 -0
  13. package/dist/core/CursorTrail-Bsz9e6Fn.js +145 -0
  14. package/dist/core/DiffuseBlur-Cj2PtRNd.js +83 -0
  15. package/dist/core/Dither-D2Nf4p3w.js +66 -0
  16. package/dist/core/DotGrid-CzOwquo4.js +75 -0
  17. package/dist/core/Duotone-XuTN9tI7.js +65 -0
  18. package/dist/core/FilmGrain-D3-nbi12.js +28 -0
  19. package/dist/core/FloatingParticles-D9Nnu1qg.js +217 -0
  20. package/dist/core/GlassTiles-CnjCvajI.js +69 -0
  21. package/dist/core/Glow-BluFc9be.js +75 -0
  22. package/dist/core/Godrays-ChLh_vGl.js +144 -0
  23. package/dist/core/Grayscale-DRny75A9.js +20 -0
  24. package/dist/core/Grid-DgyDa4H1.js +58 -0
  25. package/dist/core/GridDistortion-BAspCYvp.js +188 -0
  26. package/dist/core/Group-Dul7PUBl.js +14 -0
  27. package/dist/core/Halftone-Ifv5F_FT.js +65 -0
  28. package/dist/core/HueShift-De8ukMWs.js +31 -0
  29. package/dist/core/ImageTexture-DvYcQgJB.js +143 -0
  30. package/dist/core/Invert-Fz0NtIJc.js +21 -0
  31. package/dist/core/LinearBlur-LmhnQoA4.js +62 -0
  32. package/dist/core/LinearGradient-xbloQjzt.js +133 -0
  33. package/dist/core/Liquify-DMe1V5-O.js +175 -0
  34. package/dist/core/Pixelate-Cv8537Pj.js +37 -0
  35. package/dist/core/PolarCoordinates-DDvDhBE-.js +112 -0
  36. package/dist/core/Posterize-3m3xkWOz.js +29 -0
  37. package/dist/core/ProgressiveBlur-EGkevObV.js +121 -0
  38. package/dist/core/RadialGradient-B7ZZB_VJ.js +71 -0
  39. package/dist/core/RectangularCoordinates-muWR8mZS.js +101 -0
  40. package/dist/core/Ripples-8XaZaXQF.js +117 -0
  41. package/dist/core/Saturation-CYFI1jzN.js +30 -0
  42. package/dist/core/SimplexNoise-DJUe0wz_.js +99 -0
  43. package/dist/core/SineWave-Dl3nFO1W.js +120 -0
  44. package/dist/core/SolidColor-CWGq_Bjq.js +21 -0
  45. package/dist/core/Spherize-C-jZEUsN.js +128 -0
  46. package/dist/core/Spiral-BSB_R39p.js +132 -0
  47. package/dist/core/Strands-0stO5BMy.js +161 -0
  48. package/dist/core/Stretch-B645paha.js +133 -0
  49. package/dist/core/Swirl-CVnbawit.js +173 -0
  50. package/dist/core/TiltShift-0CxNRI6L.js +134 -0
  51. package/dist/core/Tritone-Daa-I5UD.js +76 -0
  52. package/dist/core/Twirl-2CJVZEtk.js +96 -0
  53. package/dist/core/Vibrance-DRtecEvb.js +30 -0
  54. package/dist/core/WaveDistortion-BscXN2rs.js +173 -0
  55. package/dist/core/ZoomBlur-CAqK0Kju.js +62 -0
  56. package/dist/core/colorMixing-BXiTAqJU.js +69 -0
  57. package/dist/core/edges-Bn_OIa_h.js +26 -0
  58. package/dist/core/index.js +2257 -1604
  59. package/dist/core/shaderRegistry.d.ts.map +1 -1
  60. package/dist/core/shaders/AngularBlur/index.js +3 -7
  61. package/dist/core/shaders/Ascii/index.js +2 -6
  62. package/dist/core/shaders/Beam/index.d.ts +71 -0
  63. package/dist/core/shaders/Beam/index.d.ts.map +1 -0
  64. package/dist/core/shaders/Beam/index.js +4 -0
  65. package/dist/core/shaders/Blob/index.js +5 -9
  66. package/dist/core/shaders/Blur/index.js +2 -6
  67. package/dist/core/shaders/Bulge/index.js +4 -8
  68. package/dist/core/shaders/CRTScreen/index.js +2 -6
  69. package/dist/core/shaders/ChannelBlur/index.js +2 -6
  70. package/dist/core/shaders/Checkerboard/index.js +4 -8
  71. package/dist/core/shaders/ChromaFlow/index.js +3 -7
  72. package/dist/core/shaders/ChromaticAberration/index.js +3 -7
  73. package/dist/core/shaders/Circle/index.js +3 -7
  74. package/dist/core/shaders/CursorTrail/index.js +4 -8
  75. package/dist/core/shaders/DiffuseBlur/index.js +4 -8
  76. package/dist/core/shaders/Dither/index.js +3 -7
  77. package/dist/core/shaders/DotGrid/index.js +3 -7
  78. package/dist/core/shaders/Duotone/index.js +4 -8
  79. package/dist/core/shaders/FilmGrain/index.js +2 -6
  80. package/dist/core/shaders/FloatingParticles/index.js +3 -7
  81. package/dist/core/shaders/GlassTiles/index.js +2 -6
  82. package/dist/core/shaders/Glow/index.js +2 -6
  83. package/dist/core/shaders/Godrays/index.js +3 -7
  84. package/dist/core/shaders/Grayscale/index.js +2 -8
  85. package/dist/core/shaders/Grid/index.js +3 -7
  86. package/dist/core/shaders/GridDistortion/index.js +4 -8
  87. package/dist/core/shaders/Group/index.js +2 -6
  88. package/dist/core/shaders/Halftone/index.js +3 -7
  89. package/dist/core/shaders/HueShift/index.js +2 -8
  90. package/dist/core/shaders/ImageTexture/index.js +2 -6
  91. package/dist/core/shaders/Invert/index.js +2 -6
  92. package/dist/core/shaders/LinearBlur/index.js +3 -7
  93. package/dist/core/shaders/LinearGradient/index.js +4 -8
  94. package/dist/core/shaders/Liquify/index.js +4 -8
  95. package/dist/core/shaders/Pixelate/index.js +2 -6
  96. package/dist/core/shaders/PolarCoordinates/index.js +4 -8
  97. package/dist/core/shaders/Posterize/index.js +2 -7
  98. package/dist/core/shaders/ProgressiveBlur/index.js +3 -7
  99. package/dist/core/shaders/RadialGradient/index.js +4 -8
  100. package/dist/core/shaders/RectangularCoordinates/index.js +4 -8
  101. package/dist/core/shaders/Ripples/index.js +5 -9
  102. package/dist/core/shaders/Saturation/index.js +2 -8
  103. package/dist/core/shaders/SimplexNoise/index.js +5 -9
  104. package/dist/core/shaders/SineWave/index.js +3 -7
  105. package/dist/core/shaders/SolidColor/index.js +3 -7
  106. package/dist/core/shaders/Spherize/index.js +3 -7
  107. package/dist/core/shaders/Spiral/index.js +4 -8
  108. package/dist/core/shaders/Strands/index.js +4 -8
  109. package/dist/core/shaders/Stretch/index.js +4 -8
  110. package/dist/core/shaders/Swirl/index.js +5 -9
  111. package/dist/core/shaders/TiltShift/index.js +3 -7
  112. package/dist/core/shaders/Tritone/index.js +4 -8
  113. package/dist/core/shaders/Twirl/index.js +4 -8
  114. package/dist/core/shaders/Vibrance/index.js +2 -8
  115. package/dist/core/shaders/WaveDistortion/index.js +4 -8
  116. package/dist/core/shaders/ZoomBlur/index.js +3 -7
  117. package/dist/core/telemetry/index.js +189 -157
  118. package/dist/core/time-CTJvRUZ4.js +10 -0
  119. package/dist/core/transformations-DxfQXZWi.js +4715 -0
  120. package/dist/react/components/Beam.d.ts +31 -0
  121. package/dist/react/components/Beam.d.ts.map +1 -0
  122. package/dist/react/generatePresetCode-CCibXbtZ.js +645 -0
  123. package/dist/react/index.d.ts +1 -0
  124. package/dist/react/index.d.ts.map +1 -1
  125. package/dist/react/index.js +7649 -104600
  126. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  127. package/dist/react/utils/generatePresetCode.js +2 -5
  128. package/dist/registry.js +224 -0
  129. package/dist/solid/components/Beam.d.ts +28 -0
  130. package/dist/solid/components/Beam.d.ts.map +1 -0
  131. package/dist/solid/index.d.ts +1 -0
  132. package/dist/solid/index.d.ts.map +1 -1
  133. package/dist/solid/index.js +6691 -102524
  134. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  135. package/dist/solid/utils/generatePresetCode.js +586 -537
  136. package/dist/svelte/components/Beam.svelte.d.ts +19 -0
  137. package/dist/svelte/generatePresetCode-CymgoDq_.js +645 -0
  138. package/dist/svelte/index.d.ts +1 -0
  139. package/dist/svelte/index.js +6175 -102455
  140. package/dist/svelte/utils/generatePresetCode.js +2 -5
  141. package/dist/vue/components/Beam.vue.d.ts +57 -0
  142. package/dist/vue/components/Beam.vue.d.ts.map +1 -0
  143. package/dist/vue/generatePresetCode-CRJmU8iF.js +649 -0
  144. package/dist/vue/index.d.ts +1 -0
  145. package/dist/vue/index.d.ts.map +1 -1
  146. package/dist/vue/index.js +6929 -103492
  147. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  148. package/dist/vue/utils/generatePresetCode.js +2 -5
  149. package/package.json +12 -1
  150. package/dist/core/AngularBlur-ClvtyURQ.js +0 -56
  151. package/dist/core/Ascii-BT0-K_vw.js +0 -196
  152. package/dist/core/Blob-BlQ_1T_8.js +0 -169
  153. package/dist/core/Blur-421AjWLH.js +0 -64
  154. package/dist/core/Bulge-CZRVoR6C.js +0 -103
  155. package/dist/core/CRTScreen-C_U9g_IR.js +0 -91
  156. package/dist/core/ChannelBlur-5pzcB6Zv.js +0 -89
  157. package/dist/core/Checkerboard-CrQkqXhD.js +0 -75
  158. package/dist/core/ChromaFlow-CNrQdL8f.js +0 -134
  159. package/dist/core/ChromaticAberration-D9H7O17Y.js +0 -82
  160. package/dist/core/Circle-DnLaDn8V.js +0 -62
  161. package/dist/core/ColorAdjustment-CKwpE_4M.js +0 -14
  162. package/dist/core/CursorTrail-NY6n97VG.js +0 -105
  163. package/dist/core/DiffuseBlur-C_n01ABk.js +0 -69
  164. package/dist/core/Dither-4s-c4zh4.js +0 -61
  165. package/dist/core/DotGrid-BYl8XdMi.js +0 -61
  166. package/dist/core/Duotone-DbewOoB4.js +0 -66
  167. package/dist/core/FilmGrain-zA_-knOw.js +0 -28
  168. package/dist/core/FloatingParticles-BhVnqMsE.js +0 -160
  169. package/dist/core/GlassTiles-CFI57glh.js +0 -52
  170. package/dist/core/Glow-CQgl3IoS.js +0 -66
  171. package/dist/core/Godrays-BHMix_Bh.js +0 -105
  172. package/dist/core/Grayscale-CAEFLteL.js +0 -21
  173. package/dist/core/Grid-DlM-rVbZ.js +0 -50
  174. package/dist/core/GridDistortion-ZOZphSAT.js +0 -147
  175. package/dist/core/Group-BQAs3RiH.js +0 -17
  176. package/dist/core/Halftone-ci4ga-_J.js +0 -55
  177. package/dist/core/HueShift-CyxzPcJV.js +0 -32
  178. package/dist/core/ImageTexture-CdAGsPuH.js +0 -105
  179. package/dist/core/Invert-iPsiIqNZ.js +0 -20
  180. package/dist/core/LinearBlur-BEaaoIk-.js +0 -56
  181. package/dist/core/LinearGradient-DR_7RxLX.js +0 -111
  182. package/dist/core/Liquify-Bi02_ugh.js +0 -139
  183. package/dist/core/Pixelate-CSsdT1rr.js +0 -38
  184. package/dist/core/PolarCoordinates-D626ml58.js +0 -103
  185. package/dist/core/Posterize-DhZkMaC7.js +0 -46
  186. package/dist/core/ProgressiveBlur-CGtCfLF8.js +0 -102
  187. package/dist/core/RadialGradient-C0_WzmbH.js +0 -71
  188. package/dist/core/RectangularCoordinates-DfXw7fhI.js +0 -92
  189. package/dist/core/Ripples-DkemN3eh.js +0 -106
  190. package/dist/core/Saturation-Dup81Pnq.js +0 -31
  191. package/dist/core/SimplexNoise-BYEiCjDj.js +0 -94
  192. package/dist/core/SineWave-C6MRPtsy.js +0 -107
  193. package/dist/core/SolidColor-BZHRczgb.js +0 -22
  194. package/dist/core/Spherize-DOAnDx2l.js +0 -103
  195. package/dist/core/Spiral-BMjnWXh1.js +0 -115
  196. package/dist/core/Strands-BOVsuJLe.js +0 -125
  197. package/dist/core/Stretch-D6bHc6yp.js +0 -103
  198. package/dist/core/Swirl-BFoc0ImG.js +0 -148
  199. package/dist/core/TSLBase-BFMvTOak.js +0 -8053
  200. package/dist/core/TiltShift-BiNvvhzj.js +0 -114
  201. package/dist/core/Tritone-gdx2AA0m.js +0 -75
  202. package/dist/core/Twirl-BsV8YbqC.js +0 -82
  203. package/dist/core/Vibrance-C182fbSw.js +0 -31
  204. package/dist/core/WaveDistortion-CmaS2zDB.js +0 -132
  205. package/dist/core/ZoomBlur-DLf5xQ16.js +0 -56
  206. package/dist/core/colorMixing--dhzx0ch.js +0 -21
  207. package/dist/core/edges-CDzKsauJ.js +0 -15
  208. package/dist/core/three.tsl-Btj1hLsf.js +0 -43845
  209. package/dist/core/time-DbRMw6Jm.js +0 -10
  210. package/dist/core/transformations-CsrIJXh-.js +0 -3992
  211. package/dist/react/generatePresetCode-DaS7jkcT.js +0 -626
  212. package/dist/svelte/generatePresetCode-DaS7jkcT.js +0 -626
  213. package/dist/vue/generatePresetCode-Cd1B-Y9j.js +0 -632
@@ -1,579 +1,628 @@
1
- const d = {
2
- AngularBlur: {
3
- opacity: 1,
4
- blendMode: "normal",
5
- intensity: 20,
6
- center: {
7
- x: 0.5,
8
- y: 0.5
1
+ const shaderMetadata = {
2
+ "AngularBlur": {
3
+ "opacity": 1,
4
+ "blendMode": "normal",
5
+ "intensity": 20,
6
+ "center": {
7
+ "x": 0.5,
8
+ "y": 0.5
9
9
  }
10
10
  },
11
- Ascii: {
12
- opacity: 1,
13
- blendMode: "normal",
14
- characters: "@%#*+=-:.",
15
- cellSize: 30,
16
- fontFamily: "JetBrains Mono",
17
- spacing: 1
18
- },
19
- Blob: {
20
- opacity: 1,
21
- blendMode: "normal",
22
- colorA: "#ff6b35",
23
- colorB: "#e91e63",
24
- size: 0.5,
25
- deformation: 0.5,
26
- softness: 0.5,
27
- highlightIntensity: 0.5,
28
- highlightX: 0.3,
29
- highlightY: -0.3,
30
- highlightZ: 0.4,
31
- highlightColor: "#ffe11a",
32
- speed: 0.5,
33
- seed: 1,
34
- center: {
35
- x: 0.5,
36
- y: 0.5
11
+ "Ascii": {
12
+ "opacity": 1,
13
+ "blendMode": "normal",
14
+ "characters": "@%#*+=-:.",
15
+ "cellSize": 30,
16
+ "fontFamily": "JetBrains Mono",
17
+ "spacing": 1
18
+ },
19
+ "Beam": {
20
+ "opacity": 1,
21
+ "blendMode": "normal",
22
+ "startPosition": {
23
+ "x": 0.2,
24
+ "y": 0.5
37
25
  },
38
- colorSpace: "linear"
39
- },
40
- Blur: {
41
- opacity: 1,
42
- blendMode: "normal",
43
- intensity: 50
44
- },
45
- Bulge: {
46
- opacity: 1,
47
- blendMode: "normal",
48
- center: {
49
- x: 0.5,
50
- y: 0.5
26
+ "endPosition": {
27
+ "x": 0.8,
28
+ "y": 0.5
51
29
  },
52
- strength: 1,
53
- radius: 1,
54
- falloff: 0.5,
55
- edges: "stretch"
56
- },
57
- ChannelBlur: {
58
- opacity: 1,
59
- blendMode: "normal",
60
- redIntensity: 0,
61
- greenIntensity: 20,
62
- blueIntensity: 40
63
- },
64
- Checkerboard: {
65
- opacity: 1,
66
- blendMode: "normal",
67
- colorA: "#cccccc",
68
- colorB: "#999999",
69
- cells: 8,
70
- softness: 0,
71
- colorSpace: "linear"
72
- },
73
- ChromaFlow: {
74
- opacity: 1,
75
- blendMode: "normal",
76
- baseColor: "#0066ff",
77
- upColor: "#00ff00",
78
- downColor: "#ff0000",
79
- leftColor: "#0000ff",
80
- rightColor: "#ffff00",
81
- intensity: 1,
82
- radius: 2,
83
- momentum: 30
84
- },
85
- ChromaticAberration: {
86
- opacity: 1,
87
- blendMode: "normal",
88
- strength: 0.2,
89
- angle: 0,
90
- redOffset: -1,
91
- greenOffset: 0,
92
- blueOffset: 1
93
- },
94
- Circle: {
95
- opacity: 1,
96
- blendMode: "normal",
97
- color: "#ffffff",
98
- radius: 1,
99
- softness: 0,
100
- center: {
101
- x: 0.5,
102
- y: 0.5
30
+ "startThickness": 0.2,
31
+ "endThickness": 0.2,
32
+ "startSoftness": 0.5,
33
+ "endSoftness": 0.5,
34
+ "insideColor": "#FF0000",
35
+ "outsideColor": "#0000FF",
36
+ "colorSpace": "linear"
37
+ },
38
+ "Blob": {
39
+ "opacity": 1,
40
+ "blendMode": "normal",
41
+ "colorA": "#ff6b35",
42
+ "colorB": "#e91e63",
43
+ "size": 0.5,
44
+ "deformation": 0.5,
45
+ "softness": 0.5,
46
+ "highlightIntensity": 0.5,
47
+ "highlightX": 0.3,
48
+ "highlightY": -0.3,
49
+ "highlightZ": 0.4,
50
+ "highlightColor": "#ffe11a",
51
+ "speed": 0.5,
52
+ "seed": 1,
53
+ "center": {
54
+ "x": 0.5,
55
+ "y": 0.5
56
+ },
57
+ "colorSpace": "linear"
58
+ },
59
+ "Blur": {
60
+ "opacity": 1,
61
+ "blendMode": "normal",
62
+ "intensity": 50
63
+ },
64
+ "Bulge": {
65
+ "opacity": 1,
66
+ "blendMode": "normal",
67
+ "center": {
68
+ "x": 0.5,
69
+ "y": 0.5
70
+ },
71
+ "strength": 1,
72
+ "radius": 1,
73
+ "falloff": 0.5,
74
+ "edges": "stretch"
75
+ },
76
+ "ChannelBlur": {
77
+ "opacity": 1,
78
+ "blendMode": "normal",
79
+ "redIntensity": 0,
80
+ "greenIntensity": 20,
81
+ "blueIntensity": 40
82
+ },
83
+ "Checkerboard": {
84
+ "opacity": 1,
85
+ "blendMode": "normal",
86
+ "colorA": "#cccccc",
87
+ "colorB": "#999999",
88
+ "cells": 8,
89
+ "softness": 0,
90
+ "colorSpace": "linear"
91
+ },
92
+ "ChromaFlow": {
93
+ "opacity": 1,
94
+ "blendMode": "normal",
95
+ "baseColor": "#0066ff",
96
+ "upColor": "#00ff00",
97
+ "downColor": "#ff0000",
98
+ "leftColor": "#0000ff",
99
+ "rightColor": "#ffff00",
100
+ "intensity": 1,
101
+ "radius": 2,
102
+ "momentum": 30
103
+ },
104
+ "ChromaticAberration": {
105
+ "opacity": 1,
106
+ "blendMode": "normal",
107
+ "strength": 0.2,
108
+ "angle": 0,
109
+ "redOffset": -1,
110
+ "greenOffset": 0,
111
+ "blueOffset": 1
112
+ },
113
+ "Circle": {
114
+ "opacity": 1,
115
+ "blendMode": "normal",
116
+ "color": "#ffffff",
117
+ "radius": 1,
118
+ "softness": 0,
119
+ "center": {
120
+ "x": 0.5,
121
+ "y": 0.5
103
122
  }
104
123
  },
105
- CRTScreen: {
106
- opacity: 1,
107
- blendMode: "normal",
108
- pixelSize: 128,
109
- colorShift: 1,
110
- scanlineIntensity: 0.3,
111
- scanlineFrequency: 200,
112
- brightness: 1.1,
113
- contrast: 1.2
114
- },
115
- CursorTrail: {
116
- opacity: 1,
117
- blendMode: "normal",
118
- colorA: "#00aaff",
119
- colorB: "#ff00aa",
120
- radius: 0.5,
121
- length: 0.5,
122
- shrink: 1,
123
- colorSpace: "linear"
124
- },
125
- DiffuseBlur: {
126
- opacity: 1,
127
- blendMode: "normal",
128
- intensity: 30,
129
- edges: "stretch"
130
- },
131
- Dither: {
132
- opacity: 1,
133
- blendMode: "normal",
134
- pixelSize: 4,
135
- threshold: 0.5,
136
- colorA: "transparent",
137
- colorB: "#ffffff"
138
- },
139
- DotGrid: {
140
- opacity: 1,
141
- blendMode: "normal",
142
- color: "#ffffff",
143
- density: 100,
144
- dotSize: 0.3,
145
- twinkle: 0
146
- },
147
- Duotone: {
148
- opacity: 1,
149
- blendMode: "normal",
150
- colorA: "#ff0000",
151
- colorB: "#023af4",
152
- blend: 0.5,
153
- colorSpace: "linear"
154
- },
155
- FilmGrain: {
156
- opacity: 1,
157
- blendMode: "normal",
158
- strength: 0.5
159
- },
160
- FloatingParticles: {
161
- opacity: 1,
162
- blendMode: "normal",
163
- randomness: 0.25,
164
- speed: 0.25,
165
- angle: 90,
166
- particleSize: 1,
167
- particleSoftness: 0,
168
- twinkle: 0.5,
169
- count: 5,
170
- particleColor: "#ffffff",
171
- speedVariance: 0.3,
172
- angleVariance: 30,
173
- particleDensity: 3
174
- },
175
- GlassTiles: {
176
- opacity: 1,
177
- blendMode: "normal",
178
- intensity: 1,
179
- tileCount: 100
180
- },
181
- Glow: {
182
- opacity: 1,
183
- blendMode: "normal",
184
- intensity: 1,
185
- threshold: 0.5,
186
- size: 10
187
- },
188
- Godrays: {
189
- opacity: 1,
190
- blendMode: "normal",
191
- center: {
192
- x: 0,
193
- y: 0
124
+ "CRTScreen": {
125
+ "opacity": 1,
126
+ "blendMode": "normal",
127
+ "pixelSize": 128,
128
+ "colorShift": 1,
129
+ "scanlineIntensity": 0.3,
130
+ "scanlineFrequency": 200,
131
+ "brightness": 1.1,
132
+ "contrast": 1.2
133
+ },
134
+ "CursorTrail": {
135
+ "opacity": 1,
136
+ "blendMode": "normal",
137
+ "colorA": "#00aaff",
138
+ "colorB": "#ff00aa",
139
+ "radius": 0.5,
140
+ "length": 0.5,
141
+ "shrink": 1,
142
+ "colorSpace": "linear"
143
+ },
144
+ "DiffuseBlur": {
145
+ "opacity": 1,
146
+ "blendMode": "normal",
147
+ "intensity": 30,
148
+ "edges": "stretch"
149
+ },
150
+ "Dither": {
151
+ "opacity": 1,
152
+ "blendMode": "normal",
153
+ "pixelSize": 4,
154
+ "threshold": 0.5,
155
+ "colorA": "transparent",
156
+ "colorB": "#ffffff"
157
+ },
158
+ "DotGrid": {
159
+ "opacity": 1,
160
+ "blendMode": "normal",
161
+ "color": "#ffffff",
162
+ "density": 100,
163
+ "dotSize": 0.3,
164
+ "twinkle": 0
165
+ },
166
+ "Duotone": {
167
+ "opacity": 1,
168
+ "blendMode": "normal",
169
+ "colorA": "#ff0000",
170
+ "colorB": "#023af4",
171
+ "blend": 0.5,
172
+ "colorSpace": "linear"
173
+ },
174
+ "FilmGrain": {
175
+ "opacity": 1,
176
+ "blendMode": "normal",
177
+ "strength": 0.5
178
+ },
179
+ "FloatingParticles": {
180
+ "opacity": 1,
181
+ "blendMode": "normal",
182
+ "randomness": 0.25,
183
+ "speed": 0.25,
184
+ "angle": 90,
185
+ "particleSize": 1,
186
+ "particleSoftness": 0,
187
+ "twinkle": 0.5,
188
+ "count": 5,
189
+ "particleColor": "#ffffff",
190
+ "speedVariance": 0.3,
191
+ "angleVariance": 30,
192
+ "particleDensity": 3
193
+ },
194
+ "GlassTiles": {
195
+ "opacity": 1,
196
+ "blendMode": "normal",
197
+ "intensity": 1,
198
+ "tileCount": 100
199
+ },
200
+ "Glow": {
201
+ "opacity": 1,
202
+ "blendMode": "normal",
203
+ "intensity": 1,
204
+ "threshold": 0.5,
205
+ "size": 10
206
+ },
207
+ "Godrays": {
208
+ "opacity": 1,
209
+ "blendMode": "normal",
210
+ "center": {
211
+ "x": 0,
212
+ "y": 0
194
213
  },
195
- density: 0.3,
196
- intensity: 0.8,
197
- spotty: 1,
198
- speed: 0.5,
199
- rayColor: "#4283fb",
200
- backgroundColor: "transparent"
201
- },
202
- Grayscale: {
203
- opacity: 1,
204
- blendMode: "normal"
205
- },
206
- Grid: {
207
- opacity: 1,
208
- blendMode: "normal",
209
- color: "#ffffff",
210
- cells: 10,
211
- thickness: 1
212
- },
213
- GridDistortion: {
214
- opacity: 1,
215
- blendMode: "normal",
216
- intensity: 1,
217
- swirl: 0,
218
- decay: 3,
219
- radius: 1,
220
- gridSize: 20,
221
- edges: "stretch"
222
- },
223
- Group: {
224
- opacity: 1,
225
- blendMode: "normal"
226
- },
227
- Halftone: {
228
- opacity: 1,
229
- blendMode: "normal",
230
- frequency: 100,
231
- angle: 45,
232
- smoothness: 0.1
233
- },
234
- HueShift: {
235
- opacity: 1,
236
- blendMode: "normal",
237
- shift: 0
238
- },
239
- ImageTexture: {
240
- opacity: 1,
241
- blendMode: "normal",
242
- url: "https://shaders.com/sample.jpg",
243
- objectFit: "cover"
244
- },
245
- Invert: {
246
- opacity: 1,
247
- blendMode: "normal"
248
- },
249
- LinearBlur: {
250
- opacity: 1,
251
- blendMode: "normal",
252
- intensity: 30,
253
- angle: 0
254
- },
255
- LinearGradient: {
256
- opacity: 1,
257
- blendMode: "normal",
258
- colorA: "#1aff00",
259
- colorB: "#0000ff",
260
- start: {
261
- x: 0,
262
- y: 0.5
214
+ "density": 0.3,
215
+ "intensity": 0.8,
216
+ "spotty": 1,
217
+ "speed": 0.5,
218
+ "rayColor": "#4283fb",
219
+ "backgroundColor": "transparent"
220
+ },
221
+ "Grayscale": {
222
+ "opacity": 1,
223
+ "blendMode": "normal"
224
+ },
225
+ "Grid": {
226
+ "opacity": 1,
227
+ "blendMode": "normal",
228
+ "color": "#ffffff",
229
+ "cells": 10,
230
+ "thickness": 1
231
+ },
232
+ "GridDistortion": {
233
+ "opacity": 1,
234
+ "blendMode": "normal",
235
+ "intensity": 1,
236
+ "swirl": 0,
237
+ "decay": 3,
238
+ "radius": 1,
239
+ "gridSize": 20,
240
+ "edges": "stretch"
241
+ },
242
+ "Group": {
243
+ "opacity": 1,
244
+ "blendMode": "normal"
245
+ },
246
+ "Halftone": {
247
+ "opacity": 1,
248
+ "blendMode": "normal",
249
+ "frequency": 100,
250
+ "angle": 45,
251
+ "smoothness": 0.1
252
+ },
253
+ "HueShift": {
254
+ "opacity": 1,
255
+ "blendMode": "normal",
256
+ "shift": 0
257
+ },
258
+ "ImageTexture": {
259
+ "opacity": 1,
260
+ "blendMode": "normal",
261
+ "url": "https://shaders.com/sample.jpg",
262
+ "objectFit": "cover"
263
+ },
264
+ "Invert": {
265
+ "opacity": 1,
266
+ "blendMode": "normal"
267
+ },
268
+ "LinearBlur": {
269
+ "opacity": 1,
270
+ "blendMode": "normal",
271
+ "intensity": 30,
272
+ "angle": 0
273
+ },
274
+ "LinearGradient": {
275
+ "opacity": 1,
276
+ "blendMode": "normal",
277
+ "colorA": "#1aff00",
278
+ "colorB": "#0000ff",
279
+ "start": {
280
+ "x": 0,
281
+ "y": 0.5
263
282
  },
264
- end: {
265
- x: 1,
266
- y: 0.5
283
+ "end": {
284
+ "x": 1,
285
+ "y": 0.5
267
286
  },
268
- angle: 0,
269
- edges: "stretch",
270
- colorSpace: "linear"
271
- },
272
- Liquify: {
273
- opacity: 1,
274
- blendMode: "normal",
275
- intensity: 1,
276
- swirl: 0,
277
- decay: 3,
278
- radius: 1,
279
- edges: "stretch"
280
- },
281
- Pixelate: {
282
- opacity: 1,
283
- blendMode: "normal",
284
- scale: 50
285
- },
286
- PolarCoordinates: {
287
- opacity: 1,
288
- blendMode: "normal",
289
- center: {
290
- x: 0.5,
291
- y: 0.5
287
+ "angle": 0,
288
+ "edges": "stretch",
289
+ "colorSpace": "linear"
290
+ },
291
+ "Liquify": {
292
+ "opacity": 1,
293
+ "blendMode": "normal",
294
+ "intensity": 1,
295
+ "swirl": 0,
296
+ "decay": 3,
297
+ "radius": 1,
298
+ "edges": "stretch"
299
+ },
300
+ "Pixelate": {
301
+ "opacity": 1,
302
+ "blendMode": "normal",
303
+ "scale": 50
304
+ },
305
+ "PolarCoordinates": {
306
+ "opacity": 1,
307
+ "blendMode": "normal",
308
+ "center": {
309
+ "x": 0.5,
310
+ "y": 0.5
292
311
  },
293
- wrap: 1,
294
- radius: 1,
295
- intensity: 1,
296
- edges: "transparent"
297
- },
298
- Posterize: {
299
- opacity: 1,
300
- blendMode: "normal",
301
- intensity: 5
302
- },
303
- ProgressiveBlur: {
304
- opacity: 1,
305
- blendMode: "normal",
306
- intensity: 50,
307
- angle: 0,
308
- center: {
309
- x: 0,
310
- y: 0.5
312
+ "wrap": 1,
313
+ "radius": 1,
314
+ "intensity": 1,
315
+ "edges": "transparent"
316
+ },
317
+ "Posterize": {
318
+ "opacity": 1,
319
+ "blendMode": "normal",
320
+ "intensity": 5
321
+ },
322
+ "ProgressiveBlur": {
323
+ "opacity": 1,
324
+ "blendMode": "normal",
325
+ "intensity": 50,
326
+ "angle": 0,
327
+ "center": {
328
+ "x": 0,
329
+ "y": 0.5
311
330
  },
312
- falloff: 1
313
- },
314
- RadialGradient: {
315
- opacity: 1,
316
- blendMode: "normal",
317
- colorA: "#ff0000",
318
- colorB: "#0000ff",
319
- center: {
320
- x: 0.5,
321
- y: 0.5
331
+ "falloff": 1
332
+ },
333
+ "RadialGradient": {
334
+ "opacity": 1,
335
+ "blendMode": "normal",
336
+ "colorA": "#ff0000",
337
+ "colorB": "#0000ff",
338
+ "center": {
339
+ "x": 0.5,
340
+ "y": 0.5
322
341
  },
323
- radius: 1,
324
- colorSpace: "linear"
325
- },
326
- RectangularCoordinates: {
327
- opacity: 1,
328
- blendMode: "normal",
329
- center: {
330
- x: 0.5,
331
- y: 0.5
342
+ "radius": 1,
343
+ "colorSpace": "linear"
344
+ },
345
+ "RectangularCoordinates": {
346
+ "opacity": 1,
347
+ "blendMode": "normal",
348
+ "center": {
349
+ "x": 0.5,
350
+ "y": 0.5
332
351
  },
333
- scale: 1,
334
- intensity: 1,
335
- edges: "transparent"
336
- },
337
- Ripples: {
338
- opacity: 1,
339
- blendMode: "normal",
340
- center: {
341
- x: 0.5,
342
- y: 0.5
352
+ "scale": 1,
353
+ "intensity": 1,
354
+ "edges": "transparent"
355
+ },
356
+ "Ripples": {
357
+ "opacity": 1,
358
+ "blendMode": "normal",
359
+ "center": {
360
+ "x": 0.5,
361
+ "y": 0.5
343
362
  },
344
- colorA: "#ffffff",
345
- colorB: "#000000",
346
- speed: 1,
347
- frequency: 20,
348
- softness: 0,
349
- thickness: 0.5,
350
- phase: 0
351
- },
352
- Saturation: {
353
- opacity: 1,
354
- blendMode: "normal",
355
- intensity: 1
356
- },
357
- SimplexNoise: {
358
- opacity: 1,
359
- blendMode: "normal",
360
- colorA: "#ffffff",
361
- colorB: "#000000",
362
- scale: 2,
363
- balance: 0,
364
- contrast: 0,
365
- seed: 0,
366
- speed: 1
367
- },
368
- SineWave: {
369
- opacity: 1,
370
- blendMode: "normal",
371
- color: "#ffffff",
372
- amplitude: 0.15,
373
- frequency: 1,
374
- speed: 1,
375
- angle: 0,
376
- position: {
377
- x: 0.5,
378
- y: 0.5
363
+ "colorA": "#ffffff",
364
+ "colorB": "#000000",
365
+ "speed": 1,
366
+ "frequency": 20,
367
+ "softness": 0,
368
+ "thickness": 0.5,
369
+ "phase": 0
370
+ },
371
+ "Saturation": {
372
+ "opacity": 1,
373
+ "blendMode": "normal",
374
+ "intensity": 1
375
+ },
376
+ "SimplexNoise": {
377
+ "opacity": 1,
378
+ "blendMode": "normal",
379
+ "colorA": "#ffffff",
380
+ "colorB": "#000000",
381
+ "scale": 2,
382
+ "balance": 0,
383
+ "contrast": 0,
384
+ "seed": 0,
385
+ "speed": 1
386
+ },
387
+ "SineWave": {
388
+ "opacity": 1,
389
+ "blendMode": "normal",
390
+ "color": "#ffffff",
391
+ "amplitude": 0.15,
392
+ "frequency": 1,
393
+ "speed": 1,
394
+ "angle": 0,
395
+ "position": {
396
+ "x": 0.5,
397
+ "y": 0.5
379
398
  },
380
- thickness: 0.2,
381
- softness: 0.4
382
- },
383
- SolidColor: {
384
- opacity: 1,
385
- blendMode: "normal",
386
- color: "#5b18ca"
387
- },
388
- Spherize: {
389
- opacity: 1,
390
- blendMode: "normal",
391
- radius: 1,
392
- depth: 1,
393
- center: {
394
- x: 0.5,
395
- y: 0.5
399
+ "thickness": 0.2,
400
+ "softness": 0.4
401
+ },
402
+ "SolidColor": {
403
+ "opacity": 1,
404
+ "blendMode": "normal",
405
+ "color": "#5b18ca"
406
+ },
407
+ "Spherize": {
408
+ "opacity": 1,
409
+ "blendMode": "normal",
410
+ "radius": 1,
411
+ "depth": 1,
412
+ "center": {
413
+ "x": 0.5,
414
+ "y": 0.5
396
415
  },
397
- lightPosition: {
398
- x: 0.3,
399
- y: 0.3
416
+ "lightPosition": {
417
+ "x": 0.3,
418
+ "y": 0.3
400
419
  },
401
- lightIntensity: 0.5,
402
- lightSoftness: 0.5,
403
- lightColor: "#ffffff"
404
- },
405
- Spiral: {
406
- opacity: 1,
407
- blendMode: "normal",
408
- colorA: "#000000",
409
- colorB: "#ffffff",
410
- strokeWidth: 0.5,
411
- strokeFalloff: 0,
412
- softness: 0,
413
- speed: 1,
414
- center: {
415
- x: 0.5,
416
- y: 0.5
420
+ "lightIntensity": 0.5,
421
+ "lightSoftness": 0.5,
422
+ "lightColor": "#ffffff"
423
+ },
424
+ "Spiral": {
425
+ "opacity": 1,
426
+ "blendMode": "normal",
427
+ "colorA": "#000000",
428
+ "colorB": "#ffffff",
429
+ "strokeWidth": 0.5,
430
+ "strokeFalloff": 0,
431
+ "softness": 0,
432
+ "speed": 1,
433
+ "center": {
434
+ "x": 0.5,
435
+ "y": 0.5
417
436
  },
418
- scale: 1,
419
- colorSpace: "linear"
420
- },
421
- Strands: {
422
- opacity: 1,
423
- blendMode: "normal",
424
- speed: 0.5,
425
- amplitude: 1,
426
- frequency: 1,
427
- lineCount: 12,
428
- lineWidth: 0.1,
429
- waveColor: "#f1c907",
430
- pinEdges: !0,
431
- start: {
432
- x: 0,
433
- y: 0.5
437
+ "scale": 1,
438
+ "colorSpace": "linear"
439
+ },
440
+ "Strands": {
441
+ "opacity": 1,
442
+ "blendMode": "normal",
443
+ "speed": 0.5,
444
+ "amplitude": 1,
445
+ "frequency": 1,
446
+ "lineCount": 12,
447
+ "lineWidth": 0.1,
448
+ "waveColor": "#f1c907",
449
+ "pinEdges": true,
450
+ "start": {
451
+ "x": 0,
452
+ "y": 0.5
434
453
  },
435
- end: {
436
- x: 1,
437
- y: 0.5
454
+ "end": {
455
+ "x": 1,
456
+ "y": 0.5
438
457
  }
439
458
  },
440
- Stretch: {
441
- opacity: 1,
442
- blendMode: "normal",
443
- center: {
444
- x: 0.5,
445
- y: 0.5
459
+ "Stretch": {
460
+ "opacity": 1,
461
+ "blendMode": "normal",
462
+ "center": {
463
+ "x": 0.5,
464
+ "y": 0.5
446
465
  },
447
- strength: 1,
448
- angle: 0,
449
- falloff: 0,
450
- edges: "stretch"
451
- },
452
- Swirl: {
453
- opacity: 1,
454
- blendMode: "normal",
455
- colorA: "#1275d8",
456
- colorB: "#e19136",
457
- speed: 1,
458
- detail: 1,
459
- blend: 50,
460
- coarseX: 50,
461
- coarseY: 50,
462
- mediumX: 50,
463
- mediumY: 50,
464
- fineX: 50,
465
- fineY: 50,
466
- colorSpace: "linear"
467
- },
468
- TiltShift: {
469
- opacity: 1,
470
- blendMode: "normal",
471
- intensity: 50,
472
- width: 0.3,
473
- falloff: 0.3,
474
- angle: 0,
475
- center: {
476
- x: 0.5,
477
- y: 0.5
466
+ "strength": 1,
467
+ "angle": 0,
468
+ "falloff": 0,
469
+ "edges": "stretch"
470
+ },
471
+ "Swirl": {
472
+ "opacity": 1,
473
+ "blendMode": "normal",
474
+ "colorA": "#1275d8",
475
+ "colorB": "#e19136",
476
+ "speed": 1,
477
+ "detail": 1,
478
+ "blend": 50,
479
+ "coarseX": 50,
480
+ "coarseY": 50,
481
+ "mediumX": 50,
482
+ "mediumY": 50,
483
+ "fineX": 50,
484
+ "fineY": 50,
485
+ "colorSpace": "linear"
486
+ },
487
+ "TiltShift": {
488
+ "opacity": 1,
489
+ "blendMode": "normal",
490
+ "intensity": 50,
491
+ "width": 0.3,
492
+ "falloff": 0.3,
493
+ "angle": 0,
494
+ "center": {
495
+ "x": 0.5,
496
+ "y": 0.5
478
497
  }
479
498
  },
480
- Tritone: {
481
- opacity: 1,
482
- blendMode: "normal",
483
- colorA: "#ce1bea",
484
- colorB: "#2fff00",
485
- colorC: "#ffff00",
486
- blendMid: 0.5,
487
- colorSpace: "linear"
488
- },
489
- Twirl: {
490
- opacity: 1,
491
- blendMode: "normal",
492
- center: {
493
- x: 0.5,
494
- y: 0.5
499
+ "Tritone": {
500
+ "opacity": 1,
501
+ "blendMode": "normal",
502
+ "colorA": "#ce1bea",
503
+ "colorB": "#2fff00",
504
+ "colorC": "#ffff00",
505
+ "blendMid": 0.5,
506
+ "colorSpace": "linear"
507
+ },
508
+ "Twirl": {
509
+ "opacity": 1,
510
+ "blendMode": "normal",
511
+ "center": {
512
+ "x": 0.5,
513
+ "y": 0.5
495
514
  },
496
- intensity: 1,
497
- edges: "stretch"
498
- },
499
- Vibrance: {
500
- opacity: 1,
501
- blendMode: "normal",
502
- intensity: 0
503
- },
504
- WaveDistortion: {
505
- opacity: 1,
506
- blendMode: "normal",
507
- strength: 0.3,
508
- frequency: 1,
509
- speed: 1,
510
- angle: 0,
511
- waveType: "sine",
512
- edges: "stretch"
513
- },
514
- ZoomBlur: {
515
- opacity: 1,
516
- blendMode: "normal",
517
- intensity: 30,
518
- center: {
519
- x: 0.5,
520
- y: 0.5
515
+ "intensity": 1,
516
+ "edges": "stretch"
517
+ },
518
+ "Vibrance": {
519
+ "opacity": 1,
520
+ "blendMode": "normal",
521
+ "intensity": 0
522
+ },
523
+ "WaveDistortion": {
524
+ "opacity": 1,
525
+ "blendMode": "normal",
526
+ "strength": 0.3,
527
+ "frequency": 1,
528
+ "speed": 1,
529
+ "angle": 0,
530
+ "waveType": "sine",
531
+ "edges": "stretch"
532
+ },
533
+ "ZoomBlur": {
534
+ "opacity": 1,
535
+ "blendMode": "normal",
536
+ "intensity": 30,
537
+ "center": {
538
+ "x": 0.5,
539
+ "y": 0.5
521
540
  }
522
541
  }
523
542
  };
524
- function f(t, l, i = " ") {
525
- return Object.entries(t).filter(([e, o]) => {
526
- const r = d[l] || {};
527
- if (r.hasOwnProperty(e)) {
528
- const n = r[e];
529
- return o !== null && n !== null && typeof o == "object" && typeof n == "object" ? JSON.stringify(o) !== JSON.stringify(n) : o !== n;
543
+ function generatePropString(props, componentType, indent = " ") {
544
+ return Object.entries(props).filter(([key, value]) => {
545
+ const componentDefaults = shaderMetadata[componentType] || {};
546
+ if (componentDefaults.hasOwnProperty(key)) {
547
+ const defaultValue = componentDefaults[key];
548
+ if (value !== null && defaultValue !== null && typeof value === "object" && typeof defaultValue === "object") {
549
+ return JSON.stringify(value) !== JSON.stringify(defaultValue);
550
+ }
551
+ return value !== defaultValue;
552
+ }
553
+ if (key === "opacity" && value === 1) return false;
554
+ if (key === "blendMode" && value === "normal") return false;
555
+ return true;
556
+ }).map(([key, value]) => {
557
+ if (typeof value === "string") {
558
+ return `${key}=${JSON.stringify(value)}`;
559
+ } else if (value !== null && typeof value === "object") {
560
+ return `${key}={${JSON.stringify(value)}}`;
561
+ } else {
562
+ return `${key}={${value}}`;
530
563
  }
531
- return !(e === "opacity" && o === 1 || e === "blendMode" && o === "normal");
532
- }).map(([e, o]) => typeof o == "string" ? `${e}=${JSON.stringify(o)}` : o !== null && typeof o == "object" ? `${e}={${JSON.stringify(o)}}` : `${e}={${o}}`).join(`
533
- ` + i + " ");
564
+ }).join("\n" + indent + " ");
534
565
  }
535
- function p(t, l) {
536
- const i = [];
537
- function e(o) {
538
- for (const r of o)
539
- i.push(r), r.children && e(r.children);
566
+ function isIdUsedAsMaskSource(id, allComponents) {
567
+ const flatComponents = [];
568
+ function flattenComponents(components) {
569
+ for (const component of components) {
570
+ flatComponents.push(component);
571
+ if (component.children) {
572
+ flattenComponents(component.children);
573
+ }
574
+ }
540
575
  }
541
- return e(l), i.some(
542
- (o) => {
543
- var r;
544
- return ((r = o.props) == null ? void 0 : r.maskSource) === t;
576
+ flattenComponents(allComponents);
577
+ return flatComponents.some(
578
+ (component) => {
579
+ var _a;
580
+ return ((_a = component.props) == null ? void 0 : _a.maskSource) === id;
545
581
  }
546
582
  );
547
583
  }
548
- function y(t) {
549
- const l = (e, o = " ") => {
550
- const r = e.props ? f(e.props, e.type, o) : "";
551
- let n = "";
552
- e.id && p(e.id, t.components) && (n = `id="${e.id}"`);
553
- const a = [n, r].filter(Boolean).join(`
554
- ` + o + " ");
555
- if (e.children && e.children.length > 0) {
556
- const s = e.children.map((c) => l(c, o + " ")).join(`
557
- `);
558
- return a ? `${o}<${e.type}
559
- ${o} ${a}>
560
- ${s}
561
- ${o}</${e.type}>` : `${o}<${e.type}>
562
- ${s}
563
- ${o}</${e.type}>`;
564
- } else
565
- return a ? `${o}<${e.type}
566
- ${o} ${a} />` : `${o}<${e.type} />`;
584
+ function generatePresetCode(preset) {
585
+ const generateComponentString = (config, indent = " ") => {
586
+ const propString = config.props ? generatePropString(config.props, config.type, indent) : "";
587
+ let idString = "";
588
+ if (config.id) {
589
+ const isUsedAsMask = isIdUsedAsMaskSource(config.id, preset.components);
590
+ if (isUsedAsMask) {
591
+ idString = `id="${config.id}"`;
592
+ }
593
+ }
594
+ const attributes = [idString, propString].filter(Boolean).join("\n" + indent + " ");
595
+ if (config.children && config.children.length > 0) {
596
+ const childrenString = config.children.map((child) => generateComponentString(child, indent + " ")).join("\n");
597
+ if (attributes) {
598
+ return `${indent}<${config.type}
599
+ ${indent} ${attributes}>
600
+ ${childrenString}
601
+ ${indent}</${config.type}>`;
602
+ } else {
603
+ return `${indent}<${config.type}>
604
+ ${childrenString}
605
+ ${indent}</${config.type}>`;
606
+ }
607
+ } else {
608
+ if (attributes) {
609
+ return `${indent}<${config.type}
610
+ ${indent} ${attributes} />`;
611
+ } else {
612
+ return `${indent}<${config.type} />`;
613
+ }
614
+ }
567
615
  };
616
+ const componentStrings = preset.components.map((config) => generateComponentString(config)).join("\n");
568
617
  return `<Shader>
569
- ${t.components.map((e) => l(e)).join(`
570
- `)}
618
+ ${componentStrings}
571
619
  </Shader>`;
572
620
  }
573
- const m = [
621
+ const availableComponents = [
574
622
  // @ts-ignore - replaced at build time
575
623
  "AngularBlur",
576
624
  "Ascii",
625
+ "Beam",
577
626
  "Blob",
578
627
  "Blur",
579
628
  "Bulge",
@@ -628,6 +677,6 @@ const m = [
628
677
  "ZoomBlur"
629
678
  ];
630
679
  export {
631
- m as availableComponents,
632
- y as generatePresetCode
680
+ availableComponents,
681
+ generatePresetCode
633
682
  };