shaders 2.2.34 → 2.2.36

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 (91) hide show
  1. package/dist/core/Perspective-CSP2Hb16.js +137 -0
  2. package/dist/core/Sharpness-cw57bW0s.js +41 -0
  3. package/dist/core/index.js +55 -51
  4. package/dist/core/shaderRegistry.d.ts.map +1 -1
  5. package/dist/core/shaders/Perspective/index.d.ts +57 -0
  6. package/dist/core/shaders/Perspective/index.d.ts.map +1 -0
  7. package/dist/core/shaders/Perspective/index.js +4 -0
  8. package/dist/core/shaders/Pixelate/index.js +1 -1
  9. package/dist/core/shaders/PolarCoordinates/index.js +1 -1
  10. package/dist/core/shaders/Posterize/index.js +1 -1
  11. package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
  12. package/dist/core/shaders/RadialGradient/index.js +1 -1
  13. package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
  14. package/dist/core/shaders/Ripples/index.js +1 -1
  15. package/dist/core/shaders/Saturation/index.js +1 -1
  16. package/dist/core/shaders/Sharpness/index.d.ts +14 -0
  17. package/dist/core/shaders/Sharpness/index.d.ts.map +1 -0
  18. package/dist/core/shaders/Sharpness/index.js +2 -0
  19. package/dist/core/shaders/SimplexNoise/index.js +1 -1
  20. package/dist/core/shaders/SineWave/index.js +1 -1
  21. package/dist/core/shaders/SolidColor/index.js +1 -1
  22. package/dist/core/shaders/Spherize/index.js +1 -1
  23. package/dist/core/shaders/Spiral/index.js +1 -1
  24. package/dist/core/shaders/Strands/index.js +1 -1
  25. package/dist/core/shaders/Stretch/index.js +1 -1
  26. package/dist/core/shaders/Swirl/index.js +1 -1
  27. package/dist/core/shaders/TiltShift/index.js +1 -1
  28. package/dist/core/shaders/Tritone/index.js +1 -1
  29. package/dist/core/shaders/Twirl/index.js +1 -1
  30. package/dist/core/shaders/Vibrance/index.js +1 -1
  31. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  32. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  33. package/dist/react/components/Perspective.d.ts +31 -0
  34. package/dist/react/components/Perspective.d.ts.map +1 -0
  35. package/dist/react/components/Sharpness.d.ts +31 -0
  36. package/dist/react/components/Sharpness.d.ts.map +1 -0
  37. package/dist/react/{generatePresetCode-CwTRhENe.js → generatePresetCode-DtpUpaeM.js} +24 -0
  38. package/dist/react/index.d.ts +2 -0
  39. package/dist/react/index.d.ts.map +1 -1
  40. package/dist/react/index.js +682 -404
  41. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  42. package/dist/react/utils/generatePresetCode.js +1 -1
  43. package/dist/registry.js +242 -0
  44. package/dist/solid/components/Perspective.d.ts +28 -0
  45. package/dist/solid/components/Perspective.d.ts.map +1 -0
  46. package/dist/solid/components/Sharpness.d.ts +28 -0
  47. package/dist/solid/components/Sharpness.d.ts.map +1 -0
  48. package/dist/solid/index.d.ts +2 -0
  49. package/dist/solid/index.d.ts.map +1 -1
  50. package/dist/solid/index.js +626 -344
  51. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  52. package/dist/solid/utils/generatePresetCode.js +24 -0
  53. package/dist/svelte/components/Perspective.svelte.d.ts +19 -0
  54. package/dist/svelte/components/Sharpness.svelte.d.ts +19 -0
  55. package/dist/svelte/{generatePresetCode-Qh7jlXV3.js → generatePresetCode-Yu_cJh3q.js} +24 -0
  56. package/dist/svelte/index.d.ts +2 -0
  57. package/dist/svelte/index.js +268 -46
  58. package/dist/svelte/utils/generatePresetCode.js +1 -1
  59. package/dist/vue/components/Perspective.vue.d.ts +57 -0
  60. package/dist/vue/components/Perspective.vue.d.ts.map +1 -0
  61. package/dist/vue/components/Sharpness.vue.d.ts +57 -0
  62. package/dist/vue/components/Sharpness.vue.d.ts.map +1 -0
  63. package/dist/vue/{generatePresetCode-Bf-TQPvI.js → generatePresetCode-DnK2X66E.js} +24 -0
  64. package/dist/vue/index.d.ts +2 -0
  65. package/dist/vue/index.d.ts.map +1 -1
  66. package/dist/vue/index.js +410 -162
  67. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  68. package/dist/vue/utils/generatePresetCode.js +1 -1
  69. package/package.json +17 -1
  70. /package/dist/core/{Pixelate-C5Rx1dBp.js → Pixelate-BAoi-CSx.js} +0 -0
  71. /package/dist/core/{PolarCoordinates-CIh5ef8m.js → PolarCoordinates-BwN9HhFK.js} +0 -0
  72. /package/dist/core/{Posterize-Byy0Ek0l.js → Posterize-XoAqPWv2.js} +0 -0
  73. /package/dist/core/{ProgressiveBlur-Bzz24_y-.js → ProgressiveBlur-RuAm_BKx.js} +0 -0
  74. /package/dist/core/{RadialGradient-Ci1dU-1K.js → RadialGradient-BfFuRbIl.js} +0 -0
  75. /package/dist/core/{RectangularCoordinates-tVGG7WOJ.js → RectangularCoordinates-CiW3J4UT.js} +0 -0
  76. /package/dist/core/{Ripples-BCGSt5HD.js → Ripples-BAcLsbLr.js} +0 -0
  77. /package/dist/core/{Saturation-DWR1Nruu.js → Saturation-DVVlpikK.js} +0 -0
  78. /package/dist/core/{SimplexNoise-CAtknQS7.js → SimplexNoise-CxF7Tl5O.js} +0 -0
  79. /package/dist/core/{SineWave-CHtV6kB4.js → SineWave-SIEiE1O3.js} +0 -0
  80. /package/dist/core/{SolidColor-CSSquNVW.js → SolidColor-zYROg_aE.js} +0 -0
  81. /package/dist/core/{Spherize-BJby0xSU.js → Spherize-tsKMpSaS.js} +0 -0
  82. /package/dist/core/{Spiral-CpB3-tFZ.js → Spiral-PsIc1BI9.js} +0 -0
  83. /package/dist/core/{Strands-C2KWiJc8.js → Strands-xsbd_3Bt.js} +0 -0
  84. /package/dist/core/{Stretch-Chpzutao.js → Stretch-BhHjbcqd.js} +0 -0
  85. /package/dist/core/{Swirl-qbMypv_R.js → Swirl-CV1prOHF.js} +0 -0
  86. /package/dist/core/{TiltShift-D0qyWoe3.js → TiltShift-BYQjUHpn.js} +0 -0
  87. /package/dist/core/{Tritone-DzeueG1F.js → Tritone-CJW8YTyB.js} +0 -0
  88. /package/dist/core/{Twirl-B2Ic0WGq.js → Twirl-5k_XPd51.js} +0 -0
  89. /package/dist/core/{Vibrance-BAGXelBi.js → Vibrance-c25pkbWj.js} +0 -0
  90. /package/dist/core/{WaveDistortion-DYFl_8vA.js → WaveDistortion-BRgbfqt3.js} +0 -0
  91. /package/dist/core/{ZoomBlur-CXpRNRJA.js → ZoomBlur-DEozXA8U.js} +0 -0
