shaders 2.2.29 → 2.2.31

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 (134) hide show
  1. package/dist/core/{AngularBlur-DKFExWUF.js → AngularBlur-CuwAjUOA.js} +1 -1
  2. package/dist/core/{Ascii-BRApYlD4.js → Ascii-Dxk6VaBp.js} +30 -7
  3. package/dist/core/{Beam-DU7wxmIh.js → Beam-CbG4MkLo.js} +3 -4
  4. package/dist/core/{Blob-nssNzEgN.js → Blob-C_fYRjJF.js} +4 -5
  5. package/dist/core/{Bulge-Dm02_fG6.js → Bulge-C8-_hIFp.js} +2 -21
  6. package/dist/core/{Checkerboard-SKsXoUXE.js → Checkerboard-D_H3XYbF.js} +3 -4
  7. package/dist/core/{ChromaFlow-VpfgLFbs.js → ChromaFlow-DhzC_8Ne.js} +19 -17
  8. package/dist/core/{ChromaticAberration-CaCyXMyE.js → ChromaticAberration-hi7WGiVk.js} +1 -1
  9. package/dist/core/{Circle-BHnAmzVb.js → Circle-DI0gXpyD.js} +3 -4
  10. package/dist/core/{CursorTrail-CfVWIKok.js → CursorTrail-B9EQ9FsP.js} +1 -1
  11. package/dist/core/{DiffuseBlur-GWPb8Zht.js → DiffuseBlur-Cg7AsB3W.js} +2 -13
  12. package/dist/core/{Dither-BNEeyo0u.js → Dither-Bb5rLGEI.js} +1 -1
  13. package/dist/core/{DotGrid-CRRS6nbt.js → DotGrid-B2DXsjFE.js} +3 -4
  14. package/dist/core/{Duotone-5gKND3an.js → Duotone-CRwhugbV.js} +1 -1
  15. package/dist/core/{FilmGrain-osBGk_b9.js → FilmGrain-CY4ZO9UI.js} +2 -3
  16. package/dist/core/{FloatingParticles-CULOurGT.js → FloatingParticles-BduIDXKd.js} +3 -4
  17. package/dist/core/{GlassTiles-CA90XrNT.js → GlassTiles-uW7j91uC.js} +1 -13
  18. package/dist/core/{Godrays-BQsDwU26.js → Godrays-ChqiT2zn.js} +3 -4
  19. package/dist/core/{Grid-CWHxwO7R.js → Grid-DazyiX15.js} +3 -4
  20. package/dist/core/{GridDistortion-CZB9w-rv.js → GridDistortion-CYQUwuXw.js} +2 -2
  21. package/dist/core/{Halftone-MMcLMRpL.js → Halftone-Ddrldk6b.js} +1 -1
  22. package/dist/core/{ImageTexture-D9OMwqAs.js → ImageTexture-D0xwHmkW.js} +2 -3
  23. package/dist/core/{LinearBlur-B-Ikurxt.js → LinearBlur-cYfqaOhb.js} +1 -1
  24. package/dist/core/{LinearGradient-DV6UkhZk.js → LinearGradient-B6ySxWpU.js} +3 -4
  25. package/dist/core/{Liquify-W8UQNeEM.js → Liquify-yoKWSK0F.js} +2 -8
  26. package/dist/core/{Pixelate-_pyYeLRP.js → Pixelate-BmE_Zryn.js} +0 -4
  27. package/dist/core/{PolarCoordinates-D63xm0oJ.js → PolarCoordinates-PLyS00-P.js} +2 -11
  28. package/dist/core/{ProgressiveBlur-G-s-o9ic.js → ProgressiveBlur-XD4ivmMn.js} +1 -1
  29. package/dist/core/{RadialGradient-BGVqSwh0.js → RadialGradient-pwKyDUBu.js} +3 -4
  30. package/dist/core/{RectangularCoordinates-DyHBo456.js → RectangularCoordinates-Dq2JrmOX.js} +2 -11
  31. package/dist/core/{Ripples-2FGWCZlp.js → Ripples-Ot1rx8kL.js} +4 -5
  32. package/dist/core/{SimplexNoise-B6dtUCmn.js → SimplexNoise-BfilWh05.js} +4 -5
  33. package/dist/core/{SineWave-BtPf6-2H.js → SineWave-DRqL-jda.js} +3 -4
  34. package/dist/core/{SolidColor-CETl1cEr.js → SolidColor-B62ZBRlK.js} +1 -2
  35. package/dist/core/{Spherize-BwvUcorJ.js → Spherize-DDP0_5VP.js} +1 -1
  36. package/dist/core/{Spiral-DmJWmUmr.js → Spiral-Cx7Z8gLc.js} +3 -4
  37. package/dist/core/{Strands-CV1oCmHx.js → Strands-C9FBVtDe.js} +4 -5
  38. package/dist/core/{Stretch-pl-Cn2F8.js → Stretch-BCpOO3q6.js} +2 -21
  39. package/dist/core/{Swirl-D65vXLDw.js → Swirl-KUjGnUAM.js} +4 -5
  40. package/dist/core/{TiltShift-CFcK6Hzg.js → TiltShift-CvKqM1xk.js} +1 -1
  41. package/dist/core/{Tritone-EmnjV2rX.js → Tritone-BeEJj4U0.js} +1 -1
  42. package/dist/core/{Twirl-HSMyRx5I.js → Twirl-EJ3aS_lo.js} +2 -12
  43. package/dist/core/{WaveDistortion-DG8GO_l8.js → WaveDistortion-BOWBSWEU.js} +2 -24
  44. package/dist/core/{ZoomBlur-C01oGwwG.js → ZoomBlur-gB0BxldE.js} +1 -1
  45. package/dist/core/{edges-Djr_12SL.js → edges-Bd7GP4s2.js} +1 -10
  46. package/dist/core/index.js +198 -653
  47. package/dist/core/performanceTracker.d.ts +7 -1
  48. package/dist/core/performanceTracker.d.ts.map +1 -1
  49. package/dist/core/renderer.d.ts +0 -21
  50. package/dist/core/renderer.d.ts.map +1 -1
  51. package/dist/core/shaders/AngularBlur/index.js +2 -2
  52. package/dist/core/shaders/Ascii/index.d.ts.map +1 -1
  53. package/dist/core/shaders/Ascii/index.js +1 -1
  54. package/dist/core/shaders/Beam/index.d.ts.map +1 -1
  55. package/dist/core/shaders/Beam/index.js +2 -2
  56. package/dist/core/shaders/Blob/index.d.ts.map +1 -1
  57. package/dist/core/shaders/Blob/index.js +3 -3
  58. package/dist/core/shaders/Bulge/index.d.ts.map +1 -1
  59. package/dist/core/shaders/Bulge/index.js +3 -3
  60. package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
  61. package/dist/core/shaders/Checkerboard/index.js +2 -2
  62. package/dist/core/shaders/ChromaFlow/index.d.ts.map +1 -1
  63. package/dist/core/shaders/ChromaFlow/index.js +2 -2
  64. package/dist/core/shaders/ChromaticAberration/index.js +2 -2
  65. package/dist/core/shaders/Circle/index.d.ts.map +1 -1
  66. package/dist/core/shaders/Circle/index.js +2 -2
  67. package/dist/core/shaders/CursorTrail/index.js +2 -2
  68. package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
  69. package/dist/core/shaders/DiffuseBlur/index.js +3 -3
  70. package/dist/core/shaders/Dither/index.js +2 -2
  71. package/dist/core/shaders/DotGrid/index.d.ts.map +1 -1
  72. package/dist/core/shaders/DotGrid/index.js +2 -2
  73. package/dist/core/shaders/Duotone/index.js +2 -2
  74. package/dist/core/shaders/FilmGrain/index.d.ts.map +1 -1
  75. package/dist/core/shaders/FilmGrain/index.js +1 -1
  76. package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
  77. package/dist/core/shaders/FloatingParticles/index.js +2 -2
  78. package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
  79. package/dist/core/shaders/GlassTiles/index.js +1 -1
  80. package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
  81. package/dist/core/shaders/Godrays/index.js +2 -2
  82. package/dist/core/shaders/Grid/index.d.ts.map +1 -1
  83. package/dist/core/shaders/Grid/index.js +2 -2
  84. package/dist/core/shaders/GridDistortion/index.js +3 -3
  85. package/dist/core/shaders/Halftone/index.js +2 -2
  86. package/dist/core/shaders/ImageTexture/index.d.ts.map +1 -1
  87. package/dist/core/shaders/ImageTexture/index.js +1 -1
  88. package/dist/core/shaders/LinearBlur/index.js +2 -2
  89. package/dist/core/shaders/LinearGradient/index.d.ts.map +1 -1
  90. package/dist/core/shaders/LinearGradient/index.js +2 -2
  91. package/dist/core/shaders/Liquify/index.d.ts.map +1 -1
  92. package/dist/core/shaders/Liquify/index.js +3 -3
  93. package/dist/core/shaders/Pixelate/index.d.ts.map +1 -1
  94. package/dist/core/shaders/Pixelate/index.js +1 -1
  95. package/dist/core/shaders/PolarCoordinates/index.d.ts.map +1 -1
  96. package/dist/core/shaders/PolarCoordinates/index.js +3 -3
  97. package/dist/core/shaders/ProgressiveBlur/index.js +2 -2
  98. package/dist/core/shaders/RadialGradient/index.d.ts.map +1 -1
  99. package/dist/core/shaders/RadialGradient/index.js +2 -2
  100. package/dist/core/shaders/RectangularCoordinates/index.d.ts.map +1 -1
  101. package/dist/core/shaders/RectangularCoordinates/index.js +3 -3
  102. package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
  103. package/dist/core/shaders/Ripples/index.js +3 -3
  104. package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
  105. package/dist/core/shaders/SimplexNoise/index.js +3 -3
  106. package/dist/core/shaders/SineWave/index.d.ts.map +1 -1
  107. package/dist/core/shaders/SineWave/index.js +2 -2
  108. package/dist/core/shaders/SolidColor/index.d.ts.map +1 -1
  109. package/dist/core/shaders/SolidColor/index.js +2 -2
  110. package/dist/core/shaders/Spherize/index.js +2 -2
  111. package/dist/core/shaders/Spiral/index.d.ts.map +1 -1
  112. package/dist/core/shaders/Spiral/index.js +2 -2
  113. package/dist/core/shaders/Strands/index.d.ts.map +1 -1
  114. package/dist/core/shaders/Strands/index.js +3 -3
  115. package/dist/core/shaders/Stretch/index.d.ts.map +1 -1
  116. package/dist/core/shaders/Stretch/index.js +3 -3
  117. package/dist/core/shaders/Swirl/index.d.ts.map +1 -1
  118. package/dist/core/shaders/Swirl/index.js +3 -3
  119. package/dist/core/shaders/TiltShift/index.js +2 -2
  120. package/dist/core/shaders/Tritone/index.js +2 -2
  121. package/dist/core/shaders/Twirl/index.d.ts.map +1 -1
  122. package/dist/core/shaders/Twirl/index.js +3 -3
  123. package/dist/core/shaders/WaveDistortion/index.d.ts.map +1 -1
  124. package/dist/core/shaders/WaveDistortion/index.js +3 -3
  125. package/dist/core/shaders/ZoomBlur/index.js +2 -2
  126. package/dist/core/{transformations-Dv5JW9ck.js → transformations-YbhRK-rd.js} +51 -1
  127. package/dist/core/types.d.ts +0 -81
  128. package/dist/core/types.d.ts.map +1 -1
  129. package/dist/core/utilities/transformations.d.ts +17 -0
  130. package/dist/core/utilities/transformations.d.ts.map +1 -1
  131. package/dist/core/utilities/uniforms.d.ts.map +1 -1
  132. package/dist/registry.js +0 -19
  133. package/package.json +1 -1
  134. /package/dist/core/{time-CTJvRUZ4.js → time-DgRTVr2F.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { o as transformPosition } from "./transformations-Dv5JW9ck.js";
1
+ import { s as transformPosition } from "./transformations-YbhRK-rd.js";
2
2
  import { Fn, convertToTexture, cos, float, screenUV, sin, vec2, vec4 } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "AngularBlur",
@@ -124,6 +124,9 @@ const componentDefinition = {
124
124
  }
125
125
  } catch (error) {}
