@remotion/effects 4.0.471 → 4.0.473

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 (56) hide show
  1. package/dist/color-key.d.ts +47 -0
  2. package/dist/color-utils.d.ts +4 -1
  3. package/dist/dot-grid.d.ts +2 -0
  4. package/dist/duotone.d.ts +1 -0
  5. package/dist/esm/barrel-distortion.mjs +9 -5
  6. package/dist/esm/blur.mjs +2 -1
  7. package/dist/esm/brightness.mjs +7 -4
  8. package/dist/esm/chromatic-aberration.mjs +10 -6
  9. package/dist/esm/color-key.mjs +419 -0
  10. package/dist/esm/contrast.mjs +7 -4
  11. package/dist/esm/dot-grid.mjs +11 -6
  12. package/dist/esm/drop-shadow.mjs +15 -8
  13. package/dist/esm/duotone.mjs +9 -5
  14. package/dist/esm/evolve.mjs +11 -6
  15. package/dist/esm/fisheye.mjs +13 -7
  16. package/dist/esm/glow.mjs +14 -8
  17. package/dist/esm/grayscale.mjs +7 -4
  18. package/dist/esm/halftone-linear-gradient.mjs +15 -8
  19. package/dist/esm/halftone.mjs +16 -11
  20. package/dist/esm/hue.mjs +7 -4
  21. package/dist/esm/index.mjs +24 -15
  22. package/dist/esm/invert.mjs +7 -4
  23. package/dist/esm/linear-progressive-blur.mjs +531 -0
  24. package/dist/esm/lines.mjs +14 -10
  25. package/dist/esm/mirror.mjs +9 -5
  26. package/dist/esm/noise.mjs +11 -6
  27. package/dist/esm/pixel-dissolve.mjs +17 -9
  28. package/dist/esm/rings.mjs +13 -7
  29. package/dist/esm/saturation.mjs +7 -4
  30. package/dist/esm/scale.mjs +2 -1
  31. package/dist/esm/scanlines.mjs +15 -8
  32. package/dist/esm/shine.mjs +18 -12
  33. package/dist/esm/speckle.mjs +13 -7
  34. package/dist/esm/tint.mjs +9 -5
  35. package/dist/esm/translate.mjs +15 -8
  36. package/dist/esm/vignette.mjs +40 -12
  37. package/dist/esm/wave.mjs +6 -3
  38. package/dist/esm/waves.mjs +20 -13
  39. package/dist/esm/white-noise.mjs +11 -6
  40. package/dist/esm/zigzag.mjs +18 -12
  41. package/dist/evolve.d.ts +2 -0
  42. package/dist/halftone-linear-gradient.d.ts +4 -0
  43. package/dist/halftone.d.ts +5 -3
  44. package/dist/linear-progressive-blur/index.d.ts +28 -0
  45. package/dist/linear-progressive-blur/linear-progressive-blur-runtime.d.ts +32 -0
  46. package/dist/linear-progressive-blur/linear-progressive-blur-shaders.d.ts +2 -0
  47. package/dist/linear-progressive-blur.d.ts +1 -0
  48. package/dist/lines.d.ts +4 -3
  49. package/dist/rings.d.ts +3 -0
  50. package/dist/tint.d.ts +1 -0
  51. package/dist/vignette.d.ts +13 -0
  52. package/dist/waves.d.ts +7 -3
  53. package/dist/zigzag.d.ts +6 -3
  54. package/package.json +19 -3
  55. package/dist/effect-internals.d.ts +0 -8
  56. package/dist/entrypoints/blur.d.ts +0 -6
@@ -34,14 +34,16 @@ var colorAmountSchema = {
34
34
  max: 1,
35
35
  step: 0.01,
36
36
  default: DEFAULT_AMOUNT,
37
- description: "Amount"
37
+ description: "Amount",
38
+ hiddenFromList: false
38
39
  };
39
40
  var colorMultiplierSchema = {
40
41
  type: "number",
41
42
  min: 0,
42
43
  step: 0.01,
43
44
  default: DEFAULT_AMOUNT,
44
- description: "Amount"
45
+ description: "Amount",
46
+ hiddenFromList: false
45
47
  };
