shaders 2.2.46 → 2.2.47

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 (115) hide show
  1. package/dist/core/Kaleidoscope-3Kt0m_sh.js +97 -0
  2. package/dist/core/Mirror-CnEZ7wHa.js +84 -0
  3. package/dist/core/registry.js +66 -62
  4. package/dist/core/shaderRegistry.d.ts.map +1 -1
  5. package/dist/core/shaders/Kaleidoscope/index.d.ts +36 -0
  6. package/dist/core/shaders/Kaleidoscope/index.d.ts.map +1 -0
  7. package/dist/core/shaders/Kaleidoscope/index.js +4 -0
  8. package/dist/core/shaders/LinearBlur/index.js +1 -1
  9. package/dist/core/shaders/LinearGradient/index.js +1 -1
  10. package/dist/core/shaders/Liquify/index.js +1 -1
  11. package/dist/core/shaders/Mirror/index.d.ts +29 -0
  12. package/dist/core/shaders/Mirror/index.d.ts.map +1 -0
  13. package/dist/core/shaders/Mirror/index.js +4 -0
  14. package/dist/core/shaders/Perspective/index.js +1 -1
  15. package/dist/core/shaders/Pixelate/index.js +1 -1
  16. package/dist/core/shaders/PolarCoordinates/index.js +1 -1
  17. package/dist/core/shaders/Posterize/index.js +1 -1
  18. package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
  19. package/dist/core/shaders/RadialGradient/index.js +1 -1
  20. package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
  21. package/dist/core/shaders/Ripples/index.js +1 -1
  22. package/dist/core/shaders/Saturation/index.js +1 -1
  23. package/dist/core/shaders/Sharpness/index.js +1 -1
  24. package/dist/core/shaders/Shatter/index.js +1 -1
  25. package/dist/core/shaders/SimplexNoise/index.js +1 -1
  26. package/dist/core/shaders/SineWave/index.js +1 -1
  27. package/dist/core/shaders/SolidColor/index.js +1 -1
  28. package/dist/core/shaders/Spherize/index.js +1 -1
  29. package/dist/core/shaders/Spiral/index.js +1 -1
  30. package/dist/core/shaders/Strands/index.js +1 -1
  31. package/dist/core/shaders/Stretch/index.js +1 -1
  32. package/dist/core/shaders/Stripes/index.js +1 -1
  33. package/dist/core/shaders/Swirl/index.js +1 -1
  34. package/dist/core/shaders/TiltShift/index.js +1 -1
  35. package/dist/core/shaders/Tint/index.js +1 -1
  36. package/dist/core/shaders/Tritone/index.js +1 -1
  37. package/dist/core/shaders/Twirl/index.js +1 -1
  38. package/dist/core/shaders/Vibrance/index.js +1 -1
  39. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  40. package/dist/core/shaders/WebcamTexture/index.js +1 -1
  41. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  42. package/dist/react/Kaleidoscope.js +144 -0
  43. package/dist/react/Mirror.js +144 -0
  44. package/dist/react/components/Kaleidoscope.d.ts +31 -0
  45. package/dist/react/components/Kaleidoscope.d.ts.map +1 -0
  46. package/dist/react/components/Mirror.d.ts +31 -0
  47. package/dist/react/components/Mirror.d.ts.map +1 -0
  48. package/dist/react/index.d.ts +2 -0
  49. package/dist/react/index.d.ts.map +1 -1
  50. package/dist/react/index.js +3 -1
  51. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  52. package/dist/react/utils/generatePresetCode.js +10 -0
  53. package/dist/registry.js +250 -0
  54. package/dist/solid/components/Kaleidoscope.d.ts +28 -0
  55. package/dist/solid/components/Kaleidoscope.d.ts.map +1 -0
  56. package/dist/solid/components/Kaleidoscope.js +148 -0
  57. package/dist/solid/components/Mirror.d.ts +28 -0
  58. package/dist/solid/components/Mirror.d.ts.map +1 -0
  59. package/dist/solid/components/Mirror.js +148 -0
  60. package/dist/solid/index.d.ts +2 -0
  61. package/dist/solid/index.d.ts.map +1 -1
  62. package/dist/solid/index.js +68 -64
  63. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  64. package/dist/solid/utils/generatePresetCode.js +10 -0
  65. package/dist/svelte/components/Kaleidoscope.svelte.d.ts +19 -0
  66. package/dist/svelte/components/Mirror.svelte.d.ts +19 -0
  67. package/dist/svelte/{generatePresetCode-CtXcoyI0.js → generatePresetCode-on2wdSC3.js} +10 -0
  68. package/dist/svelte/index.d.ts +2 -0
  69. package/dist/svelte/index.js +286 -64
  70. package/dist/svelte/utils/generatePresetCode.js +1 -1
  71. package/dist/vue/Kaleidoscope.js +3 -0
  72. package/dist/vue/Kaleidoscope.vue_vue_type_script_setup_true_lang.js +127 -0
  73. package/dist/vue/Mirror.js +3 -0
  74. package/dist/vue/Mirror.vue_vue_type_script_setup_true_lang.js +126 -0
  75. package/dist/vue/components/Kaleidoscope.vue.d.ts +57 -0
  76. package/dist/vue/components/Kaleidoscope.vue.d.ts.map +1 -0
  77. package/dist/vue/components/Mirror.vue.d.ts +57 -0
  78. package/dist/vue/components/Mirror.vue.d.ts.map +1 -0
  79. package/dist/vue/index.d.ts +2 -0
  80. package/dist/vue/index.d.ts.map +1 -1
  81. package/dist/vue/index.js +3 -1
  82. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  83. package/dist/vue/utils/generatePresetCode.js +10 -0
  84. package/package.json +17 -1
  85. /package/dist/core/{LinearBlur-CfMT259a.js → LinearBlur-B-rumcdD.js} +0 -0
  86. /package/dist/core/{LinearGradient-Cn7w-umQ.js → LinearGradient-Al78T7WU.js} +0 -0
  87. /package/dist/core/{Liquify-BCkIt0A1.js → Liquify-BJgkphoQ.js} +0 -0
  88. /package/dist/core/{Perspective-CJOFHxEC.js → Perspective-CPhjpprG.js} +0 -0
  89. /package/dist/core/{Pixelate-BhNAxBsT.js → Pixelate-rlHN9jV1.js} +0 -0
  90. /package/dist/core/{PolarCoordinates-DLs3K__1.js → PolarCoordinates-Bfa-U0fi.js} +0 -0
  91. /package/dist/core/{Posterize-XoAqPWv2.js → Posterize-DDzCt2n9.js} +0 -0
  92. /package/dist/core/{ProgressiveBlur-BIZSnUjp.js → ProgressiveBlur-9-KRqfdm.js} +0 -0
  93. /package/dist/core/{RadialGradient-sQgXXXQk.js → RadialGradient-BHuQVJ4Q.js} +0 -0
  94. /package/dist/core/{RectangularCoordinates-CyarkXn0.js → RectangularCoordinates-CMd1Rp4Y.js} +0 -0
  95. /package/dist/core/{Ripples-Djjw66Bn.js → Ripples-Cil48gEl.js} +0 -0
  96. /package/dist/core/{Saturation-DLHW_GP6.js → Saturation-D_yZO7cz.js} +0 -0
  97. /package/dist/core/{Sharpness-DkGuV_dy.js → Sharpness-229T6rR0.js} +0 -0
  98. /package/dist/core/{Shatter-DVgj2Ea3.js → Shatter-B9tvT-jr.js} +0 -0
  99. /package/dist/core/{SimplexNoise-BXtLTcAr.js → SimplexNoise-YauHkNYZ.js} +0 -0
  100. /package/dist/core/{SineWave-BxqFasFh.js → SineWave-BEm0T7c8.js} +0 -0
  101. /package/dist/core/{SolidColor-DFkDBFq3.js → SolidColor-BSC8voa9.js} +0 -0
  102. /package/dist/core/{Spherize-DIJ4c_EG.js → Spherize-C6xkW6TJ.js} +0 -0
  103. /package/dist/core/{Spiral-BBtmU1Fv.js → Spiral-BY5eOKPL.js} +0 -0
  104. /package/dist/core/{Strands-D6UOhX0L.js → Strands-C5-TqTXW.js} +0 -0
  105. /package/dist/core/{Stretch-DLpz8Ofm.js → Stretch-CatYi4MC.js} +0 -0
  106. /package/dist/core/{Stripes-Bre3Z2m_.js → Stripes-BbNIMHDl.js} +0 -0
  107. /package/dist/core/{Swirl-CfsYsr4X.js → Swirl-ytfGCJTs.js} +0 -0
  108. /package/dist/core/{TiltShift-BPpXBzBg.js → TiltShift-CvEKlLKc.js} +0 -0
  109. /package/dist/core/{Tint-BazvezVn.js → Tint-PBKR7M-T.js} +0 -0
  110. /package/dist/core/{Tritone-w0h2ebDB.js → Tritone-D1rsE5HX.js} +0 -0
  111. /package/dist/core/{Twirl-dmfYS2Eo.js → Twirl-BQzDHvml.js} +0 -0
  112. /package/dist/core/{Vibrance-BpWyAK9W.js → Vibrance-JFvD6I5g.js} +0 -0
  113. /package/dist/core/{WaveDistortion-hWdvaZmT.js → WaveDistortion-D9Dox1gF.js} +0 -0
  114. /package/dist/core/{WebcamTexture-D4Uv7Plz.js → WebcamTexture-BnrsnuMO.js} +0 -0
  115. /package/dist/core/{ZoomBlur-DCI4uHOL.js → ZoomBlur-D9At8opY.js} +0 -0
