shaders 2.2.24 → 2.2.26

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 (198) hide show
  1. package/dist/core/AngularBlur-Dl2gwk68.js +64 -0
  2. package/dist/core/Ascii-DsuNLJKv.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-BIFNsUYG.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-Cq8j0QIU.js +66 -0
  16. package/dist/core/DotGrid-BHfQ3hcI.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-CP6GqC3k.js +217 -0
  20. package/dist/core/GlassTiles-CXChgYaL.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-Bi-XBvO_.js +18 -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-DvOpzM7W.js +47 -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-JF72DGuK.js +37 -0
  35. package/dist/core/PolarCoordinates-DDvDhBE-.js +112 -0
  36. package/dist/core/Posterize-DIjjPS72.js +28 -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-J0nI4hmh.js +28 -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-BI5q7_Wt.js +32 -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 -1606
  59. package/dist/core/shaders/AngularBlur/index.js +3 -7
  60. package/dist/core/shaders/Ascii/index.js +2 -6
  61. package/dist/core/shaders/Beam/index.js +4 -8
  62. package/dist/core/shaders/Blob/index.js +5 -9
  63. package/dist/core/shaders/Blur/index.js +2 -6
  64. package/dist/core/shaders/Bulge/index.js +4 -8
  65. package/dist/core/shaders/CRTScreen/index.js +2 -6
  66. package/dist/core/shaders/ChannelBlur/index.js +2 -6
  67. package/dist/core/shaders/Checkerboard/index.js +4 -8
  68. package/dist/core/shaders/ChromaFlow/index.js +3 -7
  69. package/dist/core/shaders/ChromaticAberration/index.js +3 -7
  70. package/dist/core/shaders/Circle/index.js +3 -7
  71. package/dist/core/shaders/CursorTrail/index.js +4 -8
  72. package/dist/core/shaders/DiffuseBlur/index.js +4 -8
  73. package/dist/core/shaders/Dither/index.js +3 -7
  74. package/dist/core/shaders/DotGrid/index.js +3 -7
  75. package/dist/core/shaders/Duotone/index.js +4 -8
  76. package/dist/core/shaders/FilmGrain/index.js +2 -6
  77. package/dist/core/shaders/FloatingParticles/index.js +3 -7
  78. package/dist/core/shaders/GlassTiles/index.js +2 -6
  79. package/dist/core/shaders/Glow/index.js +2 -6
  80. package/dist/core/shaders/Godrays/index.js +3 -7
  81. package/dist/core/shaders/Grayscale/index.d.ts.map +1 -1
  82. package/dist/core/shaders/Grayscale/index.js +2 -8
  83. package/dist/core/shaders/Grid/index.js +3 -7
  84. package/dist/core/shaders/GridDistortion/index.js +4 -8
  85. package/dist/core/shaders/Group/index.js +2 -6
  86. package/dist/core/shaders/Halftone/index.js +3 -7
  87. package/dist/core/shaders/HueShift/index.d.ts.map +1 -1
  88. package/dist/core/shaders/HueShift/index.js +2 -8
  89. package/dist/core/shaders/ImageTexture/index.js +2 -6
  90. package/dist/core/shaders/Invert/index.js +2 -6
  91. package/dist/core/shaders/LinearBlur/index.js +3 -7
  92. package/dist/core/shaders/LinearGradient/index.js +4 -8
  93. package/dist/core/shaders/Liquify/index.js +4 -8
  94. package/dist/core/shaders/Pixelate/index.js +2 -6
  95. package/dist/core/shaders/PolarCoordinates/index.js +4 -8
  96. package/dist/core/shaders/Posterize/index.d.ts.map +1 -1
  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.d.ts.map +1 -1
  103. package/dist/core/shaders/Saturation/index.js +2 -8
  104. package/dist/core/shaders/SimplexNoise/index.js +5 -9
  105. package/dist/core/shaders/SineWave/index.js +3 -7
  106. package/dist/core/shaders/SolidColor/index.js +3 -7
  107. package/dist/core/shaders/Spherize/index.js +3 -7
  108. package/dist/core/shaders/Spiral/index.js +4 -8
  109. package/dist/core/shaders/Strands/index.js +4 -8
  110. package/dist/core/shaders/Stretch/index.js +4 -8
  111. package/dist/core/shaders/Swirl/index.js +5 -9
  112. package/dist/core/shaders/TiltShift/index.js +3 -7
  113. package/dist/core/shaders/Tritone/index.js +4 -8
  114. package/dist/core/shaders/Twirl/index.js +4 -8
  115. package/dist/core/shaders/Vibrance/index.d.ts.map +1 -1
  116. package/dist/core/shaders/Vibrance/index.js +2 -8
  117. package/dist/core/shaders/WaveDistortion/index.js +4 -8
  118. package/dist/core/shaders/ZoomBlur/index.js +3 -7
  119. package/dist/core/telemetry/index.js +189 -157
  120. package/dist/core/time-CTJvRUZ4.js +10 -0
  121. package/dist/core/transformations-DxfQXZWi.js +4715 -0
  122. package/dist/react/generatePresetCode-CCibXbtZ.js +645 -0
  123. package/dist/react/index.js +7645 -104827
  124. package/dist/react/utils/generatePresetCode.js +2 -5
  125. package/dist/solid/index.js +6670 -102727
  126. package/dist/solid/utils/generatePresetCode.js +583 -554
  127. package/dist/svelte/generatePresetCode-CymgoDq_.js +645 -0
  128. package/dist/svelte/index.js +6175 -102645
  129. package/dist/svelte/utils/generatePresetCode.js +2 -5
  130. package/dist/vue/generatePresetCode-CRJmU8iF.js +649 -0
  131. package/dist/vue/index.js +6929 -103706
  132. package/dist/vue/utils/generatePresetCode.js +2 -5
  133. package/package.json +4 -1
  134. package/dist/core/AngularBlur-ClvtyURQ.js +0 -56
  135. package/dist/core/Ascii-BT0-K_vw.js +0 -196
  136. package/dist/core/Beam-BAKql1AP.js +0 -116
  137. package/dist/core/Blob-CVSxhHJG.js +0 -169
  138. package/dist/core/Blur-C1TTBHCX.js +0 -64
  139. package/dist/core/Bulge-DV8tX-cw.js +0 -103
  140. package/dist/core/CRTScreen-VTJQoOeq.js +0 -91
  141. package/dist/core/ChannelBlur-BLZ9kBNA.js +0 -89
  142. package/dist/core/Checkerboard-DQ4Df3vm.js +0 -75
  143. package/dist/core/ChromaFlow-BggN1_Av.js +0 -134
  144. package/dist/core/ChromaticAberration-DlTaHNcp.js +0 -82
  145. package/dist/core/Circle-B9ObWlq5.js +0 -62
  146. package/dist/core/ColorAdjustment-FeXXpypd.js +0 -14
  147. package/dist/core/CursorTrail-C7QdUj8O.js +0 -105
  148. package/dist/core/DiffuseBlur-Mx6LBsqz.js +0 -69
  149. package/dist/core/Dither-CeIdV_9C.js +0 -61
  150. package/dist/core/DotGrid-D6xUvYrt.js +0 -61
  151. package/dist/core/Duotone-C2Pqt2gR.js +0 -66
  152. package/dist/core/FilmGrain-CJ9n_fgk.js +0 -28
  153. package/dist/core/FloatingParticles-iGtMs44K.js +0 -160
  154. package/dist/core/GlassTiles-D_lVyag2.js +0 -52
  155. package/dist/core/Glow-B0jj-6OC.js +0 -66
  156. package/dist/core/Godrays-DjLVuZa4.js +0 -105
  157. package/dist/core/Grayscale-BbsdDa_X.js +0 -21
  158. package/dist/core/Grid-ByjU-_ua.js +0 -50
  159. package/dist/core/GridDistortion-C_eIlhkW.js +0 -147
  160. package/dist/core/Group-CyaDLGpI.js +0 -17
  161. package/dist/core/Halftone-BvuAe_k-.js +0 -55
  162. package/dist/core/HueShift-B_qE9c08.js +0 -32
  163. package/dist/core/ImageTexture-h00TFC1l.js +0 -105
  164. package/dist/core/Invert-BEDDB0sm.js +0 -20
  165. package/dist/core/LinearBlur-CLKxuyeT.js +0 -56
  166. package/dist/core/LinearGradient-BPo8TX_M.js +0 -111
  167. package/dist/core/Liquify-DGkfeixZ.js +0 -139
  168. package/dist/core/Pixelate-Bzy_7LnJ.js +0 -38
  169. package/dist/core/PolarCoordinates-BUumPeTv.js +0 -103
  170. package/dist/core/Posterize-ggKIJlmm.js +0 -46
  171. package/dist/core/ProgressiveBlur-D6_6T7SS.js +0 -102
  172. package/dist/core/RadialGradient-DEY9fRqa.js +0 -71
  173. package/dist/core/RectangularCoordinates-CZ-cFrCh.js +0 -92
  174. package/dist/core/Ripples-BwNlcsnV.js +0 -106
  175. package/dist/core/Saturation-Dl3gCWuZ.js +0 -31
  176. package/dist/core/SimplexNoise-BhE_WyGt.js +0 -94
  177. package/dist/core/SineWave-Db_Y0Mcv.js +0 -107
  178. package/dist/core/SolidColor-CerOp4EQ.js +0 -22
  179. package/dist/core/Spherize-Dh8E5XwG.js +0 -103
  180. package/dist/core/Spiral-BvygQEfP.js +0 -115
  181. package/dist/core/Strands-maaPn4On.js +0 -125
  182. package/dist/core/Stretch-CnA0-nSz.js +0 -103
  183. package/dist/core/Swirl-CQBUahTB.js +0 -148
  184. package/dist/core/TSLBase-Bt7Z4hv_.js +0 -8053
  185. package/dist/core/TiltShift-qFj0oFzN.js +0 -114
  186. package/dist/core/Tritone-AiixmTg8.js +0 -75
  187. package/dist/core/Twirl-ooHQcV89.js +0 -82
  188. package/dist/core/Vibrance-C2FRlLkK.js +0 -31
  189. package/dist/core/WaveDistortion-CN8MjKlm.js +0 -132
  190. package/dist/core/ZoomBlur-CxWGx8PH.js +0 -56
  191. package/dist/core/colorMixing--dhzx0ch.js +0 -21
  192. package/dist/core/edges-CDzKsauJ.js +0 -15
  193. package/dist/core/three.tsl-Btj1hLsf.js +0 -43845
  194. package/dist/core/time-DbRMw6Jm.js +0 -10
  195. package/dist/core/transformations-CsrIJXh-.js +0 -3992
  196. package/dist/react/generatePresetCode-CVj6IV8Y.js +0 -646
  197. package/dist/svelte/generatePresetCode-CVj6IV8Y.js +0 -646
  198. package/dist/vue/generatePresetCode-DCaIsDhE.js +0 -652
