shaders 2.2.25 → 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 (32) hide show
  1. package/dist/core/{Ascii-Dha_QpT3.js → Ascii-DsuNLJKv.js} +4 -4
  2. package/dist/core/{Checkerboard-CgB-egNY.js → Checkerboard-BIFNsUYG.js} +2 -2
  3. package/dist/core/{Dither-D2Nf4p3w.js → Dither-Cq8j0QIU.js} +2 -2
  4. package/dist/core/{DotGrid-CzOwquo4.js → DotGrid-BHfQ3hcI.js} +3 -3
  5. package/dist/core/{FloatingParticles-D9Nnu1qg.js → FloatingParticles-CP6GqC3k.js} +2 -2
  6. package/dist/core/{GlassTiles-CnjCvajI.js → GlassTiles-CXChgYaL.js} +4 -4
  7. package/dist/core/{Grayscale-DRny75A9.js → Grayscale-Bi-XBvO_.js} +4 -6
  8. package/dist/core/HueShift-DvOpzM7W.js +47 -0
  9. package/dist/core/{Pixelate-Cv8537Pj.js → Pixelate-JF72DGuK.js} +4 -4
  10. package/dist/core/{Posterize-3m3xkWOz.js → Posterize-DIjjPS72.js} +4 -5
  11. package/dist/core/{Saturation-CYFI1jzN.js → Saturation-J0nI4hmh.js} +4 -6
  12. package/dist/core/{Vibrance-DRtecEvb.js → Vibrance-BI5q7_Wt.js} +8 -6
  13. package/dist/core/index.js +12 -12
  14. package/dist/core/shaders/Ascii/index.js +1 -1
  15. package/dist/core/shaders/Checkerboard/index.js +1 -1
  16. package/dist/core/shaders/Dither/index.js +1 -1
  17. package/dist/core/shaders/DotGrid/index.js +1 -1
  18. package/dist/core/shaders/FloatingParticles/index.js +1 -1
  19. package/dist/core/shaders/GlassTiles/index.js +1 -1
  20. package/dist/core/shaders/Grayscale/index.d.ts.map +1 -1
  21. package/dist/core/shaders/Grayscale/index.js +1 -1
  22. package/dist/core/shaders/HueShift/index.d.ts.map +1 -1
  23. package/dist/core/shaders/HueShift/index.js +1 -1
  24. package/dist/core/shaders/Pixelate/index.js +1 -1
  25. package/dist/core/shaders/Posterize/index.d.ts.map +1 -1
  26. package/dist/core/shaders/Posterize/index.js +1 -1
  27. package/dist/core/shaders/Saturation/index.d.ts.map +1 -1
  28. package/dist/core/shaders/Saturation/index.js +1 -1
  29. package/dist/core/shaders/Vibrance/index.d.ts.map +1 -1
  30. package/dist/core/shaders/Vibrance/index.js +1 -1
  31. package/package.json +1 -1
  32. package/dist/core/HueShift-De8ukMWs.js +0 -31
@@ -78,7 +78,7 @@ const componentDefinition = {
78
78
  }
79
79
  },