@@ -0,0 +1,137 @@
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, float, max, screenUV, sin, tan, vec2, vec4 } from "three/tsl";
4
+ const componentDefinition = {
5
+ name: "Perspective",
6
+ category: "Distortions",
7
+ description: "Rotate the plane in 3D space with pan and tilt",
8
+ requiresRTT: true,
9
+ requiresChild: true,
10
+ props: {
11
+ center: {
12
+ default: {
13
+ x: .5,
14
+ y: .5
15
+ },
16
+ transform: transformPosition,
17
+ description: "Center point of rotation",
18
+ ui: {
19
+ type: "position",
20
+ label: "Center"
21
+ }
22
+ },
23
+ pan: {
24
+ default: 0,
25
+ description: "Horizontal rotation (left/right)",
26
+ ui: {
27
+ type: "range",
28
+ min: -90,
29
+ max: 90,
30
+ step: .1,
31
+ label: "Pan"
32
+ }
33
+ },
34
+ tilt: {
35
+ default: 0,
36
+ description: "Vertical rotation (up/down)",
37
+ ui: {
38
+ type: "range",
39
+ min: -90,
40
+ max: 90,
41
+ step: .1,
42
+ label: "Tilt"
43
+ }
44
+ },
45
+ fov: {
46
+ default: 60,
47
+ description: "Field of view - controls perspective intensity",
48
+ ui: {
49
+ type: "range",
50
+ min: 30,
51
+ max: 120,
52
+ step: 1,
53
+ label: "FOV"
54
+ }
55
+ },
56
+ zoom: {
57
+ default: 1,
58
+ description: "Zoom in to fill the frame after rotation",
59
+ ui: {
60
+ type: "range",
61
+ min: .5,
62
+ max: 3,
63
+ step: .01,
64
+ label: "Zoom"
65
+ }
66
+ },
67
+ offset: {
68
+ default: {
69
+ x: .5,
70
+ y: .5
71
+ },
72
+ transform: transformPosition,
73
+ description: "Shift the result in X/Y",
74
+ ui: {
75
+ type: "position",
76
+ label: "Offset"
77
+ }
78
+ },
79
+ edges: {
80
+ default: "transparent",
81
+ description: "How to handle edges",
82
+ transform: transformEdges,
83
+ ui: {
84
+ type: "select",
85
+ options: [
86
+ {
87
+ label: "Stretch",
88
+ value: "stretch"
89
+ },
90
+ {
91
+ label: "Transparent",
92
+ value: "transparent"
93
+ },
94
+ {
95
+ label: "Mirror",
96
+ value: "mirror"
97
+ },
98
+ {
99
+ label: "Wrap",
100
+ value: "wrap"
101
+ }
102
+ ],
103
+ label: "Edges"
104
+ }
105
+ }
106
+ },
107
+ fragmentNode: ({ uniforms, childNode, onCleanup }) => {
108
+ if (!childNode) return vec4(0, 0, 0, 0);
109
+ const childTexture = convertToTexture(childNode);
110
+ onCleanup(() => {
111
+ if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
112
+ });
113
+ const centerPos = vec2(uniforms.center.uniform.x, uniforms.center.uniform.y.oneMinus());
114
+ const zoom = uniforms.zoom.uniform;
115
+ const x = screenUV.x.sub(centerPos.x).div(zoom);
116
+ const y = screenUV.y.sub(centerPos.y).div(zoom);
117
+ const panRad = uniforms.pan.uniform.mul(Math.PI / 180);
118
+ const tiltRad = uniforms.tilt.uniform.mul(Math.PI / 180);
119
+ const fovRad = uniforms.fov.uniform.mul(Math.PI / 180);
120
+ const cosPan = cos(panRad);
121
+ const sinPan = sin(panRad);
122
+ const cosTilt = cos(tiltRad);
123
+ const sinTilt = sin(tiltRad);
124
+ const perspectiveFactor = tan(fovRad.mul(.5)).mul(2);
125
+ const safePanDivisor = max(cosPan.add(sinPan.mul(x).mul(perspectiveFactor)), float(.001));
126
+ const afterPanX = x.div(safePanDivisor);
127
+ const afterPanY = y.mul(cosPan).div(safePanDivisor);
128
+ const safeTiltDivisor = max(cosTilt.add(sinTilt.mul(afterPanY).mul(perspectiveFactor)), float(.001));
129
+ const finalX = afterPanX.mul(cosTilt).div(safeTiltDivisor);
130
+ const finalY = afterPanY.div(safeTiltDivisor);
131
+ const offsetPos = vec2(uniforms.offset.uniform.x, uniforms.offset.uniform.y.oneMinus());
132
+ const finalUV = vec2(finalX, finalY).add(centerPos).sub(offsetPos).add(vec2(.5, .5));
133
+ return applyEdgeHandling(finalUV, childTexture.sample(finalUV), childTexture, uniforms.edges.uniform);
134
+ }
135
+ };
136
+ var Perspective_default = componentDefinition;
137
+ export { componentDefinition as n, Perspective_default as t };
@@ -0,0 +1,41 @@
1
+ import { Fn, clamp, convertToTexture, float, screenUV, vec2, vec4, viewportSize } from "three/tsl";
2
+ const componentDefinition = {
3
+ name: "Sharpness",
4
+ category: "Adjustments",
5
+ description: "Adjust image sharpness using a convolution kernel",
6
+ requiresRTT: true,
7
+ requiresChild: true,
8
+ props: { sharpness: {
9
+ default: 0,
10
+ description: "How sharp to make the underlying image",
11
+ ui: {
12
+ type: "range",
13
+ min: 0,
14
+ max: 5,
15
+ step: .01,
16
+ label: "Sharpness"
17
+ }
18
+ } },
19
+ fragmentNode: ({ uniforms, childNode, onCleanup }) => {
20
+ if (!childNode) return vec4(0, 0, 0, 0);
21
+ const childTexture = convertToTexture(childNode);
22
+ onCleanup(() => {
23
+ if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
24
+ });
25
+ return Fn(() => {
26
+ const uv$1 = screenUV;
27
+ const amount = uniforms.sharpness.uniform;
28
+ const pixelSize = vec2(1).div(viewportSize);
29
+ const center = childTexture.sample(uv$1);
30
+ const top = childTexture.sample(uv$1.add(vec2(0, pixelSize.y)));
31
+ const bottom = childTexture.sample(uv$1.sub(vec2(0, pixelSize.y)));
32
+ const left = childTexture.sample(uv$1.sub(vec2(pixelSize.x, 0)));
33
+ const right = childTexture.sample(uv$1.add(vec2(pixelSize.x, 0)));
34
+ const centerWeight = float(1).add(amount.mul(4));
35
+ const neighborWeight = amount.negate();
36
+ return vec4(clamp(center.mul(centerWeight).add(top.mul(neighborWeight)).add(bottom.mul(neighborWeight)).add(left.mul(neighborWeight)).add(right.mul(neighborWeight)).rgb, 0, 1), center.a);
37
+ })();
38
+ }
39
+ };
40
+ var Sharpness_default = componentDefinition;
41
+ export { componentDefinition as n, Sharpness_default as t };
@@ -36,28 +36,30 @@ import { n as componentDefinition$30 } from "./Invert-w9duGaUu.js";
36
36
  import { n as componentDefinition$31 } from "./LinearBlur-CTXjolzL.js";
