@remotion/effects 4.0.468 → 4.0.470

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.
@@ -0,0 +1,2 @@
1
+ export declare const FISHEYE_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 FISHEYE_FS = "#version 300 es\nprecision highp float;\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform sampler2D uSource;\nuniform vec2 uCenter;\nuniform float uFieldOfView;\nuniform float uRadius;\nuniform float uZoom;\nuniform float uAspect;\n\nvoid main() {\n\tvec2 toCenter = vUv - uCenter;\n\tvec2 aspectCorrected = vec2(toCenter.x * uAspect, toCenter.y);\n\n\tfloat dist = length(aspectCorrected);\n\tfloat r = dist / max(uRadius, 0.0001);\n\n\tif (r > 1.0 || uFieldOfView <= 0.0001) {\n\t\tfragColor = vec4(0.0);\n\t\treturn;\n\t}\n\n\tfloat halfFov = uFieldOfView * 0.5;\n\tfloat warped = tan(r * halfFov) / tan(halfFov);\n\n\tfloat scale = (dist > 0.00001) ? (warped * uRadius / dist) : 0.0;\n\tvec2 warpedAspect = aspectCorrected * scale;\n\tvec2 warpedOffset = vec2(warpedAspect.x / uAspect, warpedAspect.y);\n\twarpedOffset /= max(uZoom, 0.0001);\n\n\tvec2 srcUv = uCenter + warpedOffset;\n\n\tif (\n\t\tsrcUv.x < 0.0 ||\n\t\tsrcUv.x > 1.0 ||\n\t\tsrcUv.y < 0.0 ||\n\t\tsrcUv.y > 1.0\n\t) {\n\t\tfragColor = vec4(0.0);\n\t\treturn;\n\t}\n\n\tfragColor = texture(uSource, srcUv);\n}\n";
@@ -0,0 +1,26 @@
1
+ export type FisheyeUvCoordinate = readonly [number, number];
2
+ export type FisheyeParams = {
3
+ /**
4
+ * Lens field of view in radians, from `0` to `Math.PI`.
5
+ * Higher values produce a stronger fisheye distortion.
6
+ * Defaults to `2.5` (approx. 143°).
7
+ */
8
+ readonly fieldOfView?: number;
9
+ /**
10
+ * Center of the lens in UV coordinates. Defaults to `[0.5, 0.5]`.
11
+ */
12
+ readonly center?: FisheyeUvCoordinate;
13
+ /**
14
+ * Radius of the lens area, in normalized half-height units.
15
+ * `1` covers the full vertical area. Defaults to `1`.
16
+ */
17
+ readonly radius?: number;
18
+ /**
19
+ * Post-warp zoom factor. Values above `1` zoom in, below `1` zoom out.
20
+ * Defaults to `1`.
21
+ */
22
+ readonly zoom?: number;
23
+ };
24
+ export declare const fisheye: (params?: (FisheyeParams & {
25
+ readonly disabled?: boolean | undefined;
26
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1 @@
1
+ export { fisheye, type FisheyeParams } from './fisheye/index.js';
@@ -0,0 +1 @@
1
+ export declare const buildGaussianBlurFs: (direction: "horizontal" | "vertical") => string;
@@ -0,0 +1,93 @@
1
+ declare const HALFTONE_LINEAR_GRADIENT_COLOR_MODES: readonly ["solid", "source"];
2
+ export declare const halftoneLinearGradientSchema: {
3
+ readonly firstStopDotSize: {
4
+ readonly type: "number";
5
+ readonly min: 0;
6
+ readonly max: 400;
7
+ readonly step: 1;
8
+ readonly default: 0;
9
+ readonly description: "First stop dot size";
10
+ };
11
+ readonly secondStopDotSize: {
12
+ readonly type: "number";
13
+ readonly min: 0;
14
+ readonly max: 400;
15
+ readonly step: 1;
16
+ readonly default: 40;
17
+ readonly description: "Second stop dot size";
18
+ };
19
+ readonly firstStopPosition: {
20
+ readonly type: "uv-coordinate";
21
+ readonly min: -1;
22
+ readonly max: 2;
23
+ readonly step: 0.01;
24
+ readonly default: readonly [0, 0.5];
25
+ readonly description: "First stop position";
26
+ };
27
+ readonly secondStopPosition: {
28
+ readonly type: "uv-coordinate";
29
+ readonly min: -1;
30
+ readonly max: 2;
31
+ readonly step: 0.01;
32
+ readonly default: readonly [1, 0.5];
33
+ readonly description: "Second stop position";
34
+ };
35
+ readonly gridSize: {
36
+ readonly type: "number";
37
+ readonly min: 1;
38
+ readonly max: 400;
39
+ readonly step: 1;
40
+ readonly default: 24;
41
+ readonly description: "Grid size";
42
+ };
43
+ readonly colorMode: {
44
+ readonly type: "enum";
45
+ readonly default: "solid";
46
+ readonly description: "Color mode";
47
+ readonly variants: {
48
+ readonly solid: {
49
+ readonly dotColor: {
50
+ readonly type: "color";
51
+ readonly default: "black";
52
+ readonly description: "Dot color";
53
+ };
54
+ };
55
+ readonly source: {};
56
+ };
57
+ };
58
+ };
59
+ export type HalftoneLinearGradientColorMode = (typeof HALFTONE_LINEAR_GRADIENT_COLOR_MODES)[number];
60
+ export type UvCoordinate = readonly [number, number];
61
+ type HalftoneLinearGradientCommonParams = {
62
+ /**
63
+ * Dot diameter at the first side of the gradient.
64
+ */
65
+ readonly firstStopDotSize?: number;
66
+ /**
67
+ * Dot diameter at the opposite side of the gradient.
68
+ */
69
+ readonly secondStopDotSize?: number;
70
+ /**
71
+ * UV coordinate where the first dot size is reached.
72
+ */
73
+ readonly firstStopPosition?: UvCoordinate;
74
+ /**
75
+ * UV coordinate where the second dot size is reached.
76
+ */
77
+ readonly secondStopPosition?: UvCoordinate;
78
+ /**
79
+ * Distance between adjacent dot centers.
80
+ */
81
+ readonly gridSize?: number;
82
+ };
83
+ export type HalftoneLinearGradientParams = HalftoneLinearGradientCommonParams & ({
84
+ readonly colorMode?: 'solid';
85
+ /** Dot color. Defaults to black. */
86
+ readonly dotColor?: string;
87
+ } | {
88
+ readonly colorMode: 'source';
89
+ });
90
+ export declare const halftoneLinearGradient: (params?: (HalftoneLinearGradientParams & {
91
+ readonly disabled?: boolean | undefined;
92
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
93
+ export {};
@@ -0,0 +1,61 @@
1
+ declare const LINE_DIRECTIONS: readonly ["horizontal", "vertical"];
2
+ export declare const linesSchema: {
3
+ readonly direction: {
4
+ readonly type: "enum";
5
+ readonly variants: {
6
+ readonly horizontal: {};
7
+ readonly vertical: {};
8
+ };
9
+ readonly default: "horizontal";
10
+ readonly description: "Direction";
11
+ };
12
+ readonly thickness: {
13
+ readonly type: "number";
14
+ readonly min: 0.1;
15
+ readonly max: 400;
16
+ readonly step: 0.1;
17
+ readonly default: 40;
18
+ readonly description: "Thickness";
19
+ };
20
+ readonly gap: {
21
+ readonly type: "number";
22
+ readonly min: 0;
23
+ readonly max: 400;
24
+ readonly step: 0.1;
25
+ readonly default: 0;
26
+ readonly description: "Gap";
27
+ };
28
+ readonly angle: {
29
+ readonly type: "number";
30
+ readonly min: -180;
31
+ readonly max: 180;
32
+ readonly step: 1;
33
+ readonly default: 0;
34
+ readonly description: "Angle";
35
+ };
36
+ readonly offset: {
37
+ readonly type: "number";
38
+ readonly step: 0.1;
39
+ readonly default: 0;
40
+ readonly description: "Offset";
41
+ };
42
+ };
43
+ export type LinesDirection = (typeof LINE_DIRECTIONS)[number];
44
+ export type LinesParams = {
45
+ /** Stripe colors, assigned cyclically. Defaults to light blue and transparent. */
46
+ readonly colors?: readonly string[];
47
+ /** Line direction. Defaults to `horizontal`. */
48
+ readonly direction?: LinesDirection;
49
+ /** Thickness of each stripe in pixels. Defaults to `40`. */
50
+ readonly thickness?: number;
51
+ /** Transparent gap in pixels between each stripe. Defaults to `0` (stripes are packed solid). */
52
+ readonly gap?: number;
53
+ /** Rotates the line pattern in degrees. Defaults to `0`. */
54
+ readonly angle?: number;
55
+ /** Offset in pixels. Animate this value to scroll the lines. Defaults to `0`. */
56
+ readonly offset?: number;
57
+ };
58
+ export declare const lines: (params?: (LinesParams & {
59
+ readonly disabled?: boolean | undefined;
60
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
61
+ export {};
@@ -0,0 +1,11 @@
1
+ export type NoiseParams = {
2
+ /** Strength of the noise from `0` to `1`. Defaults to `0.15`. */
3
+ readonly amount?: number;
4
+ /** Seed for the random noise pattern. Defaults to `0`. */
5
+ readonly seed?: number;
6
+ /** Multiply the noise with the input colors before blending. Defaults to `false`. */
7
+ readonly premultiply?: boolean;
8
+ };
9
+ export declare const noise: (params?: (NoiseParams & {
10
+ readonly disabled?: boolean | undefined;
11
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,15 @@
1
+ export type ScanlinesParams = {
2
+ /** Strength of the scanline modulation from `0` to `1`. Defaults to `0.15`. */
3
+ readonly amount?: number;
4
+ /** Distance between scanlines in pixels. Defaults to `4`. */
5
+ readonly spacing?: number;
6
+ /** Thickness of each scanline in pixels. Defaults to `1`. */
7
+ readonly thickness?: number;
8
+ /** Vertical offset in pixels. Animate this value to scroll the scanlines. Defaults to `0`. */
9
+ readonly offset?: number;
10
+ /** Multiply the scanline contribution with the input colors before blending. Defaults to `false`. */
11
+ readonly premultiply?: boolean;
12
+ };
13
+ export declare const scanlines: (params?: (ScanlinesParams & {
14
+ readonly disabled?: boolean | undefined;
15
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,11 @@
1
+ export type SpeckleParams = {
2
+ /** Chance that a grid cell receives an alpha hole. Defaults to `0.08`. */
3
+ readonly density?: number;
4
+ /** Maximum speckle diameter in pixels. Defaults to `4`. */
5
+ readonly size?: number;
6
+ /** Amount of random position and size variation between 0 and 1. Defaults to `1`. */
7
+ readonly randomness?: number;
8
+ };
9
+ export declare const speckle: (params?: (SpeckleParams & {
10
+ readonly disabled?: boolean | undefined;
11
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type EffectDefinitionAndStack, type EffectDescriptor } from 'remotion';
2
+ export declare const testImage: ({ blob, testId, threshold, allowedMismatchedPixelRatio, }: {
3
+ blob: Blob;
4
+ testId: string;
5
+ threshold?: number | undefined;
6
+ allowedMismatchedPixelRatio?: number | undefined;
7
+ }) => Promise<void>;
8
+ export declare const descriptorsToMemoizedEffects: (effects: EffectDescriptor<unknown>[]) => EffectDefinitionAndStack<unknown>[];
9
+ export declare const renderEffectChainToBlob: ({ effects, width, height, }: {
10
+ effects: EffectDefinitionAndStack<unknown>[];
11
+ width?: number | undefined;
12
+ height?: number | undefined;
13
+ }) => Promise<Blob>;
@@ -0,0 +1,9 @@
1
+ export type WhiteNoiseParams = {
2
+ /** Blend amount from `0` to `1`. Defaults to `1`. */
3
+ readonly amount?: number;
4
+ /** Seed for the random noise pattern. Defaults to `0`. */
5
+ readonly seed?: number;
6
+ };
7
+ export declare const whiteNoise: (params?: (WhiteNoiseParams & {
8
+ readonly disabled?: boolean | undefined;
9
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/effects",
3
- "version": "4.0.468",
3
+ "version": "4.0.470",
4
4
  "description": "Effects that can be applied to Remotion-based canvas components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,6 +11,8 @@
11
11
  "type": "module",
12
12
  "scripts": {
13
13
  "test": "bun test src/test",
14
+ "testvisual": "vitest src/visual-test/effects-visual.test.ts",
15
+ "testeffectsvisual": "vitest src/visual-test/effects-visual.test.ts --browser --run",
14
16
  "formatting": "oxfmt src --check",
15
17
  "format": "oxfmt src",
16
18
  "lint": "eslint src",
@@ -24,7 +26,7 @@
24
26
  "url": "https://github.com/remotion-dev/remotion/issues"
25
27
  },
26
28
  "dependencies": {
27
- "remotion": "4.0.468"
29
+ "remotion": "4.0.470"
28
30
  },
29
31
  "exports": {
30
32
  ".": {
@@ -57,11 +59,26 @@
57
59
  "module": "./dist/esm/contrast.mjs",
58
60
  "import": "./dist/esm/contrast.mjs"
59
61
  },
62
+ "./drop-shadow": {
63
+ "types": "./dist/drop-shadow.d.ts",
64
+ "module": "./dist/esm/drop-shadow.mjs",
65
+ "import": "./dist/esm/drop-shadow.mjs"
66
+ },
60
67
  "./duotone": {
61
68
  "types": "./dist/duotone.d.ts",
62
69
  "module": "./dist/esm/duotone.mjs",
63
70
  "import": "./dist/esm/duotone.mjs"
64
71
  },
72
+ "./evolve": {
73
+ "types": "./dist/evolve.d.ts",
74
+ "module": "./dist/esm/evolve.mjs",
75
+ "import": "./dist/esm/evolve.mjs"
76
+ },
77
+ "./fisheye": {
78
+ "types": "./dist/fisheye.d.ts",
79
+ "module": "./dist/esm/fisheye.mjs",
80
+ "import": "./dist/esm/fisheye.mjs"
81
+ },
65
82
  "./glow": {
66
83
  "types": "./dist/glow.d.ts",
67
84
  "module": "./dist/esm/glow.mjs",
@@ -72,6 +89,11 @@
72
89
  "module": "./dist/esm/halftone.mjs",
73
90
  "import": "./dist/esm/halftone.mjs"
74
91
  },
92
+ "./halftone-linear-gradient": {
93
+ "types": "./dist/halftone-linear-gradient.d.ts",
94
+ "module": "./dist/esm/halftone-linear-gradient.mjs",
95
+ "import": "./dist/esm/halftone-linear-gradient.mjs"
96
+ },
75
97
  "./grayscale": {
76
98
  "types": "./dist/grayscale.d.ts",
77
99
  "module": "./dist/esm/grayscale.mjs",
@@ -87,16 +109,36 @@
87
109
  "module": "./dist/esm/invert.mjs",
88
110
  "import": "./dist/esm/invert.mjs"
89
111
  },
112
+ "./lines": {
113
+ "types": "./dist/lines.d.ts",
114
+ "module": "./dist/esm/lines.mjs",
115
+ "import": "./dist/esm/lines.mjs"
116
+ },
117
+ "./dot-grid": {
118
+ "types": "./dist/dot-grid.d.ts",
119
+ "module": "./dist/esm/dot-grid.mjs",
120
+ "import": "./dist/esm/dot-grid.mjs"
121
+ },
90
122
  "./mirror": {
91
123
  "types": "./dist/mirror.d.ts",
92
124
  "module": "./dist/esm/mirror.mjs",
93
125
  "import": "./dist/esm/mirror.mjs"
94
126
  },
127
+ "./noise": {
128
+ "types": "./dist/noise.d.ts",
129
+ "module": "./dist/esm/noise.mjs",
130
+ "import": "./dist/esm/noise.mjs"
131
+ },
95
132
  "./saturation": {
96
133
  "types": "./dist/saturation.d.ts",
97
134
  "module": "./dist/esm/saturation.mjs",
98
135
  "import": "./dist/esm/saturation.mjs"
99
136
  },
137
+ "./scanlines": {
138
+ "types": "./dist/scanlines.d.ts",
139
+ "module": "./dist/esm/scanlines.mjs",
140
+ "import": "./dist/esm/scanlines.mjs"
141
+ },
100
142
  "./scale": {
101
143
  "types": "./dist/scale.d.ts",
102
144
  "module": "./dist/esm/scale.mjs",
@@ -107,6 +149,11 @@
107
149
  "module": "./dist/esm/shine.mjs",
108
150
  "import": "./dist/esm/shine.mjs"
109
151
  },
152
+ "./speckle": {
153
+ "types": "./dist/speckle.d.ts",
154
+ "module": "./dist/esm/speckle.mjs",
155
+ "import": "./dist/esm/speckle.mjs"
156
+ },
110
157
  "./tint": {
111
158
  "types": "./dist/tint.d.ts",
112
159
  "module": "./dist/esm/tint.mjs",
@@ -127,6 +174,11 @@
127
174
  "module": "./dist/esm/wave.mjs",
128
175
  "import": "./dist/esm/wave.mjs"
129
176
  },
177
+ "./white-noise": {
178
+ "types": "./dist/white-noise.d.ts",
179
+ "module": "./dist/esm/white-noise.mjs",
180
+ "import": "./dist/esm/white-noise.mjs"
181
+ },
130
182
  "./package.json": "./package.json"
131
183
  },
132
184
  "typesVersions": {
@@ -146,15 +198,27 @@
146
198
  "contrast": [
147
199
  "dist/contrast.d.ts"
148
200
  ],
201
+ "drop-shadow": [
202
+ "dist/drop-shadow.d.ts"
203
+ ],
149
204
  "duotone": [
150
205
  "dist/duotone.d.ts"
151
206
  ],
207
+ "evolve": [
208
+ "dist/evolve.d.ts"
209
+ ],
210
+ "fisheye": [
211
+ "dist/fisheye.d.ts"
212
+ ],
152
213
  "glow": [
153
214
  "dist/glow.d.ts"
154
215
  ],
155
216
  "halftone": [
156
217
  "dist/halftone.d.ts"
157
218
  ],
219
+ "halftone-linear-gradient": [
220
+ "dist/halftone-linear-gradient.d.ts"
221
+ ],
158
222
  "grayscale": [
159
223
  "dist/grayscale.d.ts"
160
224
  ],
@@ -164,18 +228,33 @@
164
228
  "invert": [
165
229
  "dist/invert.d.ts"
166
230
  ],
231
+ "lines": [
232
+ "dist/lines.d.ts"
233
+ ],
234
+ "dot-grid": [
235
+ "dist/dot-grid.d.ts"
236
+ ],
167
237
  "mirror": [
168
238
  "dist/mirror.d.ts"
169
239
  ],
240
+ "noise": [
241
+ "dist/noise.d.ts"
242
+ ],
170
243
  "saturation": [
171
244
  "dist/saturation.d.ts"
172
245
  ],
246
+ "scanlines": [
247
+ "dist/scanlines.d.ts"
248
+ ],
173
249
  "scale": [
174
250
  "dist/scale.d.ts"
175
251
  ],
176
252
  "shine": [
177
253
  "dist/shine.d.ts"
178
254
  ],
255
+ "speckle": [
256
+ "dist/speckle.d.ts"
257
+ ],
179
258
  "tint": [
180
259
  "dist/tint.d.ts"
181
260
  ],
@@ -187,13 +266,18 @@
187
266
  ],
188
267
  "wave": [
189
268
  "dist/wave.d.ts"
269
+ ],
270
+ "white-noise": [
271
+ "dist/white-noise.d.ts"
190
272
  ]
191
273
  }
192
274
  },
193
275
  "homepage": "https://www.remotion.dev/docs/effects/api",
194
276
  "devDependencies": {
195
- "@remotion/eslint-config-internal": "4.0.468",
277
+ "@remotion/eslint-config-internal": "4.0.470",
278
+ "@vitest/browser-playwright": "4.0.9",
196
279
  "eslint": "9.19.0",
280
+ "vitest": "4.0.9",
197
281
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
198
282
  },
199
283
  "keywords": [