80
80
  fragmentNode: ({ uniforms, childNode, onCleanup, onBeforeRender }) => {
81
- const { vec2: vec2$1, vec3: vec3$1, vec4: vec4$1, floor, fract, dot: dot$1, ceil, sqrt: sqrt$1, screenUV: screenUV$1, texture, viewportSize: viewportSize$1, convertToTexture: convertToTexture$1 } = TSL;
81
+ const { vec2: vec2$1, vec3: vec3$1, vec4: vec4$1, floor: floor$1, fract, dot: dot$1, ceil, sqrt: sqrt$1, screenUV: screenUV$1, texture, viewportSize: viewportSize$1, convertToTexture: convertToTexture$1 } = TSL;
82
82
  if (!childNode) return vec4$1(0, 0, 0, 0);
83
83
  const childTexture = convertToTexture$1(childNode);
84
84
  onCleanup(() => {
@@ -260,7 +260,7 @@ const componentDefinition = {
260
260
  const effectiveCellSize = cellSizeUniform.mul(1.5);
261
261
  const mainGridSize = viewportSize$1.div(effectiveCellSize);
262
262
  const gridCoords = screenUV$1.mul(mainGridSize);
263
- const cellCoords = floor(gridCoords);
263
+ const cellCoords = floor$1(gridCoords);
264
264
  const rawCellUV = fract(gridCoords);
265
265
  const characterSize = uniforms.spacing?.uniform ?? TSL.uniform(initialSpacing);
266
266
  const center = vec2$1(.5);
@@ -271,10 +271,10 @@ const componentDefinition = {
271
271
  const cellColor = childTexture.sample(cellCenter);
272
272
  const rawBrightness = dot$1(cellColor.rgb, vec3$1(.299, .587, .114));
273
273
  const charCount = charCountUniform;
274
- const charIndex = floor(rawBrightness.mul(.8).add(.1).mul(charCount).min(charCount.sub(1e-4)));
274
+ const charIndex = floor$1(rawBrightness.mul(.8).add(.1).mul(charCount).min(charCount.sub(1e-4)));
275
275
  const atlasSize = ceil(sqrt$1(charCount));
276
276
  const atlasCol = charIndex.mod(atlasSize);
277
- const atlasRow = floor(charIndex.div(atlasSize));
277
+ const atlasRow = floor$1(charIndex.div(atlasSize));
278
278
  const atlasCellSize = TSL.float(1).div(atlasSize).mul(atlasScaleUniform);
279
279
  const atlasSampleUV = vec2$1(atlasCol, atlasRow).mul(atlasCellSize).add(cellUV.mul(atlasCellSize));
280
280
  const asciiChar = atlasField.sample(atlasSampleUV);
@@ -59,14 +59,14 @@ const componentDefinition = {
59
59
  }
60
60
  },
61
61
  fragmentNode: ({ uniforms, uvContext }) => {
62
- const { vec2: vec2$1, float: float$1, floor, mod, fract, smoothstep, min: min$1, screenUV: screenUV$1, viewportSize: viewportSize$1 } = TSL;
62
+ const { vec2: vec2$1, float: float$1, floor: floor$1, mod, fract, smoothstep, min: min$1, screenUV: screenUV$1, viewportSize: viewportSize$1 } = TSL;
63
63
  const uv = uvContext ?? screenUV$1;
64
64
  const aspect = viewportSize$1.x.div(viewportSize$1.y);
65
65
  const correctedUV = vec2$1(uv.x.mul(aspect), uv.y.oneMinus());
66
66
  const cells = uniforms.cells.uniform;
67
67
  const softness = uniforms.softness.uniform;
68
68
  const gridUV = correctedUV.mul(cells);
69
- const gridCoords = floor(gridUV);
69
+ const gridCoords = floor$1(gridUV);
70
70
  const checkerValue = mod(gridCoords.x.add(gridCoords.y), 2);
71
71
  let blendFactor = checkerValue;
72
72
  if (softness) {
@@ -48,12 +48,12 @@ const componentDefinition = {
48
48
  }
49
49
  },
50
50
  fragmentNode: ({ uniforms, childNode }) => {
51
- const { vec2: vec2$1, vec3: vec3$1, vec4: vec4$1, floor, screenUV: screenUV$1, viewportSize: viewportSize$1, dot: dot$1, step: step$1, mix: mix$1 } = TSL;
51
+ const { vec2: vec2$1, vec3: vec3$1, vec4: vec4$1, floor: floor$1, screenUV: screenUV$1, viewportSize: viewportSize$1, dot: dot$1, step: step$1, mix: mix$1 } = TSL;
52
52
  if (!childNode) return vec4$1(0, 0, 0, 0);
53
53
  const sourceColor = childNode;
54
54
  const luminance = dot$1(sourceColor.rgb, vec3$1(.299, .587, .114)).mul(sourceColor.a);
55
55
  const pixelSize = uniforms.pixelSize.uniform;
56
- const bayerPos = floor(screenUV$1.mul(viewportSize$1).div(pixelSize)).mod(vec2$1(4));
56
+ const bayerPos = floor$1(screenUV$1.mul(viewportSize$1).div(pixelSize)).mod(vec2$1(4));
57
57
  const x = bayerPos.x;
58
58
  const y = bayerPos.y;
59
59
  const bayerValue = y.equal(0).select(x.equal(0).select(0 / 16, x.equal(1).select(8 / 16, x.equal(2).select(2 / 16, 10 / 16))), y.equal(1).select(x.equal(0).select(12 / 16, x.equal(1).select(4 / 16, x.equal(2).select(14 / 16, 6 / 16))), y.equal(2).select(x.equal(0).select(3 / 16, x.equal(1).select(11 / 16, x.equal(2).select(1 / 16, 9 / 16))), x.equal(0).select(15 / 16, x.equal(1).select(7 / 16, x.equal(2).select(13 / 16, 5 / 16))))));
@@ -50,7 +50,7 @@ const componentDefinition = {
50
50
  }
51
51
  },
52
52
  fragmentNode: ({ uniforms, uvContext }) => {
53
- const { screenUV: screenUV$1, vec4: vec4$1, vec2: vec2$1, smoothstep, length, floor, float: float$1, viewportSize: viewportSize$1, time, sin: sin$1, mix: mix$1 } = TSL;
53
+ const { screenUV: screenUV$1, vec4: vec4$1, vec2: vec2$1, smoothstep, length, floor: floor$1, float: float$1, viewportSize: viewportSize$1, time, sin: sin$1, mix: mix$1 } = TSL;
54
54
  const uvCoords = uvContext ?? screenUV$1;
55
55
  const density = uniforms.density.uniform;
56
56
  const dotSize = uniforms.dotSize.uniform;
@@ -60,10 +60,10 @@ const componentDefinition = {
60
60
  const aspect = resolution.x.div(resolution.y);
61
61
  const correctedUV = vec2$1(uvCoords.x.mul(aspect), uvCoords.y.oneMinus());
62
62
  const gridUV = correctedUV.mul(density);
63
- const centerDistance = length(gridUV.sub(floor(gridUV)).sub(.5));
63
+ const centerDistance = length(gridUV.sub(floor$1(gridUV)).sub(.5));
64
64
  const pixelSize = length(TSL.fwidth(correctedUV.mul(density)));
65
65
  const dot$1 = float$1(1).sub(smoothstep(dotSize.mul(.5), dotSize.mul(.5).add(pixelSize.mul(.5)), centerDistance));
66
- const gridPosition = floor(gridUV);
66
+ const gridPosition = floor$1(gridUV);
67
67
  const dotPhase = gridPosition.x.mul(12.9898).add(gridPosition.y.mul(78.233)).sin().mul(43758.5453).fract();
68
68
  const twinkleValue = sin$1(time.mul(2).add(dotPhase.mul(6.28318))).mul(.5).add(.5);
69
69
  const twinkleModifier = mix$1(float$1(1), twinkleValue, twinkleIntensity);
@@ -1,6 +1,6 @@
1
1
  import { r as transformColor } from "./transformations-DxfQXZWi.js";
2
2
  import * as TSL from "three/tsl";
3
- var { vec2: vec2$1, vec3: vec3$1, vec4: vec4$1, float: float$1, sin: sin$1, cos: cos$1, smoothstep, mix: mix$1, min: min$1, floor, fract, length, dot: dot$1, screenUV: screenUV$1, viewportSize: viewportSize$1, time, Fn } = TSL;
3
+ var { vec2: vec2$1, vec3: vec3$1, vec4: vec4$1, float: float$1, sin: sin$1, cos: cos$1, smoothstep, mix: mix$1, min: min$1, floor: floor$1, fract, length, dot: dot$1, screenUV: screenUV$1, viewportSize: viewportSize$1, time, Fn } = TSL;
4
4
  var hash1_2 = Fn(([p]) => {
5
5
  return fract(sin$1(dot$1(p, vec2$1(127.1, 311.7))).mul(43758.5453123));
6
6
  });
@@ -150,7 +150,7 @@ const componentDefinition = {
150
150
  fragmentNode: ({ uniforms, childNode, uvContext }) => {
151
151
  const baseUV = uvContext ?? screenUV$1;
152
152
  const renderParticle = Fn(([uv$1]) => {
153
- const rootUV = floor(uv$1);
153
+ const rootUV = floor$1(uv$1);
154
154
  const localPos = fract(uv$1);
155
155
  let minDist = getParticleDistance(uv$1, rootUV, uniforms.randomness.uniform);
156
156
  const softness = uniforms.particleSoftness.uniform;
@@ -30,12 +30,12 @@ const componentDefinition = {
30
30
  }
31
31
  },
32
32
  uvTransformNode: ({ uv, uniforms, viewportSize: viewportSize$1 }) => {
33
- const { vec2: vec2$1, floor, select } = TSL;
33
+ const { vec2: vec2$1, floor: floor$1, select } = TSL;
34
34
  const intensity = uniforms.intensity.uniform;
35
35
  const baseTileCount = uniforms.tileCount.uniform;
36
36
  const aspectRatio = viewportSize$1.x.div(viewportSize$1.y);
37
37
  const tileCount = vec2$1(select(aspectRatio.greaterThanEqual(1), baseTileCount.mul(aspectRatio), baseTileCount), select(aspectRatio.lessThan(1), baseTileCount.div(aspectRatio), baseTileCount));
38
- const cellCoord = floor(uv.mul(tileCount)).div(tileCount);
38
+ const cellCoord = floor$1(uv.mul(tileCount)).div(tileCount);
39
39
  const localUV = uv.sub(cellCoord);
40
40
  const distortionCenter = vec2$1(.5, .5);
41
41
  const distortionFactor = intensity.mul(.025);
@@ -43,7 +43,7 @@ const componentDefinition = {
43
43
  return localUV.add(distortion).add(cellCoord);
44
44
  },
45
45
  fragmentNode: ({ uniforms, childNode, dimensions, onCleanup }) => {
46
- const { vec2: vec2$1, vec4: vec4$1, floor, mul: mul$1, div: div$1, sub: sub$1, add: add$1, screenUV: screenUV$1, uniform: uniform$1, convertToTexture: convertToTexture$1 } = TSL;
46
+ const { vec2: vec2$1, vec4: vec4$1, floor: floor$1, mul: mul$1, div: div$1, sub: sub$1, add: add$1, screenUV: screenUV$1, uniform: uniform$1, convertToTexture: convertToTexture$1 } = TSL;
47
47
  if (!childNode) {
48
48
  console.error("You must pass a child component into the Glass Tiles shader.");
49
49
  return vec4$1(0);
@@ -57,7 +57,7 @@ const componentDefinition = {
57
57
  const intensity = uniforms.intensity.uniform;
58
58
  const baseTileCount = uniforms.tileCount.uniform;
59
59
  const tileCount = vec2$1(aspectRatioUniform.greaterThanEqual(1).select(mul$1(baseTileCount, aspectRatioUniform), baseTileCount), aspectRatioUniform.lessThan(1).select(div$1(baseTileCount, aspectRatioUniform), baseTileCount));
60
- const cellCoord = div$1(floor(mul$1(uvNode, tileCount)), tileCount);
60
+ const cellCoord = div$1(floor$1(mul$1(uvNode, tileCount)), tileCount);
61
61
  const localUV = sub$1(uvNode, cellCoord);
62
62
  const distortionCenter = vec2$1(.5, .5);
63
63
  const distortionFactor = mul$1(intensity, .025);
@@ -1,5 +1,4 @@
1
- import * as TSL from "three/tsl";
2
- import { grayscale } from "three/src/nodes/display/ColorAdjustment";
1
+ import { dot, vec3, vec4 } from "three/tsl";
3
2
  const componentDefinition = {
4
3
  name: "Grayscale",
5
4
  category: "Adjustments",
@@ -7,13 +6,12 @@ const componentDefinition = {
7
6
  requiresChild: true,
8
7
  props: {},
9
8
  fragmentNode: ({ childNode }) => {
10
- const { vec4: vec4$1 } = TSL;
11
9
  if (!childNode) {
12
10
  console.error("You must pass a child component into the Grayscale shader.");
13
- return vec4$1(0);
11
+ return vec4(0);
14
12
  }
15
- const sourceColor = childNode || vec4$1(0, 0, 0, 0);
16
- return vec4$1(grayscale(sourceColor.rgb).rgb, sourceColor.a);
13
+ const luminance = dot(childNode.rgb, vec3(.2126, .7152, .0722));
14
+ return vec4(luminance, luminance, luminance, childNode.a);
17
15
  }
18
16
  };
19
17
  var Grayscale_default = componentDefinition;
@@ -0,0 +1,47 @@
1
+ import { cos, sin, vec3, vec4 } from "three/tsl";
2
+ const componentDefinition = {
3
+ name: "HueShift",
4
+ category: "Adjustments",
5
+ description: "Rotate hue around the color wheel",
6
+ requiresChild: true,
7
+ props: { shift: {
8
+ default: 0,
9
+ description: "The amount to shift the hue by",
10
+ ui: {
11
+ type: "range",
12
+ min: -180,
13
+ max: 180,
14
+ step: 1,
15
+ label: "Shift"
16
+ },
17
+ transform: (value) => value * Math.PI / 180
18
+ } },
19
+ fragmentNode: ({ uniforms, childNode }) => {
20
+ if (!childNode) {
21
+ console.error("You must pass a child component into the Hue Shift shader.");
22
+ return vec4(0);
23
+ }
24
+ const angle = uniforms.shift.uniform;
25
+ const cosA = cos(angle);
26
+ const sinA = sin(angle);
27
+ const k = 1 / 3;
28
+ const sqrt3 = 1.7320508075688772;
29
+ const kOneMinusCos = cosA.oneMinus().mul(k);
30
+ const sinOverSqrt3 = sinA.div(sqrt3);
31
+ const m00 = cosA.add(kOneMinusCos);
32
+ const m01 = kOneMinusCos.sub(sinOverSqrt3);
33
+ const m02 = kOneMinusCos.add(sinOverSqrt3);
34
+ const m10 = kOneMinusCos.add(sinOverSqrt3);
35
+ const m11 = cosA.add(kOneMinusCos);
36
+ const m12 = kOneMinusCos.sub(sinOverSqrt3);
37
+ const m20 = kOneMinusCos.sub(sinOverSqrt3);
38
+ const m21 = kOneMinusCos.add(sinOverSqrt3);
39
+ const m22 = cosA.add(kOneMinusCos);
40
+ const r = childNode.r;
41
+ const g = childNode.g;
42
+ const b = childNode.b;
43
+ return vec4(vec3(r.mul(m00).add(g.mul(m01)).add(b.mul(m02)), r.mul(m10).add(g.mul(m11)).add(b.mul(m12)), r.mul(m20).add(g.mul(m21)).add(b.mul(m22))), childNode.a);
44
+ }
45
+ };
46
+ var HueShift_default = componentDefinition;
47
+ export { componentDefinition as n, HueShift_default as t };
@@ -17,19 +17,19 @@ const componentDefinition = {
17
17
  }
18
18
  } },
19
19
  uvTransformNode: ({ uv, uniforms }) => {
20
- const { floor } = TSL;
20
+ const { floor: floor$1 } = TSL;
21
21
  const pixelSize = uniforms.scale.uniform;
22
- return floor(uv.mul(pixelSize)).div(pixelSize);
22
+ return floor$1(uv.mul(pixelSize)).div(pixelSize);
23
23
  },
24
24
  fragmentNode: ({ uniforms, childNode, onCleanup }) => {
25
- const { vec4: vec4$1, floor, screenUV: screenUV$1, convertToTexture: convertToTexture$1 } = TSL;
25
+ const { vec4: vec4$1, floor: floor$1, screenUV: screenUV$1, convertToTexture: convertToTexture$1 } = TSL;
26
26
  if (!childNode) return vec4$1(0, 0, 0, 0);
27
27
  const childTexture = convertToTexture$1(childNode);
28
28
  onCleanup(() => {
29
29
  if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
30
30
  });
31
31
  const pixelSize = uniforms.scale.uniform;
32
- const pixelatedUV = floor(screenUV$1.mul(pixelSize)).div(pixelSize);
32
+ const pixelatedUV = floor$1(screenUV$1.mul(pixelSize)).div(pixelSize);
33
33
  return childTexture.sample(pixelatedUV);
34
34
  }
35
35
  };
@@ -1,5 +1,4 @@
1
- import * as TSL from "three/tsl";
2
- import { posterize } from "three/src/nodes/display/PosterizeNode";
1
+ import { float, floor, vec4 } from "three/tsl";
3
2
  const componentDefinition = {
4
3
  name: "Posterize",
5
4
  category: "Adjustments",
@@ -17,12 +16,12 @@ const componentDefinition = {
17
16
  }
18
17
  } },
19
18
  fragmentNode: ({ uniforms, childNode }) => {
20
- const { vec4: vec4$1, int } = TSL;
21
19
  if (!childNode) {
22
20
  console.error("You must pass a child component into the Posterize shader.");
23
- return vec4$1(0);
21
+ return vec4(0);
24
22
  }
25
- return posterize(childNode || vec4$1(0, 0, 0, 0), int(uniforms.intensity.uniform));
23
+ const steps = float(uniforms.intensity.uniform);
24
+ return vec4(floor(childNode.r.mul(steps)).div(steps), floor(childNode.g.mul(steps)).div(steps), floor(childNode.b.mul(steps)).div(steps), childNode.a);
26
25
  }
27
26
  };
28
27
  var Posterize_default = componentDefinition;
@@ -1,5 +1,4 @@
1
- import * as TSL from "three/tsl";
2
- import { saturation } from "three/src/nodes/display/ColorAdjustment";
1
+ import { dot, mix, vec3, vec4 } from "three/tsl";
3
2
  const componentDefinition = {
4
3
  name: "Saturation",
5
4
  category: "Adjustments",
@@ -17,13 +16,12 @@ const componentDefinition = {
17
16
  }
18
17
  } },
19
18
  fragmentNode: ({ uniforms, childNode }) => {
20
- const { vec4: vec4$1 } = TSL;
21
19
  if (!childNode) {
22
20
  console.error("You must pass a child component into the Saturation shader.");
23
- return vec4$1(0);
21
+ return vec4(0);
24
22
  }
25
- const sourceColor = childNode || vec4$1(0, 0, 0, 0);
26
- return vec4$1(saturation(sourceColor.rgb, uniforms.intensity.uniform).rgb, sourceColor.a);
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);
27
25
  }
28
26
  };
29
27
  var Saturation_default = componentDefinition;
@@ -1,5 +1,4 @@
1
- import * as TSL from "three/tsl";
2
- import { vibrance } from "three/src/nodes/display/ColorAdjustment";
1
+ import { add, max, mix, vec3, vec4 } from "three/tsl";
3
2
  const componentDefinition = {
4
3
  name: "Vibrance",
5
4
  category: "Adjustments",
@@ -17,13 +16,16 @@ const componentDefinition = {
17
16
  }
18
17
  } },
19
18
  fragmentNode: ({ uniforms, childNode }) => {
20
- const { vec4: vec4$1 } = TSL;
21
19
  if (!childNode) {
22
20
  console.error("You must pass a child component into the Vibrance shader.");
23
- return vec4$1(0);
21
+ return vec4(0);
24
22
  }
25
- const sourceColor = childNode || vec4$1(0, 0, 0, 0);
26
- return vec4$1(vibrance(sourceColor.rgb, uniforms.intensity.uniform).rgb, sourceColor.a);
23
+ const color = childNode.rgb;
24
+ const adjustment = uniforms.intensity.uniform;
25
+ const average = add(color.r, add(color.g, color.b)).div(3);
26
+ const mx = max(color.r, max(color.g, color.b));
27
+ const amt = mx.sub(average).mul(adjustment).mul(-3);
28
+ return vec4(mix(color, vec3(mx, mx, mx), amt), childNode.a);
27
29
  }
28
30
  };
29
31
  var Vibrance_default = componentDefinition;
@@ -2,47 +2,47 @@ import { n as applyEdgeToUV, t as applyEdgeHandling } from "./edges-Bn_OIa_h.js"
2
2
  import { t as createAnimatedTime } from "./time-CTJvRUZ4.js";
3
3
  import "./transformations-DxfQXZWi.js";
4
4
  import { n as componentDefinition } from "./AngularBlur-Dl2gwk68.js";
5
- import { n as componentDefinition$1 } from "./Ascii-Dha_QpT3.js";
5
+ import { n as componentDefinition$1 } from "./Ascii-DsuNLJKv.js";
6
6
  import "./colorMixing-BXiTAqJU.js";
7
7
  import { n as componentDefinition$2 } from "./Beam-CTN9Ni43.js";
8
8
  import { n as componentDefinition$3 } from "./Blob-CxFDZovO.js";
9
9
  import { n as componentDefinition$4 } from "./Blur-Y2FsmFk_.js";
10
10
  import { n as componentDefinition$5 } from "./Bulge-Cb-t0xqI.js";
11
11
  import { n as componentDefinition$6 } from "./ChannelBlur-CvM6GJgZ.js";
12
- import { n as componentDefinition$7 } from "./Checkerboard-CgB-egNY.js";
12
+ import { n as componentDefinition$7 } from "./Checkerboard-BIFNsUYG.js";
13
13
  import { n as componentDefinition$8 } from "./ChromaFlow-vRCwhQpN.js";
14
14
  import { n as componentDefinition$9 } from "./ChromaticAberration-FTquTQIL.js";
15
15
  import { n as componentDefinition$10 } from "./Circle-Daziv5d7.js";
16
16
  import { n as componentDefinition$11 } from "./CRTScreen-CtERsenz.js";
17
17
  import { n as componentDefinition$12 } from "./CursorTrail-Bsz9e6Fn.js";
18
18
  import { n as componentDefinition$13 } from "./DiffuseBlur-Cj2PtRNd.js";
19
- import { n as componentDefinition$14 } from "./Dither-D2Nf4p3w.js";
20
- import { n as componentDefinition$15 } from "./DotGrid-CzOwquo4.js";
19
+ import { n as componentDefinition$14 } from "./Dither-Cq8j0QIU.js";
20
+ import { n as componentDefinition$15 } from "./DotGrid-BHfQ3hcI.js";
21
21
  import { n as componentDefinition$16 } from "./Duotone-XuTN9tI7.js";
22
22
  import { n as componentDefinition$17 } from "./FilmGrain-D3-nbi12.js";
23
- import { n as componentDefinition$18 } from "./FloatingParticles-D9Nnu1qg.js";
24
- import { n as componentDefinition$19 } from "./GlassTiles-CnjCvajI.js";
23
+ import { n as componentDefinition$18 } from "./FloatingParticles-CP6GqC3k.js";
24
+ import { n as componentDefinition$19 } from "./GlassTiles-CXChgYaL.js";
25
25
  import { n as componentDefinition$20 } from "./Glow-BluFc9be.js";
26
26
  import { n as componentDefinition$21 } from "./Godrays-ChLh_vGl.js";
27
- import { n as componentDefinition$22 } from "./Grayscale-DRny75A9.js";
27
+ import { n as componentDefinition$22 } from "./Grayscale-Bi-XBvO_.js";
28
28
  import { n as componentDefinition$23 } from "./Grid-DgyDa4H1.js";
29
29
  import { n as componentDefinition$24 } from "./GridDistortion-BAspCYvp.js";
30
30
  import { n as componentDefinition$25 } from "./Group-Dul7PUBl.js";
31
31
  import { n as componentDefinition$26 } from "./Halftone-Ifv5F_FT.js";
32
- import { n as componentDefinition$27 } from "./HueShift-De8ukMWs.js";
32
+ import { n as componentDefinition$27 } from "./HueShift-DvOpzM7W.js";
33
33
  import { n as componentDefinition$28 } from "./ImageTexture-DvYcQgJB.js";
34
34
  import { n as componentDefinition$29 } from "./Invert-Fz0NtIJc.js";
35
35
  import { n as componentDefinition$30 } from "./LinearBlur-LmhnQoA4.js";
36
36
  import { n as componentDefinition$31 } from "./LinearGradient-xbloQjzt.js";
37
37
  import { n as componentDefinition$32 } from "./Liquify-DMe1V5-O.js";
38
- import { n as componentDefinition$33 } from "./Pixelate-Cv8537Pj.js";
38
+ import { n as componentDefinition$33 } from "./Pixelate-JF72DGuK.js";
39
39
  import { n as componentDefinition$34 } from "./PolarCoordinates-DDvDhBE-.js";
40
- import { n as componentDefinition$35 } from "./Posterize-3m3xkWOz.js";
40
+ import { n as componentDefinition$35 } from "./Posterize-DIjjPS72.js";
41
41
  import { n as componentDefinition$36 } from "./ProgressiveBlur-EGkevObV.js";
42
42
  import { n as componentDefinition$37 } from "./RadialGradient-B7ZZB_VJ.js";
43
43
  import { n as componentDefinition$38 } from "./RectangularCoordinates-muWR8mZS.js";
44
44
  import { n as componentDefinition$39 } from "./Ripples-8XaZaXQF.js";
45
- import { n as componentDefinition$40 } from "./Saturation-CYFI1jzN.js";
45
+ import { n as componentDefinition$40 } from "./Saturation-J0nI4hmh.js";
46
46
  import { n as componentDefinition$41 } from "./SimplexNoise-DJUe0wz_.js";
47
47
  import { n as componentDefinition$42 } from "./SineWave-Dl3nFO1W.js";
48
48
  import { n as componentDefinition$43 } from "./SolidColor-CWGq_Bjq.js";
@@ -54,7 +54,7 @@ import { n as componentDefinition$48 } from "./Swirl-CVnbawit.js";
54
54
  import { n as componentDefinition$49 } from "./TiltShift-0CxNRI6L.js";
55
55
  import { n as componentDefinition$50 } from "./Tritone-Daa-I5UD.js";
56
56
  import { n as componentDefinition$51 } from "./Twirl-2CJVZEtk.js";
57
- import { n as componentDefinition$52 } from "./Vibrance-DRtecEvb.js";
57
+ import { n as componentDefinition$52 } from "./Vibrance-BI5q7_Wt.js";
58
58
  import { n as componentDefinition$53 } from "./WaveDistortion-BscXN2rs.js";
59
59
  import { n as componentDefinition$54 } from "./ZoomBlur-CAqK0Kju.js";
60
60
  import { Material, Mesh, MeshBasicNodeMaterial, OrthographicCamera, PlaneGeometry, SRGBColorSpace, Scene, WebGPURenderer } from "three/webgpu";
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Ascii_default } from "../../Ascii-Dha_QpT3.js";
1
+ import { n as componentDefinition, t as Ascii_default } from "../../Ascii-DsuNLJKv.js";
2
2
  export { componentDefinition, Ascii_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-DxfQXZWi.js";
2
2
  import "../../colorMixing-BXiTAqJU.js";
3
- import { n as componentDefinition, t as Checkerboard_default } from "../../Checkerboard-CgB-egNY.js";
3
+ import { n as componentDefinition, t as Checkerboard_default } from "../../Checkerboard-BIFNsUYG.js";
4
4
  export { componentDefinition, Checkerboard_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-DxfQXZWi.js";
2
- import { n as componentDefinition, t as Dither_default } from "../../Dither-D2Nf4p3w.js";
2
+ import { n as componentDefinition, t as Dither_default } from "../../Dither-Cq8j0QIU.js";
3
3
  export { componentDefinition, Dither_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-DxfQXZWi.js";
2
- import { n as componentDefinition, t as DotGrid_default } from "../../DotGrid-CzOwquo4.js";
2
+ import { n as componentDefinition, t as DotGrid_default } from "../../DotGrid-BHfQ3hcI.js";
3
3
  export { componentDefinition, DotGrid_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-DxfQXZWi.js";
2
- import { n as componentDefinition, t as FloatingParticles_default } from "../../FloatingParticles-D9Nnu1qg.js";
2
+ import { n as componentDefinition, t as FloatingParticles_default } from "../../FloatingParticles-CP6GqC3k.js";
3
3
  export { componentDefinition, FloatingParticles_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as GlassTiles_default } from "../../GlassTiles-CnjCvajI.js";
1
+ import { n as componentDefinition, t as GlassTiles_default } from "../../GlassTiles-CXChgYaL.js";
2
2
  export { componentDefinition, GlassTiles_default as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Grayscale/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAQvE,MAAM,WAAW,cAAc;CAAG;AAElC,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAkBnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Grayscale/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,MAAM,WAAW,cAAc;CAAG;AAElC,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAenE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Grayscale_default } from "../../Grayscale-DRny75A9.js";
1
+ import { n as componentDefinition, t as Grayscale_default } from "../../Grayscale-Bi-XBvO_.js";
2
2
  export { componentDefinition, Grayscale_default as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/HueShift/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAQvE,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAyBnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/HueShift/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CA4DnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as HueShift_default } from "../../HueShift-De8ukMWs.js";
1
+ import { n as componentDefinition, t as HueShift_default } from "../../HueShift-DvOpzM7W.js";
2
2
  export { componentDefinition, HueShift_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Pixelate_default } from "../../Pixelate-Cv8537Pj.js";
1
+ import { n as componentDefinition, t as Pixelate_default } from "../../Pixelate-JF72DGuK.js";
2
2
  export { componentDefinition, Pixelate_default as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Posterize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAQvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAqBnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Posterize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CA4BnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Posterize_default } from "../../Posterize-3m3xkWOz.js";
1
+ import { n as componentDefinition, t as Posterize_default } from "../../Posterize-DIjjPS72.js";
2
2
  export { componentDefinition, Posterize_default as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Saturation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAQvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAwBnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Saturation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAwBnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Saturation_default } from "../../Saturation-CYFI1jzN.js";
1
+ import { n as componentDefinition, t as Saturation_default } from "../../Saturation-J0nI4hmh.js";
2
2
  export { componentDefinition, Saturation_default as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Vibrance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAQvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAwBnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Vibrance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAoCnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-DRtecEvb.js";
1
+ import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-BI5q7_Wt.js";
2
2
  export { componentDefinition, Vibrance_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shaders",
3
- "version": "2.2.25",
3
+ "version": "2.2.26",
4
4
  "description": "Declarative shader components for Vue, React, and Svelte",
5
5
  "author": "Simon Le Marchant<https://github.com/marchantweb>",
6
6
  "homepage": "https://shaders.com/",
@@ -1,31 +0,0 @@
1
- import * as TSL from "three/tsl";
2
- import { hue } from "three/src/nodes/display/ColorAdjustment";
3
- const componentDefinition = {
4
- name: "HueShift",
5
- category: "Adjustments",
6
- description: "Rotate hue around the color wheel",
7
- requiresChild: true,
8
- props: { shift: {
9
- default: 0,
10
- description: "The amount to shift the hue by",
11
- ui: {
12
- type: "range",
13
- min: -180,
14
- max: 180,
15
- step: 1,
16
- label: "Shift"
17
- },
18
- transform: (value) => value * Math.PI / 180
19
- } },
20
- fragmentNode: ({ uniforms, childNode }) => {
21
- const { vec4: vec4$1 } = TSL;
22
- if (!childNode) {
23
- console.error("You must pass a child component into the Hue Shift shader.");
24
- return vec4$1(0);
25
- }
26
- const sourceColor = childNode || vec4$1(0, 0, 0, 0);
27
- return vec4$1(hue(sourceColor.rgb, uniforms.shift.uniform).rgb, sourceColor.a);
28
- }
29
- };
30
- var HueShift_default = componentDefinition;
31
- export { componentDefinition as n, HueShift_default as t };