@remotion/effects 4.0.463 → 4.0.464
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.
- package/dist/esm/blur.mjs +31 -9
- package/dist/esm/halftone.mjs +5 -8
- package/dist/esm/tint.mjs +27 -8
- package/dist/esm/wave.mjs +3 -6
- package/dist/tint.d.ts +1 -1
- package/dist/validate-effect-param.d.ts +3 -0
- package/package.json +4 -3
package/dist/esm/blur.mjs
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __returnValue = (v) => v;
|
|
3
|
-
function __exportSetter(name, newValue) {
|
|
4
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
-
}
|
|
6
2
|
var __export = (target, all) => {
|
|
7
3
|
for (var name in all)
|
|
8
4
|
__defProp(target, name, {
|
|
9
5
|
get: all[name],
|
|
10
6
|
enumerable: true,
|
|
11
7
|
configurable: true,
|
|
12
|
-
set:
|
|
8
|
+
set: (newValue) => all[name] = () => newValue
|
|
13
9
|
});
|
|
14
10
|
};
|
|
15
11
|
|
|
@@ -18,6 +14,26 @@ var exports_blur = {};
|
|
|
18
14
|
__export(exports_blur, {
|
|
19
15
|
blur: () => blur
|
|
20
16
|
});
|
|
17
|
+
import { Internals as Internals2 } from "remotion";
|
|
18
|
+
|
|
19
|
+
// src/validate-effect-param.ts
|
|
20
|
+
var assertEffectParamsObject = (params, effectLabel) => {
|
|
21
|
+
if (params === null || typeof params !== "object") {
|
|
22
|
+
throw new TypeError(`${effectLabel} effect requires a parameters object, but got ${JSON.stringify(params)}`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var assertRequiredFiniteNumber = (value, name) => {
|
|
26
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
27
|
+
throw new TypeError(`"${name}" must be a finite number, but got ${JSON.stringify(value)}`);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var assertRequiredColor = (value, name) => {
|
|
31
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
32
|
+
throw new TypeError(`"${name}" must be a non-empty string, but got ${JSON.stringify(value)}`);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/blur/blur-runtime.ts
|
|
21
37
|
import { Internals } from "remotion";
|
|
22
38
|
|
|
23
39
|
// src/blur/blur-shaders.ts
|
|
@@ -73,6 +89,7 @@ var BLUR_FS_HORIZONTAL = buildFs("horizontal");
|
|
|
73
89
|
var BLUR_FS_VERTICAL = buildFs("vertical");
|
|
74
90
|
|
|
75
91
|
// src/blur/blur-runtime.ts
|
|
92
|
+
var { createWebGL2ContextError } = Internals;
|
|
76
93
|
var compileShader = (gl, type, source) => {
|
|
77
94
|
const shader = gl.createShader(type);
|
|
78
95
|
if (!shader) {
|
|
@@ -135,7 +152,7 @@ var setupBlur = (target) => {
|
|
|
135
152
|
preserveDrawingBuffer: true
|
|
136
153
|
});
|
|
137
154
|
if (!gl) {
|
|
138
|
-
throw
|
|
155
|
+
throw createWebGL2ContextError("blur effect");
|
|
139
156
|
}
|
|
140
157
|
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
141
158
|
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
|
|
@@ -297,17 +314,21 @@ var applyBlur = ({
|
|
|
297
314
|
};
|
|
298
315
|
|
|
299
316
|
// src/blur/index.ts
|
|
300
|
-
var { createEffect } =
|
|
317
|
+
var { createEffect } = Internals2;
|
|
301
318
|
var blurSchema = {
|
|
302
319
|
radius: {
|
|
303
320
|
type: "number",
|
|
304
321
|
min: 0,
|
|
305
322
|
max: 100,
|
|
306
323
|
step: 1,
|
|
307
|
-
default:
|
|
324
|
+
default: undefined,
|
|
308
325
|
description: "Blur radius"
|
|
309
326
|
}
|
|
310
327
|
};
|
|
328
|
+
var validateBlurParams = (params) => {
|
|
329
|
+
assertEffectParamsObject(params, "Blur");
|
|
330
|
+
assertRequiredFiniteNumber(params.radius, "radius");
|
|
331
|
+
};
|
|
311
332
|
var blur = createEffect({
|
|
312
333
|
type: "remotion/blur",
|
|
313
334
|
label: "Blur",
|
|
@@ -324,7 +345,8 @@ var blur = createEffect({
|
|
|
324
345
|
});
|
|
325
346
|
},
|
|
326
347
|
cleanup: (state) => cleanupBlur(state),
|
|
327
|
-
schema: blurSchema
|
|
348
|
+
schema: blurSchema,
|
|
349
|
+
validateParams: validateBlurParams
|
|
328
350
|
});
|
|
329
351
|
|
|
330
352
|
// src/entrypoints/blur.ts
|
package/dist/esm/halftone.mjs
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __returnValue = (v) => v;
|
|
3
|
-
function __exportSetter(name, newValue) {
|
|
4
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
-
}
|
|
6
2
|
var __export = (target, all) => {
|
|
7
3
|
for (var name in all)
|
|
8
4
|
__defProp(target, name, {
|
|
9
5
|
get: all[name],
|
|
10
6
|
enumerable: true,
|
|
11
7
|
configurable: true,
|
|
12
|
-
set:
|
|
8
|
+
set: (newValue) => all[name] = () => newValue
|
|
13
9
|
});
|
|
14
10
|
};
|
|
15
11
|
|
|
16
12
|
// src/halftone.ts
|
|
17
13
|
import { Internals } from "remotion";
|
|
18
|
-
var { createEffect } = Internals;
|
|
14
|
+
var { createEffect, createWebGL2ContextError } = Internals;
|
|
19
15
|
var SHADE_OUTSIDE_DOT_SCALE = 0.5;
|
|
20
16
|
var halftoneSchema = {
|
|
21
17
|
dotSize: {
|
|
@@ -219,7 +215,7 @@ var halftone = createEffect({
|
|
|
219
215
|
preserveDrawingBuffer: true
|
|
220
216
|
});
|
|
221
217
|
if (!gl) {
|
|
222
|
-
throw
|
|
218
|
+
throw createWebGL2ContextError("halftone effect");
|
|
223
219
|
}
|
|
224
220
|
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
225
221
|
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
|
|
@@ -347,7 +343,8 @@ var halftone = createEffect({
|
|
|
347
343
|
gl.deleteVertexArray(vao);
|
|
348
344
|
gl.deleteTexture(texture);
|
|
349
345
|
},
|
|
350
|
-
schema: halftoneSchema
|
|
346
|
+
schema: halftoneSchema,
|
|
347
|
+
validateParams: () => {}
|
|
351
348
|
});
|
|
352
349
|
export {
|
|
353
350
|
halftoneSchema,
|
package/dist/esm/tint.mjs
CHANGED
|
@@ -1,27 +1,41 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __returnValue = (v) => v;
|
|
3
|
-
function __exportSetter(name, newValue) {
|
|
4
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
-
}
|
|
6
2
|
var __export = (target, all) => {
|
|
7
3
|
for (var name in all)
|
|
8
4
|
__defProp(target, name, {
|
|
9
5
|
get: all[name],
|
|
10
6
|
enumerable: true,
|
|
11
7
|
configurable: true,
|
|
12
|
-
set:
|
|
8
|
+
set: (newValue) => all[name] = () => newValue
|
|
13
9
|
});
|
|
14
10
|
};
|
|
15
11
|
|
|
16
12
|
// src/tint.ts
|
|
17
13
|
import { Internals } from "remotion";
|
|
14
|
+
|
|
15
|
+
// src/validate-effect-param.ts
|
|
16
|
+
var assertEffectParamsObject = (params, effectLabel) => {
|
|
17
|
+
if (params === null || typeof params !== "object") {
|
|
18
|
+
throw new TypeError(`${effectLabel} effect requires a parameters object, but got ${JSON.stringify(params)}`);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var assertRequiredFiniteNumber = (value, name) => {
|
|
22
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
23
|
+
throw new TypeError(`"${name}" must be a finite number, but got ${JSON.stringify(value)}`);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var assertRequiredColor = (value, name) => {
|
|
27
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
28
|
+
throw new TypeError(`"${name}" must be a non-empty string, but got ${JSON.stringify(value)}`);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// src/tint.ts
|
|
18
33
|
var { createEffect } = Internals;
|
|
19
34
|
var DEFAULT_AMOUNT = 0.5;
|
|
20
|
-
var DEFAULT_COLOR = "#ff0000";
|
|
21
35
|
var tintSchema = {
|
|
22
36
|
color: {
|
|
23
37
|
type: "color",
|
|
24
|
-
default:
|
|
38
|
+
default: undefined,
|
|
25
39
|
description: "Color"
|
|
26
40
|
},
|
|
27
41
|
amount: {
|
|
@@ -37,6 +51,10 @@ var resolve = (p) => ({
|
|
|
37
51
|
color: p.color,
|
|
38
52
|
amount: p.amount ?? DEFAULT_AMOUNT
|
|
39
53
|
});
|
|
54
|
+
var validateTintParams = (params) => {
|
|
55
|
+
assertEffectParamsObject(params, "Tint");
|
|
56
|
+
assertRequiredColor(params.color, "color");
|
|
57
|
+
};
|
|
40
58
|
var tint = createEffect({
|
|
41
59
|
type: "remotion/tint",
|
|
42
60
|
label: "Tint",
|
|
@@ -67,7 +85,8 @@ var tint = createEffect({
|
|
|
67
85
|
cleanup: () => {
|
|
68
86
|
return;
|
|
69
87
|
},
|
|
70
|
-
schema: tintSchema
|
|
88
|
+
schema: tintSchema,
|
|
89
|
+
validateParams: validateTintParams
|
|
71
90
|
});
|
|
72
91
|
export {
|
|
73
92
|
tintSchema,
|
package/dist/esm/wave.mjs
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __returnValue = (v) => v;
|
|
3
|
-
function __exportSetter(name, newValue) {
|
|
4
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
-
}
|
|
6
2
|
var __export = (target, all) => {
|
|
7
3
|
for (var name in all)
|
|
8
4
|
__defProp(target, name, {
|
|
9
5
|
get: all[name],
|
|
10
6
|
enumerable: true,
|
|
11
7
|
configurable: true,
|
|
12
|
-
set:
|
|
8
|
+
set: (newValue) => all[name] = () => newValue
|
|
13
9
|
});
|
|
14
10
|
};
|
|
15
11
|
|
|
@@ -87,7 +83,8 @@ var wave = createEffect({
|
|
|
87
83
|
cleanup: () => {
|
|
88
84
|
return;
|
|
89
85
|
},
|
|
90
|
-
schema: waveSchema
|
|
86
|
+
schema: waveSchema,
|
|
87
|
+
validateParams: () => {}
|
|
91
88
|
});
|
|
92
89
|
export {
|
|
93
90
|
waveSchema,
|
package/dist/tint.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/effects",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.464",
|
|
4
4
|
"description": "Experimental presets for Remotion canvas effect hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"scripts": {
|
|
13
|
+
"test": "bun test src/test",
|
|
13
14
|
"formatting": "oxfmt src --check",
|
|
14
15
|
"format": "oxfmt src",
|
|
15
16
|
"lint": "eslint src",
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"remotion": "4.0.
|
|
27
|
+
"remotion": "4.0.464"
|
|
27
28
|
},
|
|
28
29
|
"exports": {
|
|
29
30
|
".": {
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
}
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
74
|
+
"@remotion/eslint-config-internal": "4.0.464",
|
|
74
75
|
"eslint": "9.19.0",
|
|
75
76
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
76
77
|
},
|