37
37
  import { n as componentDefinition$32 } from "./LinearGradient-CZo6e7r8.js";
38
38
  import { n as componentDefinition$33 } from "./Liquify-BbfDBMNZ.js";
39
- import { n as componentDefinition$34 } from "./Pixelate-C5Rx1dBp.js";
40
- import { n as componentDefinition$35 } from "./PolarCoordinates-CIh5ef8m.js";
41
- import { n as componentDefinition$36 } from "./Posterize-Byy0Ek0l.js";
42
- import { n as componentDefinition$37 } from "./ProgressiveBlur-Bzz24_y-.js";
43
- import { n as componentDefinition$38 } from "./RadialGradient-Ci1dU-1K.js";
44
- import { n as componentDefinition$39 } from "./RectangularCoordinates-tVGG7WOJ.js";
45
- import { n as componentDefinition$40 } from "./Ripples-BCGSt5HD.js";
46
- import { n as componentDefinition$41 } from "./Saturation-DWR1Nruu.js";
47
- import { n as componentDefinition$42 } from "./SimplexNoise-CAtknQS7.js";
48
- import { n as componentDefinition$43 } from "./SineWave-CHtV6kB4.js";
49
- import { n as componentDefinition$44 } from "./SolidColor-CSSquNVW.js";
50
- import { n as componentDefinition$45 } from "./Spherize-BJby0xSU.js";
51
- import { n as componentDefinition$46 } from "./Spiral-CpB3-tFZ.js";
52
- import { n as componentDefinition$47 } from "./Strands-C2KWiJc8.js";
53
- import { n as componentDefinition$48 } from "./Stretch-Chpzutao.js";
54
- import { n as componentDefinition$49 } from "./Swirl-qbMypv_R.js";
55
- import { n as componentDefinition$50 } from "./TiltShift-D0qyWoe3.js";
56
- import { n as componentDefinition$51 } from "./Tritone-DzeueG1F.js";
57
- import { n as componentDefinition$52 } from "./Twirl-B2Ic0WGq.js";
58
- import { n as componentDefinition$53 } from "./Vibrance-BAGXelBi.js";
59
- import { n as componentDefinition$54 } from "./WaveDistortion-DYFl_8vA.js";
60
- import { n as componentDefinition$55 } from "./ZoomBlur-CXpRNRJA.js";
39
+ import { n as componentDefinition$34 } from "./Perspective-CSP2Hb16.js";
40
+ import { n as componentDefinition$35 } from "./Pixelate-BAoi-CSx.js";
41
+ import { n as componentDefinition$36 } from "./PolarCoordinates-BwN9HhFK.js";
42
+ import { n as componentDefinition$37 } from "./Posterize-XoAqPWv2.js";
43
+ import { n as componentDefinition$38 } from "./ProgressiveBlur-RuAm_BKx.js";
44
+ import { n as componentDefinition$39 } from "./RadialGradient-BfFuRbIl.js";
45
+ import { n as componentDefinition$40 } from "./RectangularCoordinates-CiW3J4UT.js";
46
+ import { n as componentDefinition$41 } from "./Ripples-BAcLsbLr.js";
47
+ import { n as componentDefinition$42 } from "./Saturation-DVVlpikK.js";
48
+ import { n as componentDefinition$43 } from "./Sharpness-cw57bW0s.js";
49
+ import { n as componentDefinition$44 } from "./SimplexNoise-CxF7Tl5O.js";
50
+ import { n as componentDefinition$45 } from "./SineWave-SIEiE1O3.js";
51
+ import { n as componentDefinition$46 } from "./SolidColor-zYROg_aE.js";
52
+ import { n as componentDefinition$47 } from "./Spherize-tsKMpSaS.js";
53
+ import { n as componentDefinition$48 } from "./Spiral-PsIc1BI9.js";
54
+ import { n as componentDefinition$49 } from "./Strands-xsbd_3Bt.js";
55
+ import { n as componentDefinition$50 } from "./Stretch-BhHjbcqd.js";
56
+ import { n as componentDefinition$51 } from "./Swirl-CV1prOHF.js";
57
+ import { n as componentDefinition$52 } from "./TiltShift-BYQjUHpn.js";
58
+ import { n as componentDefinition$53 } from "./Tritone-CJW8YTyB.js";
59
+ import { n as componentDefinition$54 } from "./Twirl-5k_XPd51.js";
60
+ import { n as componentDefinition$55 } from "./Vibrance-c25pkbWj.js";
61
+ import { n as componentDefinition$56 } from "./WaveDistortion-BRgbfqt3.js";
62
+ import { n as componentDefinition$57 } from "./ZoomBlur-DEozXA8U.js";
61
63
  import { Material, Mesh, MeshBasicNodeMaterial, OrthographicCamera, PlaneGeometry, SRGBColorSpace, Scene, WebGPURenderer } from "three/webgpu";