@@ -0,0 +1,97 @@
1
+ import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
2
+ import { o as transformEdges, s as transformPosition } from "./transformations-YbhRK-rd.js";
3
+ import { atan2, convertToTexture, cos, float, length, mod, screenUV, sin, vec2, vec4, viewportSize } from "three/tsl";
4
+ const componentDefinition = {
5
+ name: "Kaleidoscope",
6
+ category: "Distortions",
7
+ description: "Create a kaleidoscope effect with radial mirrored segments",
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 of the kaleidoscope effect",
18
+ ui: {
19
+ type: "position",
20
+ label: "Center"
21
+ }
22
+ },
23
+ segments: {
24
+ default: 6,
25
+ description: "Number of radial segments in the kaleidoscope",
26
+ ui: {
27
+ type: "range",
28
+ min: 2,
29
+ max: 24,
30
+ step: 1,
31
+ label: "Segments"
32
+ }
33
+ },
34
+ angle: {
35
+ default: 0,
36
+ description: "Rotation offset for the entire kaleidoscope pattern",
37
+ ui: {
38
+ type: "range",
39
+ min: 0,
40
+ max: 360,
41
+ step: 1,
42
+ label: "Angle"
43
+ }
44
+ },
45
+ edges: {
46
+ default: "mirror",
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
+ fragmentNode: ({ uniforms, childNode, onCleanup }) => {
74
+ if (!childNode) return vec4(0, 0, 0, 0);
75
+ const childTexture = convertToTexture(childNode);
76
+ onCleanup(() => {
77
+ if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
78
+ });
79
+ const aspect = viewportSize.x.div(viewportSize.y);
80
+ const aspectCorrectedUV = vec2(screenUV.x.mul(aspect), screenUV.y);
81
+ const centerPos = vec2(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus());
82
+ const delta = aspectCorrectedUV.sub(centerPos);
83
+ const radius = length(delta);
84
+ const currentAngle = atan2(delta.y, delta.x);
85
+ const rotationRad = uniforms.angle.uniform.mul(Math.PI / 180);
86
+ const rotatedAngle = currentAngle.add(rotationRad);
87
+ const segmentAngle = float(Math.PI * 2).div(uniforms.segments.uniform);
88
+ const wrappedAngle = mod(rotatedAngle, segmentAngle.mul(2));
89
+ const finalAngle = wrappedAngle.greaterThan(segmentAngle).select(segmentAngle.mul(2).sub(wrappedAngle), wrappedAngle);
90
+ const kaleidoscopeDelta = vec2(cos(finalAngle).mul(radius), sin(finalAngle).mul(radius));
91
+ const kaleidoscopePos = centerPos.add(kaleidoscopeDelta);
92
+ const finalUV = vec2(kaleidoscopePos.x.div(aspect), kaleidoscopePos.y);
93
+ return applyEdgeHandling(finalUV, childTexture.sample(finalUV), childTexture, uniforms.edges.uniform);
94
+ }
95
+ };
96
+ var Kaleidoscope_default = componentDefinition;
97
+ export { componentDefinition as n, Kaleidoscope_default as t };
@@ -0,0 +1,84 @@
1
+ import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
2
+ import { o as transformEdges, s as transformPosition } from "./transformations-YbhRK-rd.js";
3
+ import { convertToTexture, cos, mix, screenUV, sin, step, vec2, vec4, viewportSize } from "three/tsl";
4
+ const componentDefinition = {
5
+ name: "Mirror",
6
+ category: "Distortions",
7
+ description: "Mirror content across a line defined by center point and angle",
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 point the mirror line passes through",
18
+ ui: {
19
+ type: "position",
20
+ label: "Center"
21
+ }
22
+ },
23
+ angle: {
24
+ default: 0,
25
+ description: "The angle of the mirror line in degrees",
26
+ ui: {
27
+ type: "range",
28
+ min: 0,
29
+ max: 360,
30
+ step: 1,
31
+ label: "Angle"
32
+ }
33
+ },
34
+ edges: {
35
+ default: "mirror",
36
+ description: "How to handle edges when distortion pushes content out of bounds",
37
+ transform: transformEdges,
38
+ ui: {
39
+ type: "select",
40
+ options: [
41
+ {
42
+ label: "Stretch",
43
+ value: "stretch"
44
+ },
45
+ {
46
+ label: "Transparent",
47
+ value: "transparent"
48
+ },
49
+ {
50
+ label: "Mirror",
51
+ value: "mirror"
52
+ },
53
+ {
54
+ label: "Wrap",
55
+ value: "wrap"
56
+ }
57
+ ],
58
+ label: "Edges"
59
+ }
60
+ }
61
+ },
62
+ fragmentNode: ({ uniforms, childNode, onCleanup }) => {
63
+ if (!childNode) return vec4(0, 0, 0, 0);
64
+ const childTexture = convertToTexture(childNode);
65
+ onCleanup(() => {
66
+ if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
67
+ });
68
+ const aspect = viewportSize.x.div(viewportSize.y);
69
+ const aspectCorrectedUV = vec2(screenUV.x.mul(aspect), screenUV.y);
70
+ const centerPos = vec2(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus());
71
+ const delta = aspectCorrectedUV.sub(centerPos);
72
+ const angleRad = uniforms.angle.uniform.mul(Math.PI / 180);
73
+ const lineDirection = vec2(cos(angleRad), sin(angleRad));
74
+ const lineNormal = vec2(lineDirection.y.negate(), lineDirection.x);
75
+ const signedDistance = delta.dot(lineNormal);
76
+ const reflectedDelta = delta.sub(lineNormal.mul(signedDistance.mul(2)));
77
+ const mirroredUV = centerPos.add(reflectedDelta);
78
+ const finalMirroredUV = vec2(mirroredUV.x.div(aspect), mirroredUV.y);
79
+ const shouldMirror = step(0, signedDistance);
80
+ return mix(childTexture.sample(screenUV), applyEdgeHandling(finalMirroredUV, childTexture.sample(finalMirroredUV), childTexture, uniforms.edges.uniform), shouldMirror);
81
+ }
82
+ };
83
+ var Mirror_default = componentDefinition;
84
+ export { componentDefinition as n, Mirror_default as t };
@@ -33,37 +33,39 @@ import { n as componentDefinition$27 } from "./Halftone-Cb5yrPnj.js";
33
33
  import { n as componentDefinition$28 } from "./HueShift-DQ2WgImx.js";