46
48
  var brightnessAmountSchema = {
47
49
  type: "number",
@@ -49,10 +51,11 @@ var brightnessAmountSchema = {
49
51
  max: 1,
50
52
  step: 0.01,
51
53
  default: DEFAULT_BRIGHTNESS_AMOUNT,
52
- description: "Amount"
54
+ description: "Amount",
55
+ hiddenFromList: false
53
56
  };
54
57
  var hueDegreesSchema = {
55
- type: "number",
58
+ type: "rotation-degrees",
56
59
  step: 1,
57
60
  default: DEFAULT_HUE_DEGREES,
58
61
  description: "Degrees"
@@ -104,6 +107,7 @@ var DEFAULT_FEATHER = 0.35;
104
107
  var DEFAULT_ROUNDNESS = 1;
105
108
  var DEFAULT_COLOR = "#000000";
106
109
  var DEFAULT_MODE = "color";
110
+ var DEFAULT_CENTER = [0.5, 0.5];
107
111
  var vignetteSchema = {
108
112
  amount: {
109
113
  type: "number",
@@ -111,7 +115,8 @@ var vignetteSchema = {
111
115
  max: 1,
112
116
  step: 0.01,
113
117
  default: DEFAULT_AMOUNT2,
114
- description: "Amount"
118
+ description: "Amount",
119
+ hiddenFromList: false
115
120
  },
116
121
  radius: {
117
122
  type: "number",
@@ -119,7 +124,8 @@ var vignetteSchema = {
119
124
  max: 1,
120
125
  step: 0.01,
121
126
  default: DEFAULT_RADIUS,
122
- description: "Radius"
127
+ description: "Radius",
128
+ hiddenFromList: false
123
129
  },
124
130
  feather: {
125
131
  type: "number",
@@ -127,7 +133,8 @@ var vignetteSchema = {
127
133
  max: 1,
128
134
  step: 0.01,
129
135
  default: DEFAULT_FEATHER,
130
- description: "Feather"
136
+ description: "Feather",
137
+ hiddenFromList: false
131
138
  },
132
139
  roundness: {
133
140
  type: "number",
@@ -135,7 +142,8 @@ var vignetteSchema = {
135
142
  max: 1,
136
143
  step: 0.01,
137
144
  default: DEFAULT_ROUNDNESS,
138
- description: "Roundness"
145
+ description: "Roundness",
146
+ hiddenFromList: false
139
147
  },
140
148
  color: {
141
149
  type: "color",
@@ -150,6 +158,12 @@ var vignetteSchema = {
150
158
  color: {},
151
159
  alpha: {}
152
160
  }
161
+ },
162
+ center: {
163
+ type: "uv-coordinate",
164
+ step: 0.01,
165
+ default: DEFAULT_CENTER,
166
+ description: "Center"
153
167
  }
154
168
  };
155
169
  var formatEnum = (variants) => {
@@ -172,8 +186,17 @@ var resolve = (p) => ({
172
186
  feather: p.feather ?? DEFAULT_FEATHER,
173
187
  roundness: p.roundness ?? DEFAULT_ROUNDNESS,
174
188
  color: p.color ?? DEFAULT_COLOR,
175
- mode: p.mode ?? DEFAULT_MODE
189
+ mode: p.mode ?? DEFAULT_MODE,
190
+ center: [...p.center ?? DEFAULT_CENTER]
176
191
  });
192
+ var assertOptionalUvCoordinate = (value, name) => {
193
+ if (value === undefined) {
194
+ return;
195
+ }
196
+ if (!Array.isArray(value) || value.length !== 2 || value.some((item) => typeof item !== "number" || !Number.isFinite(item))) {
197
+ throw new TypeError(`"${name}" must be a [number, number] tuple`);
198
+ }
199
+ };
177
200
  var validateVignetteParams = (params) => {
178
201
  assertEffectParamsObject(params, "Vignette");
179
202
  assertOptionalFiniteNumber(params.amount, "amount");
@@ -182,6 +205,7 @@ var validateVignetteParams = (params) => {
182
205
  assertOptionalFiniteNumber(params.roundness, "roundness");
183
206
  assertOptionalColor(params.color, "color");
184
207
  assertOptionalEnum(params.mode, "mode", VIGNETTE_MODES);
208
+ assertOptionalUvCoordinate(params.center, "center");
185
209
  const r = resolve(params);
186
210
  validateUnitInterval(r.amount, "amount");
187
211
  validateUnitInterval(r.radius, "radius");
@@ -211,9 +235,10 @@ uniform float uFeather;
211
235
  uniform float uRoundness;
212
236
  uniform vec4 uColor;
213
237
  uniform int uMode;
238
+ uniform vec2 uCenter;
214
239
 
215
240
  float vignetteMask() {
216
- vec2 centered = abs(vUv * 2.0 - 1.0);
241
+ vec2 centered = abs(vUv - uCenter) * 2.0;
217
242
  float rectangleDistance = max(centered.x, centered.y);
218
243
  float ellipseDistance = length(centered);
219
244
  float distanceFromCenter = mix(rectangleDistance, ellipseDistance, uRoundness);
@@ -363,7 +388,8 @@ var setupVignette = (target) => {
363
388
  uFeather: gl.getUniformLocation(program, "uFeather"),
364
389
  uRoundness: gl.getUniformLocation(program, "uRoundness"),
365
390
  uColor: gl.getUniformLocation(program, "uColor"),
366
- uMode: gl.getUniformLocation(program, "uMode")
391
+ uMode: gl.getUniformLocation(program, "uMode"),
392
+ uCenter: gl.getUniformLocation(program, "uCenter")
367
393
  },
368
394
  colorCtx,
369
395
  cachedColor: "",
@@ -387,7 +413,7 @@ var vignette = createEffect({
387
413
  backend: "webgl2",
388
414
  calculateKey: (params) => {
389
415
  const r = resolve(params);
390
- return `vignette-${r.amount}-${r.radius}-${r.feather}-${r.roundness}-${r.color}-${r.mode}`;
416
+ return `vignette-${r.amount}-${r.radius}-${r.feather}-${r.roundness}-${r.color}-${r.mode}-${r.center.join(":")}`;
391
417
  },
392
418
  setup: (target) => setupVignette(target),
393
419
  apply: ({ source, width, height, params, state, flipSourceY }) => {
@@ -418,6 +444,8 @@ var vignette = createEffect({
418
444
  gl.uniform4f(uniforms.uColor, red, green, blue, alpha);
419
445
  if (uniforms.uMode)
420
446
  gl.uniform1i(uniforms.uMode, r.mode === "alpha" ? 1 : 0);
447
+ if (uniforms.uCenter)
448
+ gl.uniform2f(uniforms.uCenter, r.center[0], r.center[1]);
421
449
  gl.bindVertexArray(vao);
422
450
  gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
423
451
  gl.bindVertexArray(null);
package/dist/esm/wave.mjs CHANGED
@@ -244,7 +244,8 @@ var waveSchema = {
244
244
  phase: {
245
245
  type: "number",
246
246
  default: 0,
247
- description: "Phase"
247
+ description: "Phase",
248
+ hiddenFromList: false
248
249
  },
249
250
  direction: {
250
251
  type: "enum",
@@ -261,7 +262,8 @@ var waveSchema = {
261
262
  max: 500,
262
263
  step: 1,
263
264
  default: 60,
264
- description: "Amplitude"
265
+ description: "Amplitude",
266
+ hiddenFromList: false
265
267
  },
266
268
  wavelength: {
267
269
  type: "number",
@@ -269,7 +271,8 @@ var waveSchema = {
269
271
  max: 2000,
270
272
  step: 1,
271
273
  default: 240,
272
- description: "Wavelength"
274
+ description: "Wavelength",
275
+ hiddenFromList: false
273
276
  }
274
277
  };
275
278
  var resolve = (p) => ({
@@ -34,14 +34,16 @@ var colorAmountSchema = {
34
34
  max: 1,
35
35
  step: 0.01,
36
36
  default: DEFAULT_AMOUNT,
37
- description: "Amount"
37
+ description: "Amount",
38
+ hiddenFromList: false
38
39
  };
39
40
  var colorMultiplierSchema = {
40
41
  type: "number",
41
42
  min: 0,
42
43
  step: 0.01,
43
44
  default: DEFAULT_AMOUNT,
44
- description: "Amount"
45
+ description: "Amount",
46
+ hiddenFromList: false
45
47
  };
46
48
  var brightnessAmountSchema = {
47
49
  type: "number",
@@ -49,10 +51,11 @@ var brightnessAmountSchema = {
49
51
  max: 1,
50
52
  step: 0.01,
51
53
  default: DEFAULT_BRIGHTNESS_AMOUNT,
52
- description: "Amount"
54
+ description: "Amount",
55
+ hiddenFromList: false
53
56
  };
54
57
  var hueDegreesSchema = {
55
- type: "number",
58
+ type: "rotation-degrees",
56
59
  step: 1,
57
60
  default: DEFAULT_HUE_DEGREES,
58
61
  description: "Degrees"
@@ -123,7 +126,8 @@ var wavesSchema = {
123
126
  max: 400,
124
127
  step: 0.1,
125
128
  default: DEFAULT_THICKNESS,
126
- description: "Thickness"
129
+ description: "Thickness",
130
+ hiddenFromList: false
127
131
  },
128
132
  gap: {
129
133
  type: "number",
@@ -131,12 +135,11 @@ var wavesSchema = {
131
135
  max: 400,
132
136
  step: 0.1,
133
137
  default: DEFAULT_GAP,
134
- description: "Gap"
138
+ description: "Gap",
139
+ hiddenFromList: false
135
140
  },
136
141
  angle: {
137
- type: "number",
138
- min: -180,
139
- max: 180,
142
+ type: "rotation-degrees",
140
143
  step: 1,
141
144
  default: DEFAULT_ANGLE,
142
145
  description: "Angle"
@@ -145,7 +148,8 @@ var wavesSchema = {
145
148
  type: "number",
146
149
  step: 0.1,
147
150
  default: DEFAULT_OFFSET,
148
- description: "Offset"
151
+ description: "Offset",
152
+ hiddenFromList: false
149
153
  },
150
154
  amplitude: {
151
155
  type: "number",
@@ -153,7 +157,8 @@ var wavesSchema = {
153
157
  max: 500,
154
158
  step: 0.1,
155
159
  default: DEFAULT_AMPLITUDE,
156
- description: "Amplitude"
160
+ description: "Amplitude",
161
+ hiddenFromList: false
157
162
  },
158
163
  wavelength: {
159
164
  type: "number",
@@ -161,7 +166,8 @@ var wavesSchema = {
161
166
  max: 2000,
162
167
  step: 1,
163
168
  default: DEFAULT_WAVELENGTH,
164
- description: "Wavelength"
169
+ description: "Wavelength",
170
+ hiddenFromList: false
165
171
  },
166
172
  phase: {
167
173
  type: "number",
@@ -169,7 +175,8 @@ var wavesSchema = {
169
175
  max: 360,
170
176
  step: 1,
171
177
  default: DEFAULT_PHASE,
172
- description: "Phase"
178
+ description: "Phase",
179
+ hiddenFromList: false
173
180
  }
174
181
  };
175
182
  var resolve = (p) => {
@@ -34,14 +34,16 @@ var colorAmountSchema = {
34
34
  max: 1,
35
35
  step: 0.01,
36
36
  default: DEFAULT_AMOUNT,
37
- description: "Amount"
37
+ description: "Amount",
38
+ hiddenFromList: false
38
39
  };
39
40
  var colorMultiplierSchema = {
40
41
  type: "number",
41
42
  min: 0,
42
43
  step: 0.01,
43
44
  default: DEFAULT_AMOUNT,
44
- description: "Amount"
45
+ description: "Amount",
46
+ hiddenFromList: false
45
47
  };
46
48
  var brightnessAmountSchema = {
47
49
  type: "number",
@@ -49,10 +51,11 @@ var brightnessAmountSchema = {
49
51
  max: 1,
50
52
  step: 0.01,
51
53
  default: DEFAULT_BRIGHTNESS_AMOUNT,
52
- description: "Amount"
54
+ description: "Amount",
55
+ hiddenFromList: false
53
56
  };
54
57
  var hueDegreesSchema = {
55
- type: "number",
58
+ type: "rotation-degrees",
56
59
  step: 1,
57
60
  default: DEFAULT_HUE_DEGREES,
58
61
  description: "Degrees"
@@ -106,13 +109,15 @@ var whiteNoiseSchema = {
106
109
  max: 1,
107
110
  step: 0.01,
108
111
  default: DEFAULT_AMOUNT2,
109
- description: "Amount"
112
+ description: "Amount",
113
+ hiddenFromList: false
110
114
  },
111
115
  seed: {
112
116
  type: "number",
113
117
  step: 1,
114
118
  default: DEFAULT_SEED,
115
- description: "Seed"
119
+ description: "Seed",
120
+ hiddenFromList: false
116
121
  }
117
122
  };
118
123
  var resolve = (params) => ({
@@ -34,14 +34,16 @@ var colorAmountSchema = {
34
34
  max: 1,
35
35
  step: 0.01,
36
36
  default: DEFAULT_AMOUNT,
37
- description: "Amount"
37
+ description: "Amount",
38
+ hiddenFromList: false
38
39
  };
39
40
  var colorMultiplierSchema = {
40
41
  type: "number",
41
42
  min: 0,
42
43
  step: 0.01,
43
44
  default: DEFAULT_AMOUNT,
44
- description: "Amount"
45
+ description: "Amount",
46
+ hiddenFromList: false
45
47
  };
46
48
  var brightnessAmountSchema = {
47
49
  type: "number",
@@ -49,10 +51,11 @@ var brightnessAmountSchema = {
49
51
  max: 1,
50
52
  step: 0.01,
51
53
  default: DEFAULT_BRIGHTNESS_AMOUNT,
52
- description: "Amount"
54
+ description: "Amount",
55
+ hiddenFromList: false
53
56
  };
54
57
  var hueDegreesSchema = {
55
- type: "number",
58
+ type: "rotation-degrees",
56
59
  step: 1,
57
60
  default: DEFAULT_HUE_DEGREES,
58
61
  description: "Degrees"
@@ -122,7 +125,8 @@ var zigzagSchema = {
122
125
  max: 400,
123
126
  step: 0.1,
124
127
  default: DEFAULT_THICKNESS,
125
- description: "Thickness"
128
+ description: "Thickness",
129
+ hiddenFromList: false
126
130
  },
127
131
  gap: {
128
132
  type: "number",
@@ -130,12 +134,11 @@ var zigzagSchema = {
130
134
  max: 400,
131
135
  step: 0.1,
132
136
  default: DEFAULT_GAP,
133
- description: "Gap"
137
+ description: "Gap",
138
+ hiddenFromList: false
134
139
  },
135
140
  angle: {
136
- type: "number",
137
- min: -180,
138
- max: 180,
141
+ type: "rotation-degrees",
139
142
  step: 1,
140
143
  default: DEFAULT_ANGLE,
141
144
  description: "Angle"
@@ -144,7 +147,8 @@ var zigzagSchema = {
144
147
  type: "number",
145
148
  step: 0.1,
146
149
  default: DEFAULT_OFFSET,
147
- description: "Offset"
150
+ description: "Offset",
151
+ hiddenFromList: false
148
152
  },
149
153
  amplitude: {
150
154
  type: "number",
@@ -152,7 +156,8 @@ var zigzagSchema = {
152
156
  max: 500,
153
157
  step: 0.1,
154
158
  default: DEFAULT_AMPLITUDE,
155
- description: "Amplitude"
159
+ description: "Amplitude",
160
+ hiddenFromList: false
156
161
  },
157
162
  wavelength: {
158
163
  type: "number",
@@ -160,7 +165,8 @@ var zigzagSchema = {
160
165
  max: 2000,
161
166
  step: 1,
162
167
  default: DEFAULT_WAVELENGTH,
163
- description: "Wavelength"
168
+ description: "Wavelength",
169
+ hiddenFromList: false
164
170
  }
165
171
  };
166
172
  var resolve = (p) => {
package/dist/evolve.d.ts CHANGED
@@ -8,6 +8,7 @@ export declare const evolveSchema: {
8
8
  readonly step: 0.01;
9
9
  readonly default: 0.5;
10
10
  readonly description: "Progress";
11
+ readonly hiddenFromList: false;
11
12
  };
12
13
  readonly direction: {
13
14
  readonly type: "enum";
@@ -27,6 +28,7 @@ export declare const evolveSchema: {
27
28
  readonly step: 0.01;
28
29
  readonly default: 0.1;
29
30
  readonly description: "Feather";
31
+ readonly hiddenFromList: false;
30
32
  };
31
33
  };
32
34
  export type EvolveParams = {
@@ -7,6 +7,7 @@ export declare const halftoneLinearGradientSchema: {
7
7
  readonly step: 1;
8
8
  readonly default: 0;
9
9
  readonly description: "First stop dot size";
10
+ readonly hiddenFromList: false;
10
11
  };
11
12
  readonly secondStopDotSize: {
12
13
  readonly type: "number";
@@ -15,6 +16,7 @@ export declare const halftoneLinearGradientSchema: {
15
16
  readonly step: 1;
16
17
  readonly default: 40;
17
18
  readonly description: "Second stop dot size";
19
+ readonly hiddenFromList: false;
18
20
  };
19
21
  readonly firstStopPosition: {
20
22
  readonly type: "uv-coordinate";
@@ -23,6 +25,7 @@ export declare const halftoneLinearGradientSchema: {
23
25
  readonly step: 0.01;
24
26
  readonly default: readonly [0, 0.5];
25
27
  readonly description: "First stop position";
28
+ readonly lineTo: "secondStopPosition";
26
29
  };
27
30
  readonly secondStopPosition: {
28
31
  readonly type: "uv-coordinate";
@@ -39,6 +42,7 @@ export declare const halftoneLinearGradientSchema: {
39
42
  readonly step: 1;
40
43
  readonly default: 24;
41
44
  readonly description: "Grid size";
45
+ readonly hiddenFromList: false;
42
46
  };
43
47
  readonly colorMode: {
44
48
  readonly type: "enum";
@@ -9,6 +9,7 @@ export declare const halftoneSchema: {
9
9
  readonly step: 1;
10
10
  readonly default: 20;
11
11
  readonly description: "Dot size";
12
+ readonly hiddenFromList: false;
12
13
  };
13
14
  readonly dotSpacing: {
14
15
  readonly type: "number";
@@ -17,11 +18,10 @@ export declare const halftoneSchema: {
17
18
  readonly step: 1;
18
19
  readonly default: 20;
19
20
  readonly description: "Dot spacing";
21
+ readonly hiddenFromList: false;
20
22
  };
21
23
  readonly rotation: {
22
- readonly type: "number";
23
- readonly min: -180;
24
- readonly max: 180;
24
+ readonly type: "rotation-degrees";
25
25
  readonly step: 1;
26
26
  readonly default: 0;
27
27
  readonly description: "Rotation";
@@ -31,12 +31,14 @@ export declare const halftoneSchema: {
31
31
  readonly step: 1;
32
32
  readonly default: 0;
33
33
  readonly description: "Offset X";
34
+ readonly hiddenFromList: false;
34
35
  };
35
36
  readonly offsetY: {
36
37
  readonly type: "number";
37
38
  readonly step: 1;
38
39
  readonly default: 0;
39
40
  readonly description: "Offset Y";
41
+ readonly hiddenFromList: false;
40
42
  };
41
43
  readonly shape: {
42
44
  readonly type: "enum";
@@ -0,0 +1,28 @@
1
+ export type LinearProgressiveBlurUvCoordinate = readonly [number, number];
2
+ export type LinearProgressiveBlurParams = {
3
+ /**
4
+ * UV coordinate where `startBlur` is reached. Defaults to `[0, 0.5]`.
5
+ */
6
+ readonly start?: LinearProgressiveBlurUvCoordinate;
7
+ /**
8
+ * UV coordinate where `endBlur` is reached. Defaults to `[1, 0.5]`.
9
+ */
10
+ readonly end?: LinearProgressiveBlurUvCoordinate;
11
+ /**
12
+ * Blur radius in pixels at `start`. Defaults to `0`.
13
+ */
14
+ readonly startBlur?: number;
15
+ /**
16
+ * Blur radius in pixels at `end`. Defaults to `50`.
17
+ */
18
+ readonly endBlur?: number;
19
+ };
20
+ export type LinearProgressiveBlurResolved = {
21
+ readonly start: LinearProgressiveBlurUvCoordinate;
22
+ readonly end: LinearProgressiveBlurUvCoordinate;
23
+ readonly startBlur: number;
24
+ readonly endBlur: number;
25
+ };
26
+ export declare const linearProgressiveBlur: (params?: (LinearProgressiveBlurParams & {
27
+ readonly disabled?: boolean | undefined;
28
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,32 @@
1
+ import type { LinearProgressiveBlurResolved } from './index.js';
2
+ type LinearProgressiveBlurUniforms = {
3
+ readonly uSource: WebGLUniformLocation | null;
4
+ readonly uTexelSize: WebGLUniformLocation | null;
5
+ readonly uStart: WebGLUniformLocation | null;
6
+ readonly uEnd: WebGLUniformLocation | null;
7
+ readonly uStartBlur: WebGLUniformLocation | null;
8
+ readonly uEndBlur: WebGLUniformLocation | null;
9
+ };
10
+ export type LinearProgressiveBlurState = {
11
+ readonly gl: WebGL2RenderingContext;
12
+ readonly programHorizontal: WebGLProgram;
13
+ readonly programVertical: WebGLProgram;
14
+ readonly vao: WebGLVertexArrayObject;
15
+ readonly vbo: WebGLBuffer;
16
+ readonly textureSource: WebGLTexture;
17
+ readonly textureIntermediate: WebGLTexture;
18
+ readonly framebuffer: WebGLFramebuffer;
19
+ readonly horizontal: LinearProgressiveBlurUniforms;
20
+ readonly vertical: LinearProgressiveBlurUniforms;
21
+ };
22
+ export declare const setupLinearProgressiveBlur: (target: HTMLCanvasElement) => LinearProgressiveBlurState;
23
+ export declare const cleanupLinearProgressiveBlur: (state: LinearProgressiveBlurState) => void;
24
+ export declare const applyLinearProgressiveBlur: ({ state, source, width, height, params, flipSourceY, }: {
25
+ readonly state: LinearProgressiveBlurState;
26
+ readonly source: CanvasImageSource;
27
+ readonly width: number;
28
+ readonly height: number;
29
+ readonly params: LinearProgressiveBlurResolved;
30
+ readonly flipSourceY: boolean;
31
+ }) => void;
32
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const LINEAR_PROGRESSIVE_BLUR_VS = "#version 300 es\nlayout(location = 0) in vec2 aPos;\nlayout(location = 1) in vec2 aUv;\nout vec2 vUv;\nvoid main() {\n\tvUv = aUv;\n\tgl_Position = vec4(aPos, 0.0, 1.0);\n}\n";
2
+ export declare const buildLinearProgressiveBlurFs: (direction: "horizontal" | "vertical") => string;
@@ -0,0 +1 @@
1
+ export { linearProgressiveBlur, type LinearProgressiveBlurParams, type LinearProgressiveBlurUvCoordinate, } from './linear-progressive-blur/index.js';
package/dist/lines.d.ts CHANGED
@@ -16,6 +16,7 @@ export declare const linesSchema: {
16
16
  readonly step: 0.1;
17
17
  readonly default: 40;
18
18
  readonly description: "Thickness";
19
+ readonly hiddenFromList: false;
19
20
  };
20
21
  readonly gap: {
21
22
  readonly type: "number";
@@ -24,11 +25,10 @@ export declare const linesSchema: {
24
25
  readonly step: 0.1;
25
26
  readonly default: 0;
26
27
  readonly description: "Gap";
28
+ readonly hiddenFromList: false;
27
29
  };
28
30
  readonly angle: {
29
- readonly type: "number";
30
- readonly min: -180;
31
- readonly max: 180;
31
+ readonly type: "rotation-degrees";
32
32
  readonly step: 1;
33
33
  readonly default: 0;
34
34
  readonly description: "Angle";
@@ -38,6 +38,7 @@ export declare const linesSchema: {
38
38
  readonly step: 0.1;
39
39
  readonly default: 0;
40
40
  readonly description: "Offset";
41
+ readonly hiddenFromList: false;
41
42
  };
42
43
  };
43
44
  export type LinesDirection = (typeof LINE_DIRECTIONS)[number];
package/dist/rings.d.ts CHANGED
@@ -14,6 +14,7 @@ export declare const ringsSchema: {
14
14
  readonly step: 0.1;
15
15
  readonly default: 40;
16
16
  readonly description: "Thickness";
17
+ readonly hiddenFromList: false;
17
18
  };
18
19
  readonly gap: {
19
20
  readonly type: "number";
@@ -22,12 +23,14 @@ export declare const ringsSchema: {
22
23
  readonly step: 0.1;
23
24
  readonly default: 0;
24
25
  readonly description: "Gap";
26
+ readonly hiddenFromList: false;
25
27
  };
26
28
  readonly offset: {
27
29
  readonly type: "number";
28
30
  readonly step: 0.1;
29
31
  readonly default: 0;
30
32
  readonly description: "Offset";
33
+ readonly hiddenFromList: false;
31
34
  };
32
35
  };
33
36
  export type RingsCenter = readonly [number, number];
package/dist/tint.d.ts CHANGED
@@ -11,6 +11,7 @@ export declare const tintSchema: {
11
11
  readonly step: 0.01;
12
12
  readonly default: 0.5;
13
13
  readonly description: "Amount";
14
+ readonly hiddenFromList: false;
14
15
  };
15
16
  };
16
17
  export type TintParams = {
@@ -7,6 +7,7 @@ export declare const vignetteSchema: {
7
7
  readonly step: 0.01;
8
8
  readonly default: 0.5;
9
9
  readonly description: "Amount";
10
+ readonly hiddenFromList: false;
10
11
  };
11
12
  readonly radius: {
12
13
  readonly type: "number";
@@ -15,6 +16,7 @@ export declare const vignetteSchema: {
15
16
  readonly step: 0.01;
16
17
  readonly default: 0.65;
17
18
  readonly description: "Radius";
19
+ readonly hiddenFromList: false;
18
20
  };
19
21
  readonly feather: {
20
22
  readonly type: "number";
@@ -23,6 +25,7 @@ export declare const vignetteSchema: {
23
25
  readonly step: 0.01;
24
26
  readonly default: 0.35;
25
27
  readonly description: "Feather";
28
+ readonly hiddenFromList: false;
26
29
  };
27
30
  readonly roundness: {
28
31
  readonly type: "number";
@@ -31,6 +34,7 @@ export declare const vignetteSchema: {
31
34
  readonly step: 0.01;
32
35
  readonly default: 1;
33
36
  readonly description: "Roundness";
37
+ readonly hiddenFromList: false;
34
38
  };
35
39
  readonly color: {
36
40
  readonly type: "color";
@@ -46,8 +50,15 @@ export declare const vignetteSchema: {
46
50
  readonly alpha: {};
47
51
  };
48
52
  };
53
+ readonly center: {
54
+ readonly type: "uv-coordinate";
55
+ readonly step: 0.01;
56
+ readonly default: readonly [0.5, 0.5];
57
+ readonly description: "Center";
58
+ };
49
59
  };
50
60
  export type VignetteMode = (typeof VIGNETTE_MODES)[number];
61
+ export type VignetteCenter = readonly [number, number];
51
62
  export type VignetteParams = {
52
63
  /** Strength of the vignette from `0` to `1`. Defaults to `0.5`. */
53
64
  readonly amount?: number;
@@ -61,6 +72,8 @@ export type VignetteParams = {
61
72
  readonly color?: string;
62
73
  /** `color` blends a color into the edges, `alpha` fades edges transparent. Defaults to `color`. */
63
74
  readonly mode?: VignetteMode;
75
+ /** Center of the vignette in UV coordinates. Defaults to `[0.5, 0.5]`. */
76
+ readonly center?: VignetteCenter;
64
77
  };
65
78
  export declare const vignette: (params?: (VignetteParams & {
66
79
  readonly disabled?: boolean | undefined;