62
64
  import { WebGLRenderer } from "three";
63
65
  import { PI, abs, add, atan, convertToTexture, cos, div, dot, float, fract, max, min, mix, mul, pow, screenUV, sin, smoothstep, sqrt, step, sub, time, uniform, uv, vec2, vec3, vec4 } from "three/tsl";
@@ -1084,7 +1086,7 @@ function shaderRenderer() {
1084
1086
  }
1085
1087
  }
1086
1088
  };
1087
- const registerNode = (id, fragmentNodeFunc, parentId, metadata, uniforms = {}, componentDefinition$56) => {
1089
+ const registerNode = (id, fragmentNodeFunc, parentId, metadata, uniforms = {}, componentDefinition$58) => {
1088
1090
  if (fragmentNodeFunc === null) {
1089
1091
  const queueIndex = pendingRegistrationQueue.findIndex((item) => item.id === id);
1090
1092
  if (queueIndex !== -1) {
@@ -1102,7 +1104,7 @@ function shaderRenderer() {
1102
1104
  parentId,
1103
1105
  metadata,
1104
1106
  uniforms,
1105
- componentDefinition: componentDefinition$56
1107
+ componentDefinition: componentDefinition$58
1106
1108
  };
1107
1109
  else pendingRegistrationQueue.push({
1108
1110
  id,
@@ -1110,7 +1112,7 @@ function shaderRenderer() {
1110
1112
  parentId,
1111
1113
  metadata,
1112
1114
  uniforms,
1113
- componentDefinition: componentDefinition$56
1115
+ componentDefinition: componentDefinition$58
1114
1116
  });
1115
1117
  return;
1116
1118
  }
@@ -1143,11 +1145,11 @@ function shaderRenderer() {
1143
1145
  }
1144
1146
  const nodeInfo = {
1145
1147
  id,
1146
- componentName: componentDefinition$56?.name || "Unknown",
1148
+ componentName: componentDefinition$58?.name || "Unknown",
1147
1149
  fragmentNodeFunc,
1148
1150
  parentId,
1149
- requiresRTT: componentDefinition$56?.requiresRTT || false,
1150
- requiresChild: componentDefinition$56?.requiresChild || false,
1151
+ requiresRTT: componentDefinition$58?.requiresRTT || false,
1152
+ requiresChild: componentDefinition$58?.requiresChild || false,
1151
1153
  opacityUniform,
1152
1154
  metadata: {
1153
1155
  blendMode: metadata?.blendMode || "normal",
@@ -1463,7 +1465,7 @@ function shaderRenderer() {
1463
1465
  if (pendingRegistrationQueue.length === 0) return;
1464
1466
  const queue = [...pendingRegistrationQueue];
1465
1467
  pendingRegistrationQueue = [];
1466
- for (const { id, fragmentNodeFunc, parentId, metadata, uniforms, componentDefinition: componentDefinition$56 } of queue) if (fragmentNodeFunc) registerNode(id, fragmentNodeFunc, parentId, metadata, uniforms, componentDefinition$56);
1468
+ for (const { id, fragmentNodeFunc, parentId, metadata, uniforms, componentDefinition: componentDefinition$58 } of queue) if (fragmentNodeFunc) registerNode(id, fragmentNodeFunc, parentId, metadata, uniforms, componentDefinition$58);
1467
1469
  };
1468
1470
  const initialize = async ({ canvas, enablePerformanceTracking: enableTracking = false }) => {
1469
1471
  if (isInitialized || isInitializing) return;
@@ -1792,28 +1794,30 @@ var createShaderRegistry = () => {
1792
1794
  LinearBlur: componentDefinition$31,
1793
1795
  LinearGradient: componentDefinition$32,
1794
1796
  Liquify: componentDefinition$33,
1795
- Pixelate: componentDefinition$34,
1796
- PolarCoordinates: componentDefinition$35,
1797
- Posterize: componentDefinition$36,
1798
- ProgressiveBlur: componentDefinition$37,
1799
- RadialGradient: componentDefinition$38,
1800
- RectangularCoordinates: componentDefinition$39,
1801
- Ripples: componentDefinition$40,
1802
- Saturation: componentDefinition$41,
1803
- SimplexNoise: componentDefinition$42,
1804
- SineWave: componentDefinition$43,
1805
- SolidColor: componentDefinition$44,
1806
- Spherize: componentDefinition$45,
1807
- Spiral: componentDefinition$46,
1808
- Strands: componentDefinition$47,
1809
- Stretch: componentDefinition$48,
1810
- Swirl: componentDefinition$49,
1811
- TiltShift: componentDefinition$50,
1812
- Tritone: componentDefinition$51,
1813
- Twirl: componentDefinition$52,
1814
- Vibrance: componentDefinition$53,
1815
- WaveDistortion: componentDefinition$54,
1816
- ZoomBlur: componentDefinition$55
1797
+ Perspective: componentDefinition$34,
1798
+ Pixelate: componentDefinition$35,
1799
+ PolarCoordinates: componentDefinition$36,
1800
+ Posterize: componentDefinition$37,
1801
+ ProgressiveBlur: componentDefinition$38,
1802
+ RadialGradient: componentDefinition$39,
1803
+ RectangularCoordinates: componentDefinition$40,
1804
+ Ripples: componentDefinition$41,
1805
+ Saturation: componentDefinition$42,
1806
+ Sharpness: componentDefinition$43,
1807
+ SimplexNoise: componentDefinition$44,
1808
+ SineWave: componentDefinition$45,
1809
+ SolidColor: componentDefinition$46,
1810
+ Spherize: componentDefinition$47,
1811
+ Spiral: componentDefinition$48,
1812
+ Strands: componentDefinition$49,
1813
+ Stretch: componentDefinition$50,
1814
+ Swirl: componentDefinition$51,
1815
+ TiltShift: componentDefinition$52,
1816
+ Tritone: componentDefinition$53,
1817
+ Twirl: componentDefinition$54,
1818
+ Vibrance: componentDefinition$55,
1819
+ WaveDistortion: componentDefinition$56,
1820
+ ZoomBlur: componentDefinition$57
1817
1821
  };
1818
1822
  Object.entries(shaderDefinitions).forEach(([fileName, def]) => {
1819
1823
  const propsMetadata = {};
@@ -1 +1 @@
1
- {"version":3,"file":"shaderRegistry.d.ts","sourceRoot":"","sources":["../src/shaderRegistry.ts"],"names":[],"mappings":"AA2DA,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;AA4FD,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":"AA6DA,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;AA8FD,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,57 @@
1
+ import { ComponentDefinition } from '../../types';
2
+ import { transformPosition } from '../../utilities/transformations';
3
+
4
+ export interface ComponentProps {
5
+ /**
6
+ * Center point of rotation
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
+ * Horizontal rotation (left/right)
14
+ *
15
+ * Accepts a number between -90 and 90.
16
+ * @default 0
17
+ */
18
+ pan: number;
19
+ /**
20
+ * Vertical rotation (up/down)
21
+ *
22
+ * Accepts a number between -90 and 90.
23
+ * @default 0
24
+ */
25
+ tilt: number;
26
+ /**
27
+ * Field of view - controls perspective intensity
28
+ *
29
+ * Accepts a number between 30 and 120.
30
+ * @default 60
31
+ */
32
+ fov: number;
33
+ /**
34
+ * Zoom in to fill the frame after rotation
35
+ *
36
+ * Accepts a number between 0.5 and 3.
37
+ * @default 1
38
+ */
39
+ zoom: number;
40
+ /**
41
+ * Shift the result in X/Y
42
+ *
43
+ * Accepts `{ x, y }` objects with values from 0 to 1, or CSS positions like `top center`.
44
+ * @default {"x":0.5,"y":0.5}
45
+ */
46
+ offset: Parameters<typeof transformPosition>[0];
47
+ /**
48
+ * How to handle edges
49
+ *
50
+ * Accepts one of: `"stretch"`, `"transparent"`, `"mirror"`, `"wrap"`.
51
+ * @default "transparent"
52
+ */
53
+ edges: string;
54
+ }
55
+ export declare const componentDefinition: ComponentDefinition<ComponentProps>;
56
+ export default componentDefinition;
57
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Perspective/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,OAAO,EAAC,iBAAiB,EAAiB,MAAM,qCAAqC,CAAA;AAGrF,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAsInE,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 Perspective_default } from "../../Perspective-CSP2Hb16.js";
4
+ export { componentDefinition, Perspective_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Pixelate_default } from "../../Pixelate-C5Rx1dBp.js";
1
+ import { n as componentDefinition, t as Pixelate_default } from "../../Pixelate-BAoi-CSx.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-CIh5ef8m.js";
3
+ import { n as componentDefinition, t as PolarCoordinates_default } from "../../PolarCoordinates-BwN9HhFK.js";
4
4
  export { componentDefinition, PolarCoordinates_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Posterize_default } from "../../Posterize-Byy0Ek0l.js";
1
+ import { n as componentDefinition, t as Posterize_default } from "../../Posterize-XoAqPWv2.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-Bzz24_y-.js";
2
+ import { n as componentDefinition, t as ProgressiveBlur_default } from "../../ProgressiveBlur-RuAm_BKx.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-Ci1dU-1K.js";
3
+ import { n as componentDefinition, t as RadialGradient_default } from "../../RadialGradient-BfFuRbIl.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-tVGG7WOJ.js";
3
+ import { n as componentDefinition, t as RectangularCoordinates_default } from "../../RectangularCoordinates-CiW3J4UT.js";
4
4
  export { componentDefinition, RectangularCoordinates_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-DgRTVr2F.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as Ripples_default } from "../../Ripples-BCGSt5HD.js";
4
+ import { n as componentDefinition, t as Ripples_default } from "../../Ripples-BAcLsbLr.js";
5
5
  export { componentDefinition, Ripples_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Saturation_default } from "../../Saturation-DWR1Nruu.js";
1
+ import { n as componentDefinition, t as Saturation_default } from "../../Saturation-DVVlpikK.js";
2
2
  export { componentDefinition, Saturation_default as default };
@@ -0,0 +1,14 @@
1
+ import { ComponentDefinition } from '../../types';
2
+
3
+ export interface ComponentProps {
4
+ /**
5
+ * How sharp to make the underlying image
6
+ *
7
+ * Accepts a number between 0 and 5.
8
+ * @default 0
9
+ */
10
+ sharpness: number;
11
+ }
12
+ export declare const componentDefinition: ComponentDefinition<ComponentProps>;
13
+ export default componentDefinition;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Sharpness/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,CAuDnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { n as componentDefinition, t as Sharpness_default } from "../../Sharpness-cw57bW0s.js";
2
+ export { componentDefinition, Sharpness_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-DgRTVr2F.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as SimplexNoise_default } from "../../SimplexNoise-CAtknQS7.js";
4
+ import { n as componentDefinition, t as SimplexNoise_default } from "../../SimplexNoise-CxF7Tl5O.js";
5
5
  export { componentDefinition, SimplexNoise_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as SineWave_default } from "../../SineWave-CHtV6kB4.js";
2
+ import { n as componentDefinition, t as SineWave_default } from "../../SineWave-SIEiE1O3.js";
3
3
  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-CSSquNVW.js";
2
+ import { n as componentDefinition, t as SolidColor_default } from "../../SolidColor-zYROg_aE.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-BJby0xSU.js";
2
+ import { n as componentDefinition, t as Spherize_default } from "../../Spherize-tsKMpSaS.js";
3
3
  export { componentDefinition, Spherize_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 Spiral_default } from "../../Spiral-CpB3-tFZ.js";
3
+ import { n as componentDefinition, t as Spiral_default } from "../../Spiral-PsIc1BI9.js";
4
4
  export { componentDefinition, Spiral_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-DgRTVr2F.js";
3
- import { n as componentDefinition, t as Strands_default } from "../../Strands-C2KWiJc8.js";
3
+ import { n as componentDefinition, t as Strands_default } from "../../Strands-xsbd_3Bt.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-Chpzutao.js";
3
+ import { n as componentDefinition, t as Stretch_default } from "../../Stretch-BhHjbcqd.js";
4
4
  export { componentDefinition, Stretch_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
2
  import "../../time-DgRTVr2F.js";
3
3
  import "../../colorMixing-CZPFmiT4.js";
4
- import { n as componentDefinition, t as Swirl_default } from "../../Swirl-qbMypv_R.js";
4
+ import { n as componentDefinition, t as Swirl_default } from "../../Swirl-CV1prOHF.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-D0qyWoe3.js";
2
+ import { n as componentDefinition, t as TiltShift_default } from "../../TiltShift-BYQjUHpn.js";
3
3
  export { componentDefinition, TiltShift_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-DzeueG1F.js";
3
+ import { n as componentDefinition, t as Tritone_default } from "../../Tritone-CJW8YTyB.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-B2Ic0WGq.js";
3
+ import { n as componentDefinition, t as Twirl_default } from "../../Twirl-5k_XPd51.js";
4
4
  export { componentDefinition, Twirl_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-BAGXelBi.js";
1
+ import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-c25pkbWj.js";
2
2
  export { componentDefinition, Vibrance_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 WaveDistortion_default } from "../../WaveDistortion-DYFl_8vA.js";
3
+ import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-BRgbfqt3.js";
4
4
  export { componentDefinition, WaveDistortion_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-YbhRK-rd.js";
2
- import { n as componentDefinition, t as ZoomBlur_default } from "../../ZoomBlur-CXpRNRJA.js";
2
+ import { n as componentDefinition, t as ZoomBlur_default } from "../../ZoomBlur-DEozXA8U.js";
3
3
  export { componentDefinition, ZoomBlur_default as default };
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ import { BlendMode, TransformConfig } from '../../core';
3
+ import { ComponentProps } from '../../core/shaders/Perspective';
4
+
5
+ export type { ComponentProps };
6
+ /**
7
+ * Base props that all shader components have
8
+ */
9
+ interface BaseShaderProps {
10
+ children?: React.ReactNode;
11
+ blendMode?: BlendMode;
12
+ opacity?: number;
13
+ visible?: boolean;
14
+ id?: string;
15
+ maskSource?: string;
16
+ maskType?: string;
17
+ renderOrder?: number;
18
+ transform?: Partial<TransformConfig>;
19
+ ref?: React.Ref<any>;
20
+ }
21
+ /**
22
+ * Component-specific props that merge base props with shader-specific props
23
+ * Note: ComponentProps are made optional since they have defaults from the shader definition
24
+ */
25
+ type ShaderComponentProps = BaseShaderProps & Partial<ComponentProps>;
26
+ /**
27
+ * The main React wrapper component for Shader shader nodes
28
+ */
29
+ export declare const OmbreComponent: React.FC<ShaderComponentProps>;
30
+ export default OmbreComponent;
31
+ //# sourceMappingURL=Perspective.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Perspective.d.ts","sourceRoot":"","sources":["../../src/components/Perspective.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EAGH,KAAK,SAAS,EAId,KAAK,eAAe,EACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGpF,YAAY,EAAE,cAAc,EAAE,CAAC;AAI/B;;GAEG;AACH,UAAU,eAAe;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACxB;AAED;;;GAGG;AACH,KAAK,oBAAoB,GAAG,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAsDtE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwJzD,CAAC;AAEF,eAAe,cAAc,CAAC"}