34
34
  import { n as componentDefinition$29 } from "./ImageTexture-DKFb8ze3.js";
35
35
  import { n as componentDefinition$30 } from "./Invert-w9duGaUu.js";
36
- import { n as componentDefinition$31 } from "./LinearBlur-CfMT259a.js";
37
- import { n as componentDefinition$32 } from "./LinearGradient-Cn7w-umQ.js";
38
- import { n as componentDefinition$33 } from "./Liquify-BCkIt0A1.js";
39
- import { n as componentDefinition$34 } from "./Perspective-CJOFHxEC.js";
40
- import { n as componentDefinition$35 } from "./Pixelate-BhNAxBsT.js";
41
- import { n as componentDefinition$36 } from "./PolarCoordinates-DLs3K__1.js";
42
- import { n as componentDefinition$37 } from "./Posterize-XoAqPWv2.js";
43
- import { n as componentDefinition$38 } from "./ProgressiveBlur-BIZSnUjp.js";
44
- import { n as componentDefinition$39 } from "./RadialGradient-sQgXXXQk.js";
45
- import { n as componentDefinition$40 } from "./RectangularCoordinates-CyarkXn0.js";
46
- import { n as componentDefinition$41 } from "./Ripples-Djjw66Bn.js";
47
- import { n as componentDefinition$42 } from "./Saturation-DLHW_GP6.js";
48
- import { n as componentDefinition$43 } from "./Sharpness-DkGuV_dy.js";
49
- import { n as componentDefinition$44 } from "./Shatter-DVgj2Ea3.js";
50
- import { n as componentDefinition$45 } from "./SimplexNoise-BXtLTcAr.js";
51
- import { n as componentDefinition$46 } from "./SineWave-BxqFasFh.js";
52
- import { n as componentDefinition$47 } from "./SolidColor-DFkDBFq3.js";
53
- import { n as componentDefinition$48 } from "./Spherize-DIJ4c_EG.js";
54
- import { n as componentDefinition$49 } from "./Spiral-BBtmU1Fv.js";
55
- import { n as componentDefinition$50 } from "./Strands-D6UOhX0L.js";
56
- import { n as componentDefinition$51 } from "./Stretch-DLpz8Ofm.js";
57
- import { n as componentDefinition$52 } from "./Stripes-Bre3Z2m_.js";
58
- import { n as componentDefinition$53 } from "./Swirl-CfsYsr4X.js";
59
- import { n as componentDefinition$54 } from "./TiltShift-BPpXBzBg.js";
60
- import { n as componentDefinition$55 } from "./Tint-BazvezVn.js";
61
- import { n as componentDefinition$56 } from "./Tritone-w0h2ebDB.js";
62
- import { n as componentDefinition$57 } from "./Twirl-dmfYS2Eo.js";
63
- import { n as componentDefinition$58 } from "./Vibrance-BpWyAK9W.js";
64
- import { n as componentDefinition$59 } from "./WaveDistortion-hWdvaZmT.js";
65
- import { n as componentDefinition$60 } from "./WebcamTexture-D4Uv7Plz.js";
66
- import { n as componentDefinition$61 } from "./ZoomBlur-DCI4uHOL.js";
36
+ import { n as componentDefinition$31 } from "./Kaleidoscope-3Kt0m_sh.js";
37
+ import { n as componentDefinition$32 } from "./LinearBlur-B-rumcdD.js";
38
+ import { n as componentDefinition$33 } from "./LinearGradient-Al78T7WU.js";
39
+ import { n as componentDefinition$34 } from "./Liquify-BJgkphoQ.js";
40
+ import { n as componentDefinition$35 } from "./Mirror-CnEZ7wHa.js";
41
+ import { n as componentDefinition$36 } from "./Perspective-CPhjpprG.js";
42
+ import { n as componentDefinition$37 } from "./Pixelate-rlHN9jV1.js";
43
+ import { n as componentDefinition$38 } from "./PolarCoordinates-Bfa-U0fi.js";
44
+ import { n as componentDefinition$39 } from "./Posterize-DDzCt2n9.js";
45
+ import { n as componentDefinition$40 } from "./ProgressiveBlur-9-KRqfdm.js";
46
+ import { n as componentDefinition$41 } from "./RadialGradient-BHuQVJ4Q.js";
47
+ import { n as componentDefinition$42 } from "./RectangularCoordinates-CMd1Rp4Y.js";
48
+ import { n as componentDefinition$43 } from "./Ripples-Cil48gEl.js";
49
+ import { n as componentDefinition$44 } from "./Saturation-D_yZO7cz.js";
50
+ import { n as componentDefinition$45 } from "./Sharpness-229T6rR0.js";
51
+ import { n as componentDefinition$46 } from "./Shatter-B9tvT-jr.js";
52
+ import { n as componentDefinition$47 } from "./SimplexNoise-YauHkNYZ.js";
53
+ import { n as componentDefinition$48 } from "./SineWave-BEm0T7c8.js";
54
+ import { n as componentDefinition$49 } from "./SolidColor-BSC8voa9.js";
55
+ import { n as componentDefinition$50 } from "./Spherize-C6xkW6TJ.js";
56
+ import { n as componentDefinition$51 } from "./Spiral-BY5eOKPL.js";
57
+ import { n as componentDefinition$52 } from "./Strands-C5-TqTXW.js";
58
+ import { n as componentDefinition$53 } from "./Stretch-CatYi4MC.js";
59
+ import { n as componentDefinition$54 } from "./Stripes-BbNIMHDl.js";
60
+ import { n as componentDefinition$55 } from "./Swirl-ytfGCJTs.js";
61
+ import { n as componentDefinition$56 } from "./TiltShift-CvEKlLKc.js";
62
+ import { n as componentDefinition$57 } from "./Tint-PBKR7M-T.js";
63
+ import { n as componentDefinition$58 } from "./Tritone-D1rsE5HX.js";
64
+ import { n as componentDefinition$59 } from "./Twirl-BQzDHvml.js";
65
+ import { n as componentDefinition$60 } from "./Vibrance-JFvD6I5g.js";
66
+ import { n as componentDefinition$61 } from "./WaveDistortion-D9Dox1gF.js";
67
+ import { n as componentDefinition$62 } from "./WebcamTexture-BnrsnuMO.js";
68
+ import { n as componentDefinition$63 } from "./ZoomBlur-D9At8opY.js";
67
69
  var createShaderRegistry = () => {
68
70
  const registry = {};
69
71
  const shaderDefinitions = {
@@ -98,37 +100,39 @@ var createShaderRegistry = () => {
98
100
  HueShift: componentDefinition$28,
99
101
  ImageTexture: componentDefinition$29,
100
102
  Invert: componentDefinition$30,
101
- LinearBlur: componentDefinition$31,
102
- LinearGradient: componentDefinition$32,
103
- Liquify: componentDefinition$33,
104
- Perspective: componentDefinition$34,
105
- Pixelate: componentDefinition$35,
106
- PolarCoordinates: componentDefinition$36,
107
- Posterize: componentDefinition$37,
108
- ProgressiveBlur: componentDefinition$38,
109
- RadialGradient: componentDefinition$39,
110
- RectangularCoordinates: componentDefinition$40,
111
- Ripples: componentDefinition$41,
112
- Saturation: componentDefinition$42,
113
- Sharpness: componentDefinition$43,
114
- Shatter: componentDefinition$44,
115
- SimplexNoise: componentDefinition$45,
116
- SineWave: componentDefinition$46,
117
- SolidColor: componentDefinition$47,
118
- Spherize: componentDefinition$48,
119
- Spiral: componentDefinition$49,
120
- Strands: componentDefinition$50,
121
- Stretch: componentDefinition$51,
122
- Stripes: componentDefinition$52,
123
- Swirl: componentDefinition$53,
124
- TiltShift: componentDefinition$54,
125
- Tint: componentDefinition$55,
126
- Tritone: componentDefinition$56,
127
- Twirl: componentDefinition$57,
128
- Vibrance: componentDefinition$58,
129
- WaveDistortion: componentDefinition$59,
130
- WebcamTexture: componentDefinition$60,
131
- ZoomBlur: componentDefinition$61
103
+ Kaleidoscope: componentDefinition$31,
104
+ LinearBlur: componentDefinition$32,
105
+ LinearGradient: componentDefinition$33,
106
+ Liquify: componentDefinition$34,
107
+ Mirror: componentDefinition$35,
108
+ Perspective: componentDefinition$36,
109
+ Pixelate: componentDefinition$37,
110
+ PolarCoordinates: componentDefinition$38,
111
+ Posterize: componentDefinition$39,
112
+ ProgressiveBlur: componentDefinition$40,
113
+ RadialGradient: componentDefinition$41,
114
+ RectangularCoordinates: componentDefinition$42,
115
+ Ripples: componentDefinition$43,
116
+ Saturation: componentDefinition$44,
117
+ Sharpness: componentDefinition$45,
118
+ Shatter: componentDefinition$46,
119
+ SimplexNoise: componentDefinition$47,
120
+ SineWave: componentDefinition$48,
121
+ SolidColor: componentDefinition$49,
122
+ Spherize: componentDefinition$50,
123
+ Spiral: componentDefinition$51,
124
+ Strands: componentDefinition$52,
125
+ Stretch: componentDefinition$53,
126
+ Stripes: componentDefinition$54,
127
+ Swirl: componentDefinition$55,
128
+ TiltShift: componentDefinition$56,
129
+ Tint: componentDefinition$57,
130
+ Tritone: componentDefinition$58,
131
+ Twirl: componentDefinition$59,
132
+ Vibrance: componentDefinition$60,
133
+ WaveDistortion: componentDefinition$61,
134
+ WebcamTexture: componentDefinition$62,
135
+ ZoomBlur: componentDefinition$63
132
136
  };
133
137
  Object.entries(shaderDefinitions).forEach(([fileName, def]) => {
134
138
  const propsMetadata = {};
@@ -1 +1 @@
1
- {"version":3,"file":"shaderRegistry.d.ts","sourceRoot":"","sources":["../src/shaderRegistry.ts"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE;QAC5B,EAAE,CAAC,EAAE,GAAG,CAAA;QACR,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAC,CAAA;CACH;AAkGD,eAAO,MAAM,cAAc,qCAAyB,CAAA;AAGpD,wBAAgB,aAAa,IAAI,mBAAmB,EAAE,CAErD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE7E;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAE5E;AAED,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAG9C"}
1
+ {"version":3,"file":"shaderRegistry.d.ts","sourceRoot":"","sources":["../src/shaderRegistry.ts"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE;QAC5B,EAAE,CAAC,EAAE,GAAG,CAAA;QACR,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAC,CAAA;CACH;AAoGD,eAAO,MAAM,cAAc,qCAAyB,CAAA;AAGpD,wBAAgB,aAAa,IAAI,mBAAmB,EAAE,CAErD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE7E;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAE5E;AAED,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAG9C"}
@@ -0,0 +1,36 @@
1
+ import { ComponentDefinition } from '../../types';
2
+ import { transformPosition, transformEdges } from '../../utilities/transformations';
3
+
4
+ export interface ComponentProps {
5
+ /**
6
+ * The center point of the kaleidoscope effect
7
+ *
8
+ * Accepts `{ x, y }` objects with values from 0 to 1, or CSS positions like `top center`.
9
+ * @default {"x":0.5,"y":0.5}
10
+ */
11
+ center: Parameters<typeof transformPosition>[0];
12
+ /**
13
+ * Number of radial segments in the kaleidoscope
14
+ *
15
+ * Accepts a number between 2 and 24.
16
+ * @default 6
17
+ */
18
+ segments: number;
19
+ /**
20
+ * Rotation offset for the entire kaleidoscope pattern
21
+ *
22
+ * Accepts a number between 0 and 360.
23
+ * @default 0
24
+ */
25
+ angle: number;
26
+ /**
27
+ * How to handle edges when distortion pushes content out of bounds
28
+ *
29
+ * Accepts one of: `"stretch"`, `"transparent"`, `"mirror"`, `"wrap"`.
30
+ * @default "mirror"
31
+ */
32
+ edges: Parameters<typeof transformEdges>[0];
33
+ }
34
+ export declare const componentDefinition: ComponentDefinition<ComponentProps>;
35
+ export default componentDefinition;
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Kaleidoscope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,qCAAqC,CAAA;AAGrF,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAC9C;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAwGnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import "../../edges-Bd7GP4s2.js";
2
+ import "../../transformations-YbhRK-rd.js";
3
+ import { n as componentDefinition, t as Kaleidoscope_default } from "../../Kaleidoscope-3Kt0m_sh.js";
4
+ export { componentDefinition, Kaleidoscope_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as LinearBlur_default } from "../../LinearBlur-CfMT259a.js";
2
+ import { n as componentDefinition, t as LinearBlur_default } from "../../LinearBlur-B-rumcdD.js";
3
3
  export { componentDefinition, LinearBlur_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../colorMixing-CZPFmiT4.js";
3
- import { n as componentDefinition, t as LinearGradient_default } from "../../LinearGradient-Cn7w-umQ.js";
3
+ import { n as componentDefinition, t as LinearGradient_default } from "../../LinearGradient-Al78T7WU.js";
4
4
  export { componentDefinition, LinearGradient_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
- import { n as componentDefinition, t as Liquify_default } from "../../Liquify-BCkIt0A1.js";
3
+ import { n as componentDefinition, t as Liquify_default } from "../../Liquify-BJgkphoQ.js";
4
4
  export { componentDefinition, Liquify_default as default };
@@ -0,0 +1,29 @@
1
+ import { ComponentDefinition } from '../../types';
2
+ import { transformPosition, transformEdges } from '../../utilities/transformations';
3
+
4
+ export interface ComponentProps {
5
+ /**
6
+ * The point the mirror line passes through
7
+ *
8
+ * Accepts `{ x, y }` objects with values from 0 to 1, or CSS positions like `top center`.
9
+ * @default {"x":0.5,"y":0.5}
10
+ */
11
+ center: Parameters<typeof transformPosition>[0];
12
+ /**
13
+ * The angle of the mirror line in degrees
14
+ *
15
+ * Accepts a number between 0 and 360.
16
+ * @default 0
17
+ */
18
+ angle: number;
19
+ /**
20
+ * How to handle edges when distortion pushes content out of bounds
21
+ *
22
+ * Accepts one of: `"stretch"`, `"transparent"`, `"mirror"`, `"wrap"`.
23
+ * @default "mirror"
24
+ */
25
+ edges: Parameters<typeof transformEdges>[0];
26
+ }
27
+ export declare const componentDefinition: ComponentDefinition<ComponentProps>;
28
+ export default componentDefinition;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Mirror/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,qCAAqC,CAAA;AAGrF,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAC9C;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CA+FnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import "../../edges-Bd7GP4s2.js";
2
+ import "../../transformations-YbhRK-rd.js";
3
+ import { n as componentDefinition, t as Mirror_default } from "../../Mirror-CnEZ7wHa.js";
4
+ export { componentDefinition, Mirror_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
- import { n as componentDefinition, t as Perspective_default } from "../../Perspective-CJOFHxEC.js";
3
+ import { n as componentDefinition, t as Perspective_default } from "../../Perspective-CPhjpprG.js";
4
4
  export { componentDefinition, Perspective_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Pixelate_default } from "../../Pixelate-BhNAxBsT.js";
1
+ import { n as componentDefinition, t as Pixelate_default } from "../../Pixelate-rlHN9jV1.js";
2
2
  export { componentDefinition, Pixelate_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
- import { n as componentDefinition, t as PolarCoordinates_default } from "../../PolarCoordinates-DLs3K__1.js";
3
+ import { n as componentDefinition, t as PolarCoordinates_default } from "../../PolarCoordinates-Bfa-U0fi.js";
4
4
  export { componentDefinition, PolarCoordinates_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Posterize_default } from "../../Posterize-XoAqPWv2.js";
1
+ import { n as componentDefinition, t as Posterize_default } from "../../Posterize-DDzCt2n9.js";
2
2
  export { componentDefinition, Posterize_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as ProgressiveBlur_default } from "../../ProgressiveBlur-BIZSnUjp.js";
2
+ import { n as componentDefinition, t as ProgressiveBlur_default } from "../../ProgressiveBlur-9-KRqfdm.js";
3
3
  export { componentDefinition, ProgressiveBlur_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../colorMixing-CZPFmiT4.js";
3
- import { n as componentDefinition, t as RadialGradient_default } from "../../RadialGradient-sQgXXXQk.js";
3
+ import { n as componentDefinition, t as RadialGradient_default } from "../../RadialGradient-BHuQVJ4Q.js";
4
4
  export { componentDefinition, RadialGradient_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
- import { n as componentDefinition, t as RectangularCoordinates_default } from "../../RectangularCoordinates-CyarkXn0.js";
3
+ import { n as componentDefinition, t as RectangularCoordinates_default } from "../../RectangularCoordinates-CMd1Rp4Y.js";
4
4
  export { componentDefinition, RectangularCoordinates_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-BZqyVJXt.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as Ripples_default } from "../../Ripples-Djjw66Bn.js";
4
+ import { n as componentDefinition, t as Ripples_default } from "../../Ripples-Cil48gEl.js";
5
5
  export { componentDefinition, Ripples_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Saturation_default } from "../../Saturation-DLHW_GP6.js";
1
+ import { n as componentDefinition, t as Saturation_default } from "../../Saturation-D_yZO7cz.js";
2
2
  export { componentDefinition, Saturation_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Sharpness_default } from "../../Sharpness-DkGuV_dy.js";
1
+ import { n as componentDefinition, t as Sharpness_default } from "../../Sharpness-229T6rR0.js";
2
2
  export { componentDefinition, Sharpness_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
- import { n as componentDefinition, t as Shatter_default } from "../../Shatter-DVgj2Ea3.js";
3
+ import { n as componentDefinition, t as Shatter_default } from "../../Shatter-B9tvT-jr.js";
4
4
  export { componentDefinition, Shatter_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-BZqyVJXt.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as SimplexNoise_default } from "../../SimplexNoise-BXtLTcAr.js";
4
+ import { n as componentDefinition, t as SimplexNoise_default } from "../../SimplexNoise-YauHkNYZ.js";
5
5
  export { componentDefinition, SimplexNoise_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-BZqyVJXt.js";
3
- import { n as componentDefinition, t as SineWave_default } from "../../SineWave-BxqFasFh.js";
3
+ import { n as componentDefinition, t as SineWave_default } from "../../SineWave-BEm0T7c8.js";
4
4
  export { componentDefinition, SineWave_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as SolidColor_default } from "../../SolidColor-DFkDBFq3.js";
2
+ import { n as componentDefinition, t as SolidColor_default } from "../../SolidColor-BSC8voa9.js";
3
3
  export { componentDefinition, SolidColor_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as Spherize_default } from "../../Spherize-DIJ4c_EG.js";
2
+ import { n as componentDefinition, t as Spherize_default } from "../../Spherize-C6xkW6TJ.js";
3
3
  export { componentDefinition, Spherize_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-BZqyVJXt.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as Spiral_default } from "../../Spiral-BBtmU1Fv.js";
4
+ import { n as componentDefinition, t as Spiral_default } from "../../Spiral-BY5eOKPL.js";
5
5
  export { componentDefinition, Spiral_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-BZqyVJXt.js";
3
- import { n as componentDefinition, t as Strands_default } from "../../Strands-D6UOhX0L.js";
3
+ import { n as componentDefinition, t as Strands_default } from "../../Strands-C5-TqTXW.js";
4
4
  export { componentDefinition, Strands_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
- import { n as componentDefinition, t as Stretch_default } from "../../Stretch-DLpz8Ofm.js";
3
+ import { n as componentDefinition, t as Stretch_default } from "../../Stretch-CatYi4MC.js";
4
4
  export { componentDefinition, Stretch_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-BZqyVJXt.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as Stripes_default } from "../../Stripes-Bre3Z2m_.js";
4
+ import { n as componentDefinition, t as Stripes_default } from "../../Stripes-BbNIMHDl.js";
5
5
  export { componentDefinition, Stripes_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-BZqyVJXt.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as Swirl_default } from "../../Swirl-CfsYsr4X.js";
4
+ import { n as componentDefinition, t as Swirl_default } from "../../Swirl-ytfGCJTs.js";
5
5
  export { componentDefinition, Swirl_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as TiltShift_default } from "../../TiltShift-BPpXBzBg.js";
2
+ import { n as componentDefinition, t as TiltShift_default } from "../../TiltShift-CvEKlLKc.js";
3
3
  export { componentDefinition, TiltShift_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as Tint_default } from "../../Tint-BazvezVn.js";
2
+ import { n as componentDefinition, t as Tint_default } from "../../Tint-PBKR7M-T.js";
3
3
  export { componentDefinition, Tint_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../colorMixing-CZPFmiT4.js";
3
- import { n as componentDefinition, t as Tritone_default } from "../../Tritone-w0h2ebDB.js";
3
+ import { n as componentDefinition, t as Tritone_default } from "../../Tritone-D1rsE5HX.js";
4
4
  export { componentDefinition, Tritone_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
- import { n as componentDefinition, t as Twirl_default } from "../../Twirl-dmfYS2Eo.js";
3
+ import { n as componentDefinition, t as Twirl_default } from "../../Twirl-BQzDHvml.js";
4
4
  export { componentDefinition, Twirl_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-BpWyAK9W.js";
1
+ import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-JFvD6I5g.js";
2
2
  export { componentDefinition, Vibrance_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../edges-Bd7GP4s2.js";
2
2
  import "../../transformations-YbhRK-rd.js";
3
3
  import "../../time-BZqyVJXt.js";
4
- import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-hWdvaZmT.js";
4
+ import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-D9Dox1gF.js";
5
5
  export { componentDefinition, WaveDistortion_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as WebcamTexture_default } from "../../WebcamTexture-D4Uv7Plz.js";
1
+ import { n as componentDefinition, t as WebcamTexture_default } from "../../WebcamTexture-BnrsnuMO.js";
2
2
  export { componentDefinition, WebcamTexture_default as default };