@@ -0,0 +1,71 @@
1
+ import { i as transformColorSpace, o as transformPosition, r as transformColor, t as colorSpaceOptions } from "./transformations-DxfQXZWi.js";
2
+ import { t as mixColors } from "./colorMixing-BXiTAqJU.js";
3
+ import * as TSL from "three/tsl";
4
+ const componentDefinition = {
5
+ name: "RadialGradient",
6
+ category: "Base Layers",
7
+ description: "Radial gradient radiating from a center point",
8
+ acceptsUVContext: true,
9
+ props: {
10
+ colorA: {
11
+ default: "#ff0000",
12
+ transform: transformColor,
13
+ description: "The starting color at the center of the gradient",
14
+ ui: {
15
+ type: "color",
16
+ label: "Color A"
17
+ }
18
+ },
19
+ colorB: {
20
+ default: "#0000ff",
21
+ transform: transformColor,
22
+ description: "The ending color at the edge of the gradient",
23
+ ui: {
24
+ type: "color",
25
+ label: "Color B"
26
+ }
27
+ },
28
+ center: {
29
+ default: {
30
+ x: .5,
31
+ y: .5
32
+ },
33
+ transform: transformPosition,
34
+ description: "The center point of the radial gradient",
35
+ ui: {
36
+ type: "position",
37
+ label: "Center"
38
+ }
39
+ },
40
+ radius: {
41
+ default: 1,
42
+ description: "The radius of the gradient (normalized, 0.0-1.0)",
43
+ ui: {
44
+ type: "range",
45
+ min: 0,
46
+ max: 2,
47
+ step: .01,
48
+ label: "Radius"
49
+ }
50
+ },
51
+ colorSpace: {
52
+ default: "linear",
53
+ transform: transformColorSpace,
54
+ description: "Color space for color interpolation",
55
+ ui: {
56
+ type: "select",
57
+ options: colorSpaceOptions,
58
+ label: "Color Space"
59
+ }
60
+ }
61
+ },
62
+ fragmentNode: ({ uniforms, uvContext }) => {
63
+ const { vec2: vec2$1, float: float$1, distance, screenUV: screenUV$1, viewportSize: viewportSize$1 } = TSL;
64
+ const uv = uvContext ?? screenUV$1;
65
+ const aspect = viewportSize$1.x.div(viewportSize$1.y);
66
+ const t = distance(vec2$1(uv.x.mul(aspect), uv.y), vec2$1(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus())).div(uniforms.radius.uniform).clamp(float$1(0), float$1(1));
67
+ return mixColors(uniforms.colorA.uniform, uniforms.colorB.uniform, t, uniforms.colorSpace.uniform);
68
+ }
69
+ };
70
+ var RadialGradient_default = componentDefinition;
71
+ export { componentDefinition as n, RadialGradient_default as t };
@@ -0,0 +1,101 @@
1
+ import { t as applyEdgeHandling } from "./edges-Bn_OIa_h.js";
2
+ import { a as transformEdges, o as transformPosition } from "./transformations-DxfQXZWi.js";
3
+ import * as TSL from "three/tsl";
4
+ const componentDefinition = {
5
+ name: "RectangularCoordinates",
6
+ category: "Distortions",
7
+ description: "Convert polar coordinates back to rectangular space",
8
+ requiresRTT: true,
9
+ requiresChild: true,
10
+ props: {
11
+ center: {
12
+ default: {
13
+ x: .5,
14
+ y: .5
15
+ },
16
+ transform: transformPosition,
17
+ description: "The center point for rectangular coordinate conversion",
18
+ ui: {
19
+ type: "position",
20
+ label: "Center"
21
+ }
22
+ },
23
+ scale: {
24
+ default: 1,
25
+ description: "Scale factor for the rectangular output",
26
+ ui: {
27
+ type: "range",
28
+ min: .1,
29
+ max: 3,
30
+ step: .01,
31
+ label: "Scale"
32
+ }
33
+ },
34
+ intensity: {
35
+ default: 1,
36
+ description: "Blends between original UVs (0) and rectangular coordinates (1)",
37
+ ui: {
38
+ type: "range",
39
+ min: 0,
40
+ max: 1,
41
+ step: .01,
42
+ label: "Intensity"
43
+ }
44
+ },
45
+ edges: {
46
+ default: "transparent",
47
+ description: "How to handle edges when distortion pushes content out of bounds",
48
+ transform: transformEdges,
49
+ ui: {
50
+ type: "select",
51
+ options: [
52
+ {
53
+ label: "Stretch",
54
+ value: "stretch"
55
+ },
56
+ {
57
+ label: "Transparent",
58
+ value: "transparent"
59
+ },
60
+ {
61
+ label: "Mirror",
62
+ value: "mirror"
63
+ },
64
+ {
65
+ label: "Wrap",
66
+ value: "wrap"
67
+ }
68
+ ],
69
+ label: "Edges"
70
+ }
71
+ }
72
+ },
73
+ uvTransformNode: ({ uv, uniforms, viewportSize: viewportSize$1 }) => {
74
+ const { vec2: vec2$1, cos: cos$1, sin: sin$1, PI, mix: mix$1 } = TSL;
75
+ const theta = uv.x.mul(PI.mul(2)).sub(PI);
76
+ const r = uv.y.mul(uniforms.scale.uniform);
77
+ const rectX = r.mul(cos$1(theta));
78
+ const rectY = r.mul(sin$1(theta));
79
+ const aspect = viewportSize$1.x.div(viewportSize$1.y);
80
+ const centerPos = vec2$1(uniforms.center.uniform.x, uniforms.center.uniform.y.oneMinus());
81
+ return mix$1(uv, vec2$1(rectX.div(aspect).add(centerPos.x), rectY.add(centerPos.y)), uniforms.intensity.uniform);
82
+ },
83
+ fragmentNode: ({ uniforms, childNode, onCleanup }) => {
84
+ const { vec2: vec2$1, vec4: vec4$1, cos: cos$1, sin: sin$1, screenUV: screenUV$1, viewportSize: viewportSize$1, convertToTexture: convertToTexture$1, PI, mix: mix$1 } = TSL;
85
+ if (!childNode) return vec4$1(0, 0, 0, 0);
86
+ const childTexture = convertToTexture$1(childNode);
87
+ onCleanup(() => {
88
+ if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
89
+ });
90
+ const theta = screenUV$1.x.mul(PI.mul(2)).sub(PI);
91
+ const r = screenUV$1.y.mul(uniforms.scale.uniform);
92
+ const rectX = r.mul(cos$1(theta));
93
+ const rectY = r.mul(sin$1(theta));
94
+ const aspect = viewportSize$1.x.div(viewportSize$1.y);
95
+ const centerPos = vec2$1(uniforms.center.uniform.x, uniforms.center.uniform.y.oneMinus());
96
+ const blendedUV = mix$1(screenUV$1, vec2$1(rectX.div(aspect).add(centerPos.x), rectY.add(centerPos.y)), uniforms.intensity.uniform);
97
+ return applyEdgeHandling(blendedUV, childTexture.sample(blendedUV), childTexture, uniforms.edges.uniform);
98
+ }
99
+ };
100
+ var RectangularCoordinates_default = componentDefinition;
101
+ export { componentDefinition as n, RectangularCoordinates_default as t };
@@ -0,0 +1,117 @@
1
+ import { t as createAnimatedTime } from "./time-CTJvRUZ4.js";
2
+ import { o as transformPosition, r as transformColor } from "./transformations-DxfQXZWi.js";
3
+ import { t as mixColors } from "./colorMixing-BXiTAqJU.js";
4
+ import * as TSL from "three/tsl";
5
+ const componentDefinition = {
6
+ name: "Ripples",
7
+ category: "Base Layers",
8
+ description: "Concentric animated ripples emanating from a point",
9
+ acceptsUVContext: true,
10
+ props: {
11
+ center: {
12
+ default: {
13
+ x: .5,
14
+ y: .5
15
+ },
16
+ transform: transformPosition,
17
+ description: "The center point where ripples emanate from",
18
+ ui: {
19
+ type: "position",
20
+ label: "Center"
21
+ }
22
+ },
23
+ colorA: {
24
+ default: "#ffffff",
25
+ transform: transformColor,
26
+ description: "Color of the ripple waves",
27
+ ui: {
28
+ type: "color",
29
+ label: "Color A"
30
+ }
31
+ },
32
+ colorB: {
33
+ default: "#000000",
34
+ transform: transformColor,
35
+ description: "Background color between ripples",
36
+ ui: {
37
+ type: "color",
38
+ label: "Color B"
39
+ }
40
+ },
41
+ speed: {
42
+ default: 1,
43
+ description: "Speed of ripple animation",
44
+ ui: {
45
+ type: "range",
46
+ min: -5,
47
+ max: 5,
48
+ step: .1,
49
+ label: "Speed"
50
+ }
51
+ },
52
+ frequency: {
53
+ default: 20,
54
+ description: "Number of ripples/spacing between them",
55
+ ui: {
56
+ type: "range",
57
+ min: 1,
58
+ max: 80,
59
+ step: .1,
60
+ label: "Frequency"
61
+ }
62
+ },
63
+ softness: {
64
+ default: 0,
65
+ description: "Softness of ripple edges",
66
+ ui: {
67
+ type: "range",
68
+ min: 0,
69
+ max: 3,
70
+ step: .01,
71
+ label: "Softness"
72
+ }
73
+ },
74
+ thickness: {
75
+ default: .5,
76
+ description: "Thickness of each ripple band",
77
+ ui: {
78
+ type: "range",
79
+ min: 0,
80
+ max: 1,
81
+ step: .01,
82
+ label: "Thickness"
83
+ }
84
+ },
85
+ phase: {
86
+ default: 0,
87
+ description: "Phase offset for ripple animation",
88
+ ui: {
89
+ type: "range",
90
+ min: 0,
91
+ max: 6.28,
92
+ step: .01,
93
+ label: "Phase"
94
+ }
95
+ }
96
+ },
97
+ fragmentNode: (params) => {
98
+ const { uniforms, uvContext } = params;
99
+ const { vec2: vec2$1, float: float$1, screenUV: screenUV$1, sin: sin$1, distance, viewportSize: viewportSize$1, smoothstep } = TSL;
100
+ const uv = uvContext ?? screenUV$1;
101
+ const center = uniforms.center.uniform;
102
+ const colorA = uniforms.colorA.uniform;
103
+ const colorB = uniforms.colorB.uniform;
104
+ const frequency = uniforms.frequency.uniform;
105
+ const softness = uniforms.softness.uniform;
106
+ const thickness = uniforms.thickness.uniform;
107
+ const phase = uniforms.phase.uniform;
108
+ const aspect = viewportSize$1.x.div(viewportSize$1.y);
109
+ const dist = distance(vec2$1(uv.x.mul(aspect), uv.y), vec2$1(center.x.mul(aspect), center.y.oneMinus()));
110
+ const animTime = createAnimatedTime(params, uniforms.speed);
111
+ const baseWave = sin$1(dist.mul(frequency).sub(animTime).add(phase));
112
+ const thicknessThreshold = thickness.mul(float$1(2)).sub(float$1(1));
113
+ return mixColors(colorB, colorA, smoothstep(thicknessThreshold.add(softness), thicknessThreshold.sub(softness), baseWave), TSL.float(0));
114
+ }
115
+ };
116
+ var Ripples_default = componentDefinition;
117
+ export { componentDefinition as n, Ripples_default as t };
@@ -0,0 +1,28 @@
1
+ import { dot, mix, vec3, vec4 } from "three/tsl";
2
+ const componentDefinition = {
3
+ name: "Saturation",
4
+ category: "Adjustments",
5
+ description: "Adjust color saturation intensity",
6
+ requiresChild: true,
7
+ props: { intensity: {
8
+ default: 1,
9
+ description: "The intensity of the saturation effect (1 being no change)",
10
+ ui: {
11
+ type: "range",
12
+ min: 0,
13
+ max: 3,
14
+ step: .01,
15
+ label: "Intensity"
16
+ }
17
+ } },
18
+ fragmentNode: ({ uniforms, childNode }) => {
19
+ if (!childNode) {
20
+ console.error("You must pass a child component into the Saturation shader.");
21
+ return vec4(0);
22
+ }
23
+ const luminance = dot(childNode.rgb, vec3(.2126, .7152, .0722));
24
+ return vec4(mix(vec3(luminance, luminance, luminance), childNode.rgb, uniforms.intensity.uniform), childNode.a);
25
+ }
26
+ };
27
+ var Saturation_default = componentDefinition;
28
+ export { componentDefinition as n, Saturation_default as t };
@@ -0,0 +1,99 @@
1
+ import { t as createAnimatedTime } from "./time-CTJvRUZ4.js";
2
+ import { r as transformColor } from "./transformations-DxfQXZWi.js";
3
+ import { t as mixColors } from "./colorMixing-BXiTAqJU.js";
4
+ import { clamp, exp, float, mx_noise_float, screenUV, vec2, vec3, viewportSize } from "three/tsl";
5
+ const componentDefinition = {
6
+ name: "SimplexNoise",
7
+ category: "Base Layers",
8
+ description: "Organic noise with animated movement",
9
+ acceptsUVContext: true,
10
+ props: {
11
+ colorA: {
12
+ default: "#ffffff",
13
+ description: "First color",
14
+ transform: transformColor,
15
+ ui: {
16
+ type: "color",
17
+ label: "Color A"
18
+ }
19
+ },
20
+ colorB: {
21
+ default: "#000000",
22
+ description: "Second color",
23
+ transform: transformColor,
24
+ ui: {
25
+ type: "color",
26
+ label: "Color B"
27
+ }
28
+ },
29
+ scale: {
30
+ default: 2,
31
+ description: "Pattern scale (higher = larger patterns)",
32
+ ui: {
33
+ type: "range",
34
+ min: -2,
35
+ max: 5,
36
+ step: .1,
37
+ label: "Scale"
38
+ }
39
+ },
40
+ balance: {
41
+ default: 0,
42
+ description: "Balance between colors (negative = more colorB, positive = more colorA)",
43
+ ui: {
44
+ type: "range",
45
+ min: -1,
46
+ max: 1,
47
+ step: .01,
48
+ label: "Balance"
49
+ }
50
+ },
51
+ contrast: {
52
+ default: 0,
53
+ description: "Pattern contrast (higher = sharper transitions)",
54
+ ui: {
55
+ type: "range",
56
+ min: -2,
57
+ max: 5,
58
+ step: .1,
59
+ label: "Contrast"
60
+ }
61
+ },
62
+ seed: {
63
+ default: 0,
64
+ description: "Random seed for pattern variation",
65
+ ui: {
66
+ type: "range",
67
+ min: 0,
68
+ max: 100,
69
+ step: 1,
70
+ label: "Seed"
71
+ }
72
+ },
73
+ speed: {
74
+ default: 1,
75
+ description: "Animation speed",
76
+ ui: {
77
+ type: "range",
78
+ min: 0,
79
+ max: 5,
80
+ step: .1,
81
+ label: "Speed"
82
+ }
83
+ }
84
+ },
85
+ fragmentNode: (params) => {
86
+ const { uniforms, uvContext } = params;
87
+ const uv = uvContext ?? screenUV;
88
+ const aspect = viewportSize.x.div(viewportSize.y);
89
+ const aspectCorrectedUV = vec2(uv.x.mul(aspect), uv.y);
90
+ const animTime = createAnimatedTime(params, uniforms.speed);
91
+ const pos = aspectCorrectedUV.mul(exp(uniforms.scale.uniform)).add(uniforms.seed.uniform);
92
+ const noise = mx_noise_float(vec3(pos.x, pos.y, animTime.mul(.5)));
93
+ const contrastMultiplier = uniforms.contrast.uniform.add(1);
94
+ const k = clamp(0, 1, noise.mul(contrastMultiplier).add(uniforms.balance.uniform).mul(.5).add(.5));
95
+ return mixColors(uniforms.colorB.uniform, uniforms.colorA.uniform, k, float(0));
96
+ }
97
+ };
98
+ var SimplexNoise_default = componentDefinition;
99
+ export { componentDefinition as n, SimplexNoise_default as t };
@@ -0,0 +1,120 @@
1
+ import { n as transformAngle, o as transformPosition, r as transformColor } from "./transformations-DxfQXZWi.js";
2
+ import * as TSL from "three/tsl";
3
+ const componentDefinition = {
4
+ name: "SineWave",
5
+ category: "Base Layers",
6
+ description: "Animated wave with thickness and softness",
7
+ acceptsUVContext: true,
8
+ props: {
9
+ color: {
10
+ default: "#ffffff",
11
+ transform: transformColor,
12
+ description: "The color of the sine wave",
13
+ ui: {
14
+ type: "color",
15
+ label: "Color"
16
+ }
17
+ },
18
+ amplitude: {
19
+ default: .15,
20
+ description: "The height/amplitude of the sine wave",
21
+ ui: {
22
+ type: "range",
23
+ min: 0,
24
+ max: 1,
25
+ step: .01,
26
+ label: "Amplitude"
27
+ }
28
+ },
29
+ frequency: {
30
+ default: 1,
31
+ description: "The frequency/number of wave cycles",
32
+ ui: {
33
+ type: "range",
34
+ min: .1,
35
+ max: 20,
36
+ step: .1,
37
+ label: "Frequency"
38
+ }
39
+ },
40
+ speed: {
41
+ default: 1,
42
+ description: "The animation speed of the wave",
43
+ ui: {
44
+ type: "range",
45
+ min: -5,
46
+ max: 5,
47
+ step: .1,
48
+ label: "Speed"
49
+ }
50
+ },
51
+ angle: {
52
+ default: 0,
53
+ transform: transformAngle,
54
+ description: "The rotation angle of the wave (in degrees)",
55
+ ui: {
56
+ type: "range",
57
+ min: 0,
58
+ max: 360,
59
+ step: 1,
60
+ label: "Angle"
61
+ }
62
+ },
63
+ position: {
64
+ default: {
65
+ x: .5,
66
+ y: .5
67
+ },
68
+ transform: transformPosition,
69
+ description: "The center position of the wave",
70
+ ui: {
71
+ type: "position",
72
+ label: "Position"
73
+ }
74
+ },
75
+ thickness: {
76
+ default: .2,
77
+ description: "The thickness of the wave line",
78
+ ui: {
79
+ type: "range",
80
+ min: 0,
81
+ max: 2,
82
+ step: .01,
83
+ label: "Thickness"
84
+ }
85
+ },
86
+ softness: {
87
+ default: .4,
88
+ description: "Edge softness of the wave line",
89
+ ui: {
90
+ type: "range",
91
+ min: 0,
92
+ max: 1,
93
+ step: .01,
94
+ label: "Softness"
95
+ }
96
+ }
97
+ },
98
+ fragmentNode: ({ uniforms, uvContext }) => {
99
+ const { vec2: vec2$1, vec4: vec4$1, sin: sin$1, cos: cos$1, abs: abs$1, smoothstep, screenUV: screenUV$1, viewportSize: viewportSize$1, time, radians, PI } = TSL;
100
+ const uv = uvContext ?? screenUV$1;
101
+ const aspect = viewportSize$1.x.div(viewportSize$1.y);
102
+ const aspectCorrectedUV = vec2$1(uv.x.mul(aspect), uv.y);
103
+ const centerPos = vec2$1(uniforms.position.uniform.x.mul(aspect), uniforms.position.uniform.y.oneMinus());
104
+ const centeredUV = aspectCorrectedUV.sub(centerPos);
105
+ const angleRad = radians(uniforms.angle.uniform);
106
+ const cosAngle = cos$1(angleRad);
107
+ const sinAngle = sin$1(angleRad);
108
+ const rotatedX = centeredUV.x.mul(cosAngle).sub(centeredUV.y.mul(sinAngle));
109
+ const rotatedY = centeredUV.x.mul(sinAngle).add(centeredUV.y.mul(cosAngle));
110
+ const animatedTime = time.mul(uniforms.speed.uniform);
111
+ const sineWave = sin$1(rotatedX.mul(uniforms.frequency.uniform).mul(PI.mul(2)).add(animatedTime)).mul(uniforms.amplitude.uniform);
112
+ const distanceFromWave = abs$1(rotatedY.sub(sineWave));
113
+ const halfThickness = uniforms.thickness.uniform.mul(.5);
114
+ const halfSoftness = uniforms.softness.uniform.mul(.5);
115
+ const waveMask = smoothstep(halfThickness.add(halfSoftness), halfThickness.sub(halfSoftness), distanceFromWave);
116
+ return vec4$1(uniforms.color.uniform.rgb, uniforms.color.uniform.a.mul(waveMask));
117
+ }
118
+ };
119
+ var SineWave_default = componentDefinition;
120
+ export { componentDefinition as n, SineWave_default as t };
@@ -0,0 +1,21 @@
1
+ import { r as transformColor } from "./transformations-DxfQXZWi.js";
2
+ const componentDefinition = {
3
+ name: "SolidColor",
4
+ category: "Base Layers",
5
+ description: "Fill the canvas with a single solid color",
6
+ acceptsUVContext: true,
7
+ props: { color: {
8
+ default: "#5b18ca",
9
+ transform: transformColor,
10
+ description: "The solid color to display",
11
+ ui: {
12
+ type: "color",
13
+ label: "Color"
14
+ }
15
+ } },
16
+ fragmentNode: ({ uniforms }) => {
17
+ return uniforms.color.uniform;
18
+ }
19
+ };
20
+ var SolidColor_default = componentDefinition;
21
+ export { componentDefinition as n, SolidColor_default as t };
@@ -0,0 +1,128 @@
1
+ import { o as transformPosition, r as transformColor } from "./transformations-DxfQXZWi.js";
2
+ import * as TSL from "three/tsl";
3
+ const componentDefinition = {
4
+ name: "Spherize",
5
+ category: "Distortions",
6
+ description: "Map content onto a 3D sphere surface with depth distortion",
7
+ requiresRTT: true,
8
+ requiresChild: true,
9
+ props: {
10
+ radius: {
11
+ default: 1,
12
+ description: "Radius of the sphere (1 = half viewport height)",
13
+ ui: {
14
+ type: "range",
15
+ min: .1,
16
+ max: 3,
17
+ step: .01,
18
+ label: "Radius"
19
+ }
20
+ },
21
+ depth: {
22
+ default: 1,
23
+ description: "How much the sphere bulges toward viewer (0 = flat, higher = more bulge)",
24
+ ui: {
25
+ type: "range",
26
+ min: 0,
27
+ max: 3,
28
+ step: .01,
29
+ label: "Depth"
30
+ }
31
+ },
32
+ center: {
33
+ default: {
34
+ x: .5,
35
+ y: .5
36
+ },
37
+ transform: transformPosition,
38
+ description: "The center point of the sphere",
39
+ ui: {
40
+ type: "position",
41
+ label: "Center"
42
+ }
43
+ },
44
+ lightPosition: {
45
+ default: {
46
+ x: .3,
47
+ y: .3
48
+ },
49
+ transform: transformPosition,
50
+ description: "Position of the specular light source",
51
+ ui: {
52
+ type: "position",
53
+ label: "Light Position"
54
+ }
55
+ },
56
+ lightIntensity: {
57
+ default: .5,
58
+ description: "Intensity of the rim light (0 = off)",
59
+ ui: {
60
+ type: "range",
61
+ min: 0,
62
+ max: 1,
63
+ step: .01,
64
+ label: "Light Intensity"
65
+ }
66
+ },
67
+ lightSoftness: {
68
+ default: .5,
69
+ description: "Softness of the rim light falloff (0 = hard edge, 1 = soft glow)",
70
+ ui: {
71
+ type: "range",
72
+ min: 0,
73
+ max: 1,
74
+ step: .01,
75
+ label: "Light Softness"
76
+ }
77
+ },
78
+ lightColor: {
79
+ default: "#ffffff",
80
+ transform: transformColor,
81
+ description: "Color of the specular highlight",
82
+ ui: {
83
+ type: "color",
84
+ label: "Light Color"
85
+ }
86
+ }
87
+ },
88
+ fragmentNode: ({ uniforms, childNode, onCleanup }) => {
89
+ const { vec2: vec2$1, vec3: vec3$1, vec4: vec4$1, float: float$1, screenUV: screenUV$1, convertToTexture: convertToTexture$1, viewportSize: viewportSize$1, sqrt: sqrt$1, max: max$1, smoothstep, pow: pow$1, normalize, dot: dot$1 } = TSL;
90
+ if (!childNode) return vec4$1(0, 0, 0, 0);
91
+ const childTexture = convertToTexture$1(childNode);
92
+ onCleanup(() => {
93
+ if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
94
+ });
95
+ const uv = screenUV$1;
96
+ const aspect = viewportSize$1.x.div(viewportSize$1.y);
97
+ const centerPos = vec2$1(uniforms.center.uniform.x, uniforms.center.uniform.y.oneMinus());
98
+ const radius = uniforms.radius.uniform;
99
+ const sphereUV = vec2$1(uv.x.sub(centerPos.x).mul(aspect), uv.y.sub(centerPos.y)).mul(2).div(radius);
100
+ const radiusSq = sphereUV.x.mul(sphereUV.x).add(sphereUV.y.mul(sphereUV.y));
101
+ const sphereAlpha = float$1(1).sub(smoothstep(float$1(.98), float$1(1), radiusSq));
102
+ const z = sqrt$1(max$1(float$1(0), float$1(1).sub(radiusSq)));
103
+ const depthFactor = float$1(1).add(z.mul(uniforms.depth.uniform));
104
+ const finalUV = sphereUV.div(depthFactor).mul(radius).div(2);
105
+ const transformedUV = vec2$1(finalUV.x.div(aspect).add(centerPos.x), finalUV.y.add(centerPos.y));
106
+ const sampledColor = childTexture.sample(transformedUV);
107
+ const lightPos = vec2$1(uniforms.lightPosition.uniform.x, uniforms.lightPosition.uniform.y.oneMinus());
108
+ const lightIntensity = uniforms.lightIntensity.uniform;
109
+ const lightSoftness = uniforms.lightSoftness.uniform;
110
+ const lightColor = vec3$1(uniforms.lightColor.uniform.x, uniforms.lightColor.uniform.y, uniforms.lightColor.uniform.z);
111
+ const normal = normalize(vec3$1(sphereUV.x, sphereUV.y, z));
112
+ const viewDir = vec3$1(0, 0, 1);
113
+ const fresnelPower = float$1(1).add(float$1(4).mul(float$1(1).sub(lightSoftness)));
114
+ const fresnel = pow$1(float$1(1).sub(max$1(dot$1(normal, viewDir), float$1(0))), fresnelPower);
115
+ const lightDir2D = vec2$1(lightPos.x.sub(float$1(.5)).mul(2), lightPos.y.sub(float$1(.5)).mul(2));
116
+ const normalDir = normalize(vec2$1(normal.x, normal.y).add(vec2$1(1e-4, 1e-4)));
117
+ const lightDirNorm = normalize(lightDir2D.add(vec2$1(1e-4, 1e-4)));
118
+ const directionalBias = pow$1(max$1(float$1(0), dot$1(normalDir, lightDirNorm)), float$1(2));
119
+ const rimLight = fresnel.mul(directionalBias).mul(lightIntensity).mul(float$1(2));
120
+ const finalR = sampledColor.x.add(lightColor.x.mul(rimLight));
121
+ const finalG = sampledColor.y.add(lightColor.y.mul(rimLight));
122
+ const finalB = sampledColor.z.add(lightColor.z.mul(rimLight));
123
+ const finalA = sampledColor.w.mul(sphereAlpha);
124
+ return vec4$1(finalR.mul(finalA), finalG.mul(finalA), finalB.mul(finalA), finalA);
125
+ }
126
+ };
127
+ var Spherize_default = componentDefinition;
128
+ export { componentDefinition as n, Spherize_default as t };