126
126
  }
127
+ let reusableCanvas = null;
128
+ let reusableCtx = null;
129
+ let reusableDataBuffer = null;
127
130
  const createCharacterAtlas = async (characters, cellSize, fontFamily, spacing) => {
128
131
  if (!characters || characters.length === 0) throw new Error("Characters string cannot be empty");
129
132
  const charCount$1 = characters.length;
@@ -132,11 +135,22 @@ const componentDefinition = {
132
135
  const spacingMultiplier = Math.max(1, 2 / spacing);
133
136
  const actualCellSize = Math.min(baseAtlasCellSize * spacingMultiplier, ATLAS_TEXTURE_SIZE / atlasSize$1);
134
137
  const fontSize = actualCellSize * .75;
135
- const atlasCanvas = document.createElement("canvas");
136
- atlasCanvas.width = ATLAS_TEXTURE_SIZE;
137
- atlasCanvas.height = ATLAS_TEXTURE_SIZE;
138
- const ctx = atlasCanvas.getContext("2d");
139
- ctx.clearRect(0, 0, atlasCanvas.width, atlasCanvas.height);
138
+ if (!reusableCanvas) {
139
+ reusableCanvas = document.createElement("canvas");
140
+ reusableCanvas.width = ATLAS_TEXTURE_SIZE;
141
+ reusableCanvas.height = ATLAS_TEXTURE_SIZE;
142
+ reusableCtx = reusableCanvas.getContext("2d");
143
+ if (!reusableCtx) {
144
+ console.error("[Ascii] Failed to create 2D canvas context for character atlas");
145
+ throw new Error("Ascii shader: Canvas 2D context unavailable");
146
+ }
147
+ }
148
+ if (!reusableCtx) {
149
+ console.error("[Ascii] Canvas context unexpectedly null during atlas creation");
150
+ throw new Error("Ascii shader: Canvas 2D context unavailable");
151
+ }
152
+ const ctx = reusableCtx;
153
+ ctx.clearRect(0, 0, ATLAS_TEXTURE_SIZE, ATLAS_TEXTURE_SIZE);
140
154
  ctx.fillStyle = "#ffffff";
141
155
  ctx.font = `${fontSize}px "${fontFamily}", ${fontFamily}, monospace`;
142
156
  if (!ctx.font.includes(fontFamily) && !ctx.font.includes("IBM") && !ctx.font.includes("Plex")) ctx.font = `${fontSize}px ${fontFamily}, monospace`;
@@ -149,9 +163,11 @@ const componentDefinition = {
149
163
  const y = row * actualCellSize + actualCellSize / 2;
150
164
  ctx.fillText(char, x, y);
151
165
  }
152
- const imageData = ctx.getImageData(0, 0, atlasCanvas.width, atlasCanvas.height);
166
+ const imageData = ctx.getImageData(0, 0, ATLAS_TEXTURE_SIZE, ATLAS_TEXTURE_SIZE);
167
+ if (!reusableDataBuffer) reusableDataBuffer = new Uint8Array(ATLAS_TEXTURE_SIZE * ATLAS_TEXTURE_SIZE * 4);
168
+ reusableDataBuffer.set(imageData.data);
153
169
  return {
154
- data: new Uint8Array(imageData.data),
170
+ data: reusableDataBuffer,
155
171
  width: ATLAS_TEXTURE_SIZE,
156
172
  height: ATLAS_TEXTURE_SIZE,
157
173
  atlasSize: atlasSize$1,
@@ -255,6 +271,13 @@ const componentDefinition = {
255
271
  });
256
272
  onCleanup(() => {
257
273
  atlasTexture.dispose();
274
+ if (reusableCanvas) {
275
+ reusableCanvas.width = 0;
276
+ reusableCanvas.height = 0;
277
+ reusableCanvas = null;
278
+ reusableCtx = null;
279
+ }
280
+ reusableDataBuffer = null;
258
281
  });
259
282
  const effectiveCellSize = cellSizeUniform.mul(1.5);
260
283
  const mainGridSize = viewportSize.div(effectiveCellSize);
@@ -1,11 +1,10 @@
1
- import { i as transformColorSpace, o as transformPosition, r as transformColor, t as colorSpaceOptions } from "./transformations-Dv5JW9ck.js";
1
+ import { i as transformColorSpace, r as transformColor, s as transformPosition, t as colorSpaceOptions } from "./transformations-YbhRK-rd.js";
2
2
  import { t as mixColors } from "./colorMixing-CZPFmiT4.js";
3
3
  import { clamp, float, max, mix, pow, screenUV, smoothstep, sqrt, vec2, vec4, viewportSize } from "three/tsl";
4
4
  const componentDefinition = {
5
5
  name: "Beam",
6
6
  category: "Base Layers",
7
7
  description: "A beam of light from one point to another.",
8
- acceptsUVContext: true,
9
8
  props: {
10
9
  startPosition: {
11
10
  default: {
@@ -104,8 +103,8 @@ const componentDefinition = {
104
103
  }
105
104
  }
106
105
  },
107
- fragmentNode: ({ uniforms, uvContext }) => {
108
- const baseUV = uvContext ?? screenUV;
106
+ fragmentNode: ({ uniforms }) => {
107
+ const baseUV = screenUV;
109
108
  const aspect = viewportSize.x.div(viewportSize.y);
110
109
  const startPos = vec2(uniforms.startPosition.uniform.x, uniforms.startPosition.uniform.y.oneMinus());
111
110
  const endPos = vec2(uniforms.endPosition.uniform.x, uniforms.endPosition.uniform.y.oneMinus());
@@ -1,12 +1,11 @@
1
- import { t as createAnimatedTime } from "./time-CTJvRUZ4.js";
2
- import { i as transformColorSpace, o as transformPosition, r as transformColor, t as colorSpaceOptions } from "./transformations-Dv5JW9ck.js";
1
+ import { i as transformColorSpace, r as transformColor, s as transformPosition, t as colorSpaceOptions } from "./transformations-YbhRK-rd.js";
2
+ import { t as createAnimatedTime } from "./time-DgRTVr2F.js";
3
3
  import { t as mixColors } from "./colorMixing-CZPFmiT4.js";
4
4
  import { dot, float, length, max, normalize, pow, reflect, screenUV, sin, smoothstep, vec2, vec3, vec4, viewportSize } from "three/tsl";
5
5
  const componentDefinition = {
6
6
  name: "Blob",
7
7
  category: "Base Layers",
8
8
  description: "Organic animated blob with 3D lighting and gradients",
9
- acceptsUVContext: true,
10
9
  props: {
11
10
  colorA: {
12
11
  default: "#ff6b35",
@@ -158,8 +157,8 @@ const componentDefinition = {
158
157
  }
159
158
  },
160
159
  fragmentNode: (params) => {
161
- const { uniforms, uvContext } = params;
162
- const baseUV = uvContext ?? screenUV;
160
+ const { uniforms } = params;
161
+ const baseUV = screenUV;
163
162
  const animTime = createAnimatedTime(params, uniforms.speed, uniforms.seed);
164
163
  const colorA = uniforms.colorA.uniform;
165
164
  const colorB = uniforms.colorB.uniform;
@@ -1,5 +1,5 @@
1
- import { t as applyEdgeHandling } from "./edges-Djr_12SL.js";
2
- import { a as transformEdges, o as transformPosition } from "./transformations-Dv5JW9ck.js";
1
+ import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
2
+ import { o as transformEdges, s as transformPosition } from "./transformations-YbhRK-rd.js";
3
3
  import { convertToTexture, float, length, max, screenUV, smoothstep, vec2, vec4, viewportSize } from "three/tsl";
4
4
  const componentDefinition = {
5
5
  name: "Bulge",
@@ -81,25 +81,6 @@ const componentDefinition = {
81
81
  }
82
82
  }
83
83
  },
84
- uvTransformNode: ({ uv: uv$1, uniforms, viewportSize: viewportSize$1 }) => {
85
- const aspect = viewportSize$1.x.div(viewportSize$1.y);
86
- const aspectCorrectedUV = vec2(uv$1.x.mul(aspect), uv$1.y);
87
- const centerPos = vec2(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus());
88
- const delta = aspectCorrectedUV.sub(centerPos);
89
- const distance$1 = length(delta);
90
- const effectRadius = uniforms.radius.uniform.mul(.5);
91
- const falloffAmount = uniforms.falloff.uniform;
92
- const smoothFalloff = smoothstep(effectRadius.mul(float(1).sub(falloffAmount).sub(float(.001)).max(float(0))), effectRadius, distance$1).oneMinus();
93
- const normalizedDist = distance$1.div(effectRadius);
94
- const distSq = normalizedDist.mul(normalizedDist);
95
- const quadraticFalloff = max(float(0), float(1).sub(distSq));
96
- const falloff = smoothFalloff.mul(quadraticFalloff);
97
- const displacementAmount = uniforms.strength.uniform.negate().mul(falloff);
98
- const scaleFactor = float(1).add(displacementAmount);
99
- const bulgedDelta = delta.mul(scaleFactor);
100
- const bulgedUV = centerPos.add(bulgedDelta);
101
- return vec2(bulgedUV.x.div(aspect), bulgedUV.y);
102
- },
103
84
  fragmentNode: ({ uniforms, childNode, onCleanup }) => {
104
85
  if (!childNode) return vec4(0, 0, 0, 0);
105
86
  const childTexture = convertToTexture(childNode);
@@ -1,11 +1,10 @@
1
- import { i as transformColorSpace, r as transformColor, t as colorSpaceOptions } from "./transformations-Dv5JW9ck.js";
1
+ import { i as transformColorSpace, r as transformColor, t as colorSpaceOptions } from "./transformations-YbhRK-rd.js";
2
2
  import { t as mixColors } from "./colorMixing-CZPFmiT4.js";
3
3
  import { float, floor, fract, min, mod, screenUV, smoothstep, vec2, viewportSize } from "three/tsl";
4
4
  const componentDefinition = {
5
5
  name: "Checkerboard",
6
6
  category: "Base Layers",
7
7
  description: "Classic checkerboard pattern with two alternating colors",
8
- acceptsUVContext: true,
9
8
  props: {
10
9
  colorA: {
11
10
  default: "#cccccc",
@@ -58,8 +57,8 @@ const componentDefinition = {
58
57
  }
59
58
  }
60
59
  },
61
- fragmentNode: ({ uniforms, uvContext }) => {
62
- const uv$1 = uvContext ?? screenUV;
60
+ fragmentNode: ({ uniforms }) => {
61
+ const uv$1 = screenUV;
63
62
  const aspect = viewportSize.x.div(viewportSize.y);
64
63
  const correctedUV = vec2(uv$1.x.mul(aspect), uv$1.y.oneMinus());
65
64
  const cells = uniforms.cells.uniform;
@@ -1,4 +1,4 @@
1
- import { r as transformColor } from "./transformations-Dv5JW9ck.js";
1
+ import { r as transformColor } from "./transformations-YbhRK-rd.js";
2
2
  import { DataTexture, FloatType, LinearFilter, RGFormat } from "three";
3
3
  import { float, mix, screenUV, smoothstep, texture, uniform, vec2, vec4 } from "three/tsl";
4
4
  const componentDefinition = {
@@ -89,6 +89,8 @@ const componentDefinition = {
89
89
  const GRID_SIZE = 128;
90
90
  const displacementData = new Float32Array(GRID_SIZE * GRID_SIZE * 2);
91
91
  const liquidData = new Float32Array(GRID_SIZE * GRID_SIZE * 2);
92
+ const tempDisplacementData = new Float32Array(GRID_SIZE * GRID_SIZE * 2);
93
+ const tempLiquidData = new Float32Array(GRID_SIZE * GRID_SIZE * 2);
92
94
  const displacementTexture = new DataTexture(displacementData, GRID_SIZE, GRID_SIZE, RGFormat, FloatType);
93
95
  displacementTexture.magFilter = LinearFilter;
94
96
  displacementTexture.minFilter = LinearFilter;
@@ -119,15 +121,15 @@ const componentDefinition = {
119
121
  const intensity = uniforms.intensity.uniform.value;
120
122
  const radius = uniforms.radius.uniform.value * .05;
121
123
  const momentum = uniforms.momentum.uniform.value;
122
- const newDisplacementData = new Float32Array(displacementData);
123
- const newLiquidData = new Float32Array(liquidData);
124
+ tempDisplacementData.set(displacementData);
125
+ tempLiquidData.set(liquidData);
124
126
  const flowFadeRate = 1 - dt / Math.max(.1, 1);
125
- for (let i = 0; i < GRID_SIZE * GRID_SIZE * 2; i++) newDisplacementData[i] = displacementData[i] * flowFadeRate;
127
+ for (let i = 0; i < GRID_SIZE * GRID_SIZE * 2; i++) tempDisplacementData[i] = displacementData[i] * flowFadeRate;
126
128
  for (let i = 0; i < GRID_SIZE; i++) for (let j = 0; j < GRID_SIZE; j++) {
127
129
  const idx = (i * GRID_SIZE + j) * 2;
128
130
  const liquidFadeRate = 1 - dt / Math.max(.4, 1);
129
- newLiquidData[idx] = liquidData[idx] * liquidFadeRate;
130
- newLiquidData[idx + 1] = liquidData[idx + 1] * liquidFadeRate;
131
+ tempLiquidData[idx] = liquidData[idx] * liquidFadeRate;
132
+ tempLiquidData[idx + 1] = liquidData[idx + 1] * liquidFadeRate;
131
133
  if (Math.abs(displacementData[idx]) > .001 || Math.abs(displacementData[idx + 1]) > .001) {
132
134
  const flowSpeed = momentum * 50 * dt;
133
135
  const advectX = j - displacementData[idx] * flowSpeed;
@@ -143,7 +145,7 @@ const componentDefinition = {
143
145
  const idx01 = (y0 * GRID_SIZE + x1) * 2;
144
146
  const idx10 = (y1 * GRID_SIZE + x0) * 2;
145
147
  const idx11 = (y1 * GRID_SIZE + x1) * 2;
146
- newLiquidData[idx] = (liquidData[idx00] * (1 - fx) * (1 - fy) + liquidData[idx01] * fx * (1 - fy) + liquidData[idx10] * (1 - fx) * fy + liquidData[idx11] * fx * fy) * liquidFadeRate;
148
+ tempLiquidData[idx] = (liquidData[idx00] * (1 - fx) * (1 - fy) + liquidData[idx01] * fx * (1 - fy) + liquidData[idx10] * (1 - fx) * fy + liquidData[idx11] * fx * fy) * liquidFadeRate;
147
149
  }
148
150
  }
149
151
  }
@@ -158,19 +160,19 @@ const componentDefinition = {
158
160
  const effectiveRadius = radius * Math.min(speed * speed * 20, 1);
159
161
  if (dist < effectiveRadius * 2 && Math.abs(velX) + Math.abs(velY) > .01) {
160
162
  const influence = Math.exp(-dist * dist / (effectiveRadius * effectiveRadius));
161
- newDisplacementData[idx] += mouseVelX.value * influence * (intensity * 100) * dt * .01;
162
- newDisplacementData[idx + 1] += mouseVelY.value * influence * (intensity * 100) * dt * .01;
163
+ tempDisplacementData[idx] += mouseVelX.value * influence * (intensity * 100) * dt * .01;
164
+ tempDisplacementData[idx + 1] += mouseVelY.value * influence * (intensity * 100) * dt * .01;
163
165
  const speedMultiplier = Math.min(speed * 10, 1);
164
- newLiquidData[idx] += influence * (intensity * 100) * dt * .01 * speedMultiplier;
165
- newLiquidData[idx + 1] = 0;
166
+ tempLiquidData[idx] += influence * (intensity * 100) * dt * .01 * speedMultiplier;
167
+ tempLiquidData[idx + 1] = 0;
166
168
  }
167
- newDisplacementData[idx] = Math.max(-1, Math.min(1, newDisplacementData[idx]));
168
- newDisplacementData[idx + 1] = Math.max(-1, Math.min(1, newDisplacementData[idx + 1]));
169
- newLiquidData[idx] = Math.max(0, Math.min(1, newLiquidData[idx]));
170
- newLiquidData[idx + 1] = 0;
169
+ tempDisplacementData[idx] = Math.max(-1, Math.min(1, tempDisplacementData[idx]));
170
+ tempDisplacementData[idx + 1] = Math.max(-1, Math.min(1, tempDisplacementData[idx + 1]));
171
+ tempLiquidData[idx] = Math.max(0, Math.min(1, tempLiquidData[idx]));
172
+ tempLiquidData[idx + 1] = 0;
171
173
  }
172
- displacementData.set(newDisplacementData);
173
- liquidData.set(newLiquidData);
174
+ displacementData.set(tempDisplacementData);
175
+ liquidData.set(tempLiquidData);
174
176
  displacementTexture.needsUpdate = true;
175
177
  liquidTexture.needsUpdate = true;
176
178
  prevX = pointer.x;
@@ -1,4 +1,4 @@
1
- import { n as transformAngle } from "./transformations-Dv5JW9ck.js";
1
+ import { n as transformAngle } from "./transformations-YbhRK-rd.js";
2
2
  import { convertToTexture, cos, radians, screenUV, sin, vec2, vec4 } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "ChromaticAberration",
@@ -1,10 +1,9 @@
1
- import { o as transformPosition, r as transformColor } from "./transformations-Dv5JW9ck.js";
1
+ import { r as transformColor, s as transformPosition } from "./transformations-YbhRK-rd.js";
2
2
  import { length, screenUV, smoothstep, vec2, vec4, viewportSize } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "Circle",
5
5
  category: "Base Layers",
6
6
  description: "Generate a circle with adjustable size and softness",
7
- acceptsUVContext: true,
8
7
  props: {
9
8
  color: {
10
9
  default: "#ffffff",
@@ -50,8 +49,8 @@ const componentDefinition = {
50
49
  }
51
50
  }
52
51
  },
53
- fragmentNode: ({ uniforms, uvContext }) => {
54
- const uv$1 = uvContext ?? screenUV;
52
+ fragmentNode: ({ uniforms }) => {
53
+ const uv$1 = screenUV;
55
54
  const aspect = viewportSize.x.div(viewportSize.y);
56
55
  const aspectCorrectedUV = vec2(uv$1.x.mul(aspect), uv$1.y);
57
56
  const centerPos = vec2(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus());
@@ -1,4 +1,4 @@
1
- import { i as transformColorSpace, r as transformColor, t as colorSpaceOptions } from "./transformations-Dv5JW9ck.js";
1
+ import { i as transformColorSpace, r as transformColor, t as colorSpaceOptions } from "./transformations-YbhRK-rd.js";
2
2
  import { t as mixColors } from "./colorMixing-CZPFmiT4.js";
3
3
  import { DataTexture, FloatType, LinearFilter, RGBAFormat } from "three";
4
4
  import { float, screenUV, step, texture, vec2, vec4 } from "three/tsl";
@@ -1,5 +1,5 @@
1
- import { t as applyEdgeHandling } from "./edges-Djr_12SL.js";
2
- import { a as transformEdges } from "./transformations-Dv5JW9ck.js";
1
+ import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
2
+ import { o as transformEdges } from "./transformations-YbhRK-rd.js";
3
3
  import { convertToTexture, dot, fract, screenUV, sin, vec2, vec4, viewportSize } from "three/tsl";
4
4
  const componentDefinition = {
5
5
  name: "DiffuseBlur",
@@ -47,17 +47,6 @@ const componentDefinition = {
47
47
  }
48
48
  }
49
49
  },
50
- uvTransformNode: ({ uv: uv$1, uniforms, viewportSize: viewportSize$1 }) => {
51
- const hash = (p) => {
52
- return fract(sin(dot(p, vec2(12.9898, 78.233).mul(2))).mul(43758.5453));
53
- };
54
- const pixelSize = vec2(1).div(viewportSize$1);
55
- const seed = uv$1.mul(1e3);
56
- const rand1 = hash(seed);
57
- const rand2 = hash(seed.add(vec2(73.2, 41.9)));
58
- const offset = vec2(rand1.mul(2).sub(1), rand2.mul(2).sub(1)).mul(uniforms.intensity.uniform).mul(pixelSize);
59
- return uv$1.add(offset);
60
- },
61
50
  fragmentNode: ({ uniforms, childNode, onCleanup }) => {
62
51
  if (!childNode) return vec4(0, 0, 0, 0);
63
52
  const childTexture = convertToTexture(childNode);
@@ -1,4 +1,4 @@
1
- import { r as transformColor } from "./transformations-Dv5JW9ck.js";
1
+ import { r as transformColor } from "./transformations-YbhRK-rd.js";
2
2
  import { dot, floor, mix, screenUV, step, vec2, vec3, vec4, viewportSize } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "Dither",
@@ -1,10 +1,9 @@
1
- import { r as transformColor } from "./transformations-Dv5JW9ck.js";
1
+ import { r as transformColor } from "./transformations-YbhRK-rd.js";
2
2
  import { float, floor, fwidth, length, mix, screenUV, sin, smoothstep, time, vec2, vec4, viewportSize } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "DotGrid",
5
5
  category: "Base Layers",
6
6
  description: "Grid of dots with optional twinkling animation",
7
- acceptsUVContext: true,
8
7
  props: {
9
8
  color: {
10
9
  default: "#ffffff",
@@ -49,8 +48,8 @@ const componentDefinition = {
49
48
  }
50
49
  }
51
50
  },
52
- fragmentNode: ({ uniforms, uvContext }) => {
53
- const uvCoords = uvContext ?? screenUV;
51
+ fragmentNode: ({ uniforms }) => {
52
+ const uvCoords = screenUV;
54
53
  const density = uniforms.density.uniform;
55
54
  const dotSize = uniforms.dotSize.uniform;
56
55
  const dotColor = uniforms.color.uniform;
@@ -1,4 +1,4 @@
1
- import { i as transformColorSpace, r as transformColor, t as colorSpaceOptions } from "./transformations-Dv5JW9ck.js";
1
+ import { i as transformColorSpace, r as transformColor, t as colorSpaceOptions } from "./transformations-YbhRK-rd.js";
2
2
  import { t as mixColors } from "./colorMixing-CZPFmiT4.js";
3
3
  import { convertToTexture, dot, screenUV, smoothstep, vec3, vec4 } from "three/tsl";
4
4
  const componentDefinition = {
@@ -4,7 +4,6 @@ const componentDefinition = {
4
4
  category: "Stylize",
5
5
  description: "Analog film grain texture overlay",
6
6
  requiresChild: true,
7
- acceptsUVContext: true,
8
7
  props: { strength: {
9
8
  default: .5,
10
9
  description: "Intensity of the film grain noise",
@@ -16,10 +15,10 @@ const componentDefinition = {
16
15
  label: "Strength"
17
16
  }
18
17
  } },
19
- fragmentNode: ({ uniforms, childNode, uvContext }) => {
18
+ fragmentNode: ({ uniforms, childNode }) => {
20
19
  const strength = uniforms.strength.uniform;
21
20
  const sourceColor = childNode || vec4(0, 0, 0, 0);
22
- const grainIntensity = fract(sin(dot(uvContext ?? screenUV, vec2(float(12.9898), float(78.233)).mul(float(2)))).mul(float(43758.5453))).mul(float(2)).sub(float(1)).mul(strength.mul(float(.1)));
21
+ const grainIntensity = fract(sin(dot(screenUV, vec2(float(12.9898), float(78.233)).mul(float(2)))).mul(float(43758.5453))).mul(float(2)).sub(float(1)).mul(strength.mul(float(.1)));
23
22
  return vec4(sourceColor.rgb.add(grainIntensity), sourceColor.a);
24
23
  }
25
24
  };
@@ -1,4 +1,4 @@
1
- import { r as transformColor } from "./transformations-Dv5JW9ck.js";
1
+ import { r as transformColor } from "./transformations-YbhRK-rd.js";
2
2
  import { Fn, cos, dot, float, floor, fract, length, min, mix, screenUV, sin, smoothstep, time, vec2, vec3, vec4, viewportSize } from "three/tsl";
3
3
  var hash1_2 = Fn(([p]) => {
4
4
  return fract(sin(dot(p, vec2(127.1, 311.7))).mul(43758.5453123));
@@ -24,7 +24,6 @@ const componentDefinition = {
24
24
  category: "Base Layers",
25
25
  description: "Animated floating particles with twinkle effects",
26
26
  requiresRTT: false,
27
- acceptsUVContext: true,
28
27
  props: {
29
28
  randomness: {
30
29
  default: .25,
@@ -146,8 +145,8 @@ const componentDefinition = {
146
145
  }
147
146
  }
148
147
  },
149
- fragmentNode: ({ uniforms, childNode, uvContext }) => {
150
- const baseUV = uvContext ?? screenUV;
148
+ fragmentNode: ({ uniforms, childNode }) => {
149
+ const baseUV = screenUV;
151
150
  const renderParticle = Fn(([uv$2]) => {
152
151
  const rootUV = floor(uv$2);
153
152
  const localPos = fract(uv$2);
@@ -1,4 +1,4 @@
1
- import { add, convertToTexture, div, floor, mul, screenUV, select, sub, uniform, vec2, vec4 } from "three/tsl";
1
+ import { add, convertToTexture, div, floor, mul, screenUV, sub, uniform, vec2, vec4 } from "three/tsl";
2
2
  const componentDefinition = {
3
3
  name: "GlassTiles",
4
4
  category: "Distortions",
@@ -29,18 +29,6 @@ const componentDefinition = {
29
29
  }
30
30
  }
31
31
  },
32
- uvTransformNode: ({ uv: uv$1, uniforms, viewportSize: viewportSize$1 }) => {
33
- const intensity = uniforms.intensity.uniform;
34
- const baseTileCount = uniforms.tileCount.uniform;
35
- const aspectRatio = viewportSize$1.x.div(viewportSize$1.y);
36
- const tileCount = vec2(select(aspectRatio.greaterThanEqual(1), baseTileCount.mul(aspectRatio), baseTileCount), select(aspectRatio.lessThan(1), baseTileCount.div(aspectRatio), baseTileCount));
37
- const cellCoord = floor(uv$1.mul(tileCount)).div(tileCount);
38
- const localUV = uv$1.sub(cellCoord);
39
- const distortionCenter = vec2(.5, .5);
40
- const distortionFactor = intensity.mul(.025);
41
- const distortion = localUV.div(vec2(1, 1).div(tileCount)).sub(distortionCenter).mul(distortionFactor);
42
- return localUV.add(distortion).add(cellCoord);
43
- },
44
32
  fragmentNode: ({ uniforms, childNode, dimensions, onCleanup }) => {
45
33
  if (!childNode) {
46
34
  console.error("You must pass a child component into the Glass Tiles shader.");
@@ -1,11 +1,10 @@
1
- import { o as transformPosition, r as transformColor } from "./transformations-Dv5JW9ck.js";
1
+ import { r as transformColor, s as transformPosition } from "./transformations-YbhRK-rd.js";
2
2
  import { Fn, PI, abs, atan, clamp, float, length, mix, pow, screenUV, sin, smoothstep, time, vec2, vec4 } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "Godrays",
5
5
  category: "Base Layers",
6
6
  description: "Volumetric light rays emanating from a point",
7
7
  requiresRTT: false,
8
- acceptsUVContext: true,
9
8
  props: {
10
9
  center: {
11
10
  default: {
@@ -82,8 +81,8 @@ const componentDefinition = {
82
81
  }
83
82
  }
84
83
  },
85
- fragmentNode: ({ uniforms, uvContext }) => {
86
- const uv$1 = uvContext ?? screenUV;
84
+ fragmentNode: ({ uniforms }) => {
85
+ const uv$1 = screenUV;
87
86
  const centerPos = vec2(uniforms.center.uniform.x, uniforms.center.uniform.y.oneMinus());
88
87
  const shapeUV = uv$1.sub(centerPos);
89
88
  const valueNoise = Fn(([st]) => {
@@ -1,10 +1,9 @@
1
- import { r as transformColor } from "./transformations-Dv5JW9ck.js";
1
+ import { r as transformColor } from "./transformations-YbhRK-rd.js";
2
2
  import { fract, fwidth, max, screenUV, smoothstep, vec2, vec4, viewportSize } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "Grid",
5
5
  category: "Base Layers",
6
6
  description: "Simple grid lines pattern with adjustable thickness",
7
- acceptsUVContext: true,
8
7
  props: {
9
8
  color: {
10
9
  default: "#ffffff",
@@ -38,8 +37,8 @@ const componentDefinition = {
38
37
  }
39
38
  }
40
39
  },
41
- fragmentNode: ({ uniforms, uvContext }) => {
42
- const uv$1 = uvContext ?? screenUV;
40
+ fragmentNode: ({ uniforms }) => {
41
+ const uv$1 = screenUV;
43
42
  const aspect = viewportSize.x.div(viewportSize.y);
44
43
  const correctedUV = vec2(uv$1.x.mul(aspect), uv$1.y.oneMinus());
45
44
  const cells = uniforms.cells.uniform;
@@ -1,5 +1,5 @@
1
- import { t as applyEdgeHandling } from "./edges-Djr_12SL.js";
2
- import { a as transformEdges } from "./transformations-Dv5JW9ck.js";
1
+ import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
2
+ import { o as transformEdges } from "./transformations-YbhRK-rd.js";
3
3
  import { DataTexture, FloatType, LinearFilter, RGFormat } from "three";
4
4
  import { convertToTexture, float, screenUV, texture, uniform, vec2, vec4 } from "three/tsl";
5
5
  var DEFAULT_GRID_SIZE = 20;
@@ -1,4 +1,4 @@
1
- import { n as transformAngle } from "./transformations-Dv5JW9ck.js";
1
+ import { n as transformAngle } from "./transformations-YbhRK-rd.js";
2
2
  import { cos, dot, fract, length, radians, screenUV, sin, smoothstep, vec2, vec3, vec4, viewportSize } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "Halftone",
@@ -4,7 +4,6 @@ const componentDefinition = {
4
4
  name: "ImageTexture",
5
5
  category: "Base Layers",
6
6
  description: "Display an image with customizable object-fit modes",
7
- acceptsUVContext: true,
8
7
  props: {
9
8
  url: {
10
9
  default: "https://shaders.com/sample.jpg",
@@ -54,8 +53,8 @@ const componentDefinition = {
54
53
  }
55
54
  }
56
55
  },
57
- fragmentNode: ({ uniforms, onCleanup, onBeforeRender, uvContext }) => {
58
- const baseUV = uvContext ?? screenUV;
56
+ fragmentNode: ({ uniforms, onCleanup, onBeforeRender }) => {
57
+ const baseUV = screenUV;
59
58
  const loader = new TextureLoader();
60
59
  let currentUrl = "";
61
60
  let isLoading = false;
@@ -1,4 +1,4 @@
1
- import { n as transformAngle } from "./transformations-Dv5JW9ck.js";
1
+ import { n as transformAngle } from "./transformations-YbhRK-rd.js";
2
2
  import { Fn, convertToTexture, cos, float, radians, screenUV, sin, vec2, vec4, viewportSize } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "LinearBlur",
@@ -1,11 +1,10 @@
1
- import { a as transformEdges, i as transformColorSpace, n as transformAngle, o as transformPosition, r as transformColor, t as colorSpaceOptions } from "./transformations-Dv5JW9ck.js";
1
+ import { i as transformColorSpace, n as transformAngle, o as transformEdges, r as transformColor, s as transformPosition, t as colorSpaceOptions } from "./transformations-YbhRK-rd.js";
2
2
  import { t as mixColors } from "./colorMixing-CZPFmiT4.js";
3
3
  import { abs, cos, dot, float, fract, length, mod, normalize, radians, screenUV, sin, vec2, vec4 } from "three/tsl";
4
4
  const componentDefinition = {
5
5
  name: "LinearGradient",
6
6
  category: "Base Layers",
7
7
  description: "Create smooth linear color gradients",
8
- acceptsUVContext: true,
9
8
  props: {
10
9
  colorA: {
11
10
  default: "#1aff00",
@@ -99,8 +98,8 @@ const componentDefinition = {
99
98
  }
100
99
  }
101
100
  },
102
- fragmentNode: ({ uniforms, uvContext }) => {
103
- const uv$1 = uvContext ?? screenUV;
101
+ fragmentNode: ({ uniforms }) => {
102
+ const uv$1 = screenUV;
104
103
  const startPos = vec2(uniforms.start.uniform[0], uniforms.start.uniform[1].oneMinus());
105
104
  const endPos = vec2(uniforms.end.uniform[0], uniforms.end.uniform[1].oneMinus());
106
105
  const gradientVector = endPos.sub(startPos);
@@ -1,5 +1,5 @@
1
- import { t as applyEdgeHandling } from "./edges-Djr_12SL.js";
2
- import { a as transformEdges } from "./transformations-Dv5JW9ck.js";
1
+ import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
2
+ import { o as transformEdges } from "./transformations-YbhRK-rd.js";
3
3
  import { DataTexture, FloatType, LinearFilter, RGFormat } from "three";
4
4
  import { convertToTexture, float, screenUV, texture, uniform, vec2, vec4 } from "three/tsl";
5
5
  var GRID_SIZE = 32;
@@ -101,12 +101,6 @@ const componentDefinition = {
101
101
  }
102
102
  }
103
103
  },
104
- uvTransformNode: ({ uv: uv$1, uniforms }) => {
105
- const displacement = getOrCreateDisplacementState(uniforms).tslNode.sample(uv$1).xy;
106
- const maxDisplacement = float(.2);
107
- const clampedDisplacement = displacement.clamp(vec2(maxDisplacement.negate(), maxDisplacement.negate()), vec2(maxDisplacement, maxDisplacement));
108
- return uv$1.sub(clampedDisplacement);
109
- },
110
104
  fragmentNode: ({ uniforms, onBeforeRender, childNode, onCleanup }) => {
111
105
  const { dataTexture: displacementTexture, data: displacementData, tslNode: displacementField } = getOrCreateDisplacementState(uniforms);
112
106
  const mouseVelX = uniform(0);
@@ -16,10 +16,6 @@ const componentDefinition = {
16
16
  label: "Scale"
17
17
  }
18
18
  } },
19
- uvTransformNode: ({ uv: uv$1, uniforms }) => {
20
- const pixelSize = uniforms.scale.uniform;
21
- return floor(uv$1.mul(pixelSize)).div(pixelSize);
22
- },
23
19
  fragmentNode: ({ uniforms, childNode, onCleanup }) => {
24
20
  if (!childNode) return vec4(0, 0, 0, 0);
25
21
  const childTexture = convertToTexture(childNode);
@@ -1,5 +1,5 @@
1
- import { t as applyEdgeHandling } from "./edges-Djr_12SL.js";
2
- import { a as transformEdges, o as transformPosition } from "./transformations-Dv5JW9ck.js";
1
+ import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
2
+ import { o as transformEdges, s as transformPosition } from "./transformations-YbhRK-rd.js";
3
3
  import { PI, atan, convertToTexture, length, mix, screenUV, vec2, vec4, viewportSize } from "three/tsl";
4
4
  const componentDefinition = {
5
5
  name: "PolarCoordinates",
@@ -81,15 +81,6 @@ const componentDefinition = {
81
81
  }
82
82
  }
83
83
  },
84
- uvTransformNode: ({ uv: uv$1, uniforms, viewportSize: viewportSize$1 }) => {
85
- const aspect = viewportSize$1.x.div(viewportSize$1.y);
86
- const aspectCorrectedUV = vec2(uv$1.x.mul(aspect), uv$1.y);
87
- const centerPos = vec2(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus());
88
- const delta = aspectCorrectedUV.sub(centerPos);
89
- const normalizedAngle = atan(delta.y, delta.x).add(PI).div(PI.mul(2));
90
- const r = length(delta);
91
- return mix(uv$1, vec2(normalizedAngle.mul(uniforms.wrap.uniform), r.mul(uniforms.radius.uniform)), uniforms.intensity.uniform);
92
- },
93
84
  fragmentNode: ({ uniforms, childNode, onCleanup }) => {
94
85
  if (!childNode) return vec4(0, 0, 0, 0);
95
86
  const childTexture = convertToTexture(childNode);
@@ -1,4 +1,4 @@
1
- import { n as transformAngle, o as transformPosition } from "./transformations-Dv5JW9ck.js";
1
+ import { n as transformAngle, s as transformPosition } from "./transformations-YbhRK-rd.js";
2
2
  import { Fn, convertToTexture, cos, float, max, radians, screenUV, sin, smoothstep, vec2, vec4, viewportSize } from "three/tsl";
3
3
  const componentDefinition = {
4
4
  name: "ProgressiveBlur",
@@ -1,11 +1,10 @@
1
- import { i as transformColorSpace, o as transformPosition, r as transformColor, t as colorSpaceOptions } from "./transformations-Dv5JW9ck.js";
1
+ import { i as transformColorSpace, r as transformColor, s as transformPosition, t as colorSpaceOptions } from "./transformations-YbhRK-rd.js";
2
2
  import { t as mixColors } from "./colorMixing-CZPFmiT4.js";
3
3
  import { distance, float, screenUV, vec2, viewportSize } from "three/tsl";
4
4
  const componentDefinition = {
5
5
  name: "RadialGradient",
6
6
  category: "Base Layers",
7
7
  description: "Radial gradient radiating from a center point",
8
- acceptsUVContext: true,
9
8
  props: {
10
9
  colorA: {
11
10
  default: "#ff0000",
@@ -59,8 +58,8 @@ const componentDefinition = {
59
58
  }
60
59
  }
61
60
  },
62
- fragmentNode: ({ uniforms, uvContext }) => {
63
- const uv$1 = uvContext ?? screenUV;
61
+ fragmentNode: ({ uniforms }) => {
62
+ const uv$1 = screenUV;
64
63
  const aspect = viewportSize.x.div(viewportSize.y);
65
64
  const t = distance(vec2(uv$1.x.mul(aspect), uv$1.y), vec2(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus())).div(uniforms.radius.uniform).clamp(float(0), float(1));
66
65
  return mixColors(uniforms.colorA.uniform, uniforms.colorB.uniform, t, uniforms.colorSpace.uniform);