@remotion/effects 4.0.461 → 4.0.462
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/blur/blur-horizontal.d.ts +1 -2
- package/dist/blur/blur-runtime.d.ts +25 -7
- package/dist/blur/blur-shaders.d.ts +1 -1
- package/dist/blur/blur-vertical.d.ts +1 -2
- package/dist/blur/index.d.ts +1 -6
- package/dist/entrypoints/blur.d.ts +4 -0
- package/dist/esm/blur.mjs +330 -0
- package/dist/esm/halftone.mjs +341 -0
- package/dist/esm/index.mjs +1 -646
- package/dist/esm/tint.mjs +71 -0
- package/dist/esm/wave.mjs +54 -0
- package/dist/halftone.d.ts +1 -2
- package/dist/index.d.ts +1 -8
- package/dist/tint.d.ts +6 -2
- package/dist/wave.d.ts +1 -2
- package/package.json +39 -4
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, {
|
|
5
|
+
get: all[name],
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
set: (newValue) => all[name] = () => newValue
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// src/wave.ts
|
|
13
|
+
import { Internals } from "remotion";
|
|
14
|
+
var { createEffect } = Internals;
|
|
15
|
+
var resolve = (p) => ({
|
|
16
|
+
amplitude: p.amplitude ?? 60,
|
|
17
|
+
wavelength: p.wavelength ?? 240,
|
|
18
|
+
speed: p.speed ?? 1 / 6,
|
|
19
|
+
sliceWidth: p.sliceWidth ?? 4,
|
|
20
|
+
background: p.background ?? "transparent"
|
|
21
|
+
});
|
|
22
|
+
var wave = createEffect({
|
|
23
|
+
type: "remotion/wave",
|
|
24
|
+
label: "Wave",
|
|
25
|
+
backend: "2d",
|
|
26
|
+
calculateKey: (params) => {
|
|
27
|
+
const r = resolve(params);
|
|
28
|
+
return `wave-${r.amplitude}-${r.wavelength}-${r.speed}-${r.sliceWidth}-${r.background}`;
|
|
29
|
+
},
|
|
30
|
+
setup: () => null,
|
|
31
|
+
apply: ({ source, target, frame, width, height, params }) => {
|
|
32
|
+
const ctx = target.getContext("2d");
|
|
33
|
+
if (!ctx) {
|
|
34
|
+
throw new Error("Failed to acquire 2D context for wave effect. The canvas may have been assigned a different context type.");
|
|
35
|
+
}
|
|
36
|
+
const r = resolve(params);
|
|
37
|
+
ctx.clearRect(0, 0, width, height);
|
|
38
|
+
if (r.background !== "transparent") {
|
|
39
|
+
ctx.fillStyle = r.background;
|
|
40
|
+
ctx.fillRect(0, 0, width, height);
|
|
41
|
+
}
|
|
42
|
+
for (let x = 0;x < width; x += r.sliceWidth) {
|
|
43
|
+
const offset = Math.sin(x / r.wavelength * Math.PI * 2 + frame * r.speed) * r.amplitude;
|
|
44
|
+
ctx.drawImage(source, x, 0, r.sliceWidth, height, x, offset, r.sliceWidth, height);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
cleanup: () => {
|
|
48
|
+
return;
|
|
49
|
+
},
|
|
50
|
+
schema: null
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
wave
|
|
54
|
+
};
|
package/dist/halftone.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { EffectDescriptor } from 'remotion';
|
|
2
1
|
export declare const halftoneSchema: {
|
|
3
2
|
readonly dotSize: {
|
|
4
3
|
readonly type: "number";
|
|
@@ -61,4 +60,4 @@ export type HalftoneParams = {
|
|
|
61
60
|
*/
|
|
62
61
|
readonly shadeOutside?: boolean;
|
|
63
62
|
};
|
|
64
|
-
export declare const halftone: (params?: HalftoneParams) => EffectDescriptor<unknown>;
|
|
63
|
+
export declare const halftone: (params?: HalftoneParams | undefined) => import("remotion").EffectDescriptor<unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { BlurHorizontalParams, BlurParams, BlurVerticalParams, } from './blur/index.js';
|
|
3
|
-
export { halftone } from './halftone.js';
|
|
4
|
-
export type { HalftoneParams, HalftoneSampling, HalftoneShape, } from './halftone.js';
|
|
5
|
-
export { tint } from './tint.js';
|
|
6
|
-
export type { TintParams } from './tint.js';
|
|
7
|
-
export { wave } from './wave.js';
|
|
8
|
-
export type { WaveParams } from './wave.js';
|
|
1
|
+
export {};
|
package/dist/tint.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type { EffectDescriptor } from 'remotion';
|
|
2
1
|
export declare const tintSchema: {
|
|
2
|
+
readonly color: {
|
|
3
|
+
readonly type: "color";
|
|
4
|
+
readonly default: "#ff0000";
|
|
5
|
+
readonly description: "Color";
|
|
6
|
+
};
|
|
3
7
|
readonly amount: {
|
|
4
8
|
readonly type: "number";
|
|
5
9
|
readonly min: 0;
|
|
@@ -13,4 +17,4 @@ export type TintParams = {
|
|
|
13
17
|
readonly color: string;
|
|
14
18
|
readonly amount?: number;
|
|
15
19
|
};
|
|
16
|
-
export declare const tint: (params: TintParams) => EffectDescriptor<unknown>;
|
|
20
|
+
export declare const tint: (params: TintParams) => import("remotion").EffectDescriptor<unknown>;
|
package/dist/wave.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { EffectDescriptor } from 'remotion';
|
|
2
1
|
export type WaveParams = {
|
|
3
2
|
readonly amplitude?: number;
|
|
4
3
|
readonly wavelength?: number;
|
|
@@ -6,4 +5,4 @@ export type WaveParams = {
|
|
|
6
5
|
readonly sliceWidth?: number;
|
|
7
6
|
readonly background?: string;
|
|
8
7
|
};
|
|
9
|
-
export declare const wave: (params?: WaveParams) => EffectDescriptor<unknown>;
|
|
8
|
+
export declare const wave: (params?: WaveParams | undefined) => import("remotion").EffectDescriptor<unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/effects",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.462",
|
|
4
4
|
"description": "Experimental presets for Remotion canvas effect hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/effects"
|
|
10
10
|
},
|
|
11
|
-
"sideEffects": false,
|
|
12
11
|
"type": "module",
|
|
13
12
|
"scripts": {
|
|
14
13
|
"formatting": "oxfmt src --check",
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
25
24
|
},
|
|
26
25
|
"dependencies": {
|
|
27
|
-
"remotion": "4.0.
|
|
26
|
+
"remotion": "4.0.462"
|
|
28
27
|
},
|
|
29
28
|
"exports": {
|
|
30
29
|
".": {
|
|
@@ -32,10 +31,46 @@
|
|
|
32
31
|
"module": "./dist/esm/index.mjs",
|
|
33
32
|
"import": "./dist/esm/index.mjs"
|
|
34
33
|
},
|
|
34
|
+
"./halftone": {
|
|
35
|
+
"types": "./dist/halftone.d.ts",
|
|
36
|
+
"module": "./dist/esm/halftone.mjs",
|
|
37
|
+
"import": "./dist/esm/halftone.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./tint": {
|
|
40
|
+
"types": "./dist/tint.d.ts",
|
|
41
|
+
"module": "./dist/esm/tint.mjs",
|
|
42
|
+
"import": "./dist/esm/tint.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./wave": {
|
|
45
|
+
"types": "./dist/wave.d.ts",
|
|
46
|
+
"module": "./dist/esm/wave.mjs",
|
|
47
|
+
"import": "./dist/esm/wave.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./blur": {
|
|
50
|
+
"types": "./dist/entrypoints/blur.d.ts",
|
|
51
|
+
"module": "./dist/esm/blur.mjs",
|
|
52
|
+
"import": "./dist/esm/blur.mjs"
|
|
53
|
+
},
|
|
35
54
|
"./package.json": "./package.json"
|
|
36
55
|
},
|
|
56
|
+
"typesVersions": {
|
|
57
|
+
">=1.0": {
|
|
58
|
+
"halftone": [
|
|
59
|
+
"dist/halftone.d.ts"
|
|
60
|
+
],
|
|
61
|
+
"tint": [
|
|
62
|
+
"dist/tint.d.ts"
|
|
63
|
+
],
|
|
64
|
+
"wave": [
|
|
65
|
+
"dist/wave.d.ts"
|
|
66
|
+
],
|
|
67
|
+
"blur": [
|
|
68
|
+
"dist/entrypoints/blur.d.ts"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
37
72
|
"devDependencies": {
|
|
38
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
73
|
+
"@remotion/eslint-config-internal": "4.0.462",
|
|
39
74
|
"eslint": "9.19.0",
|
|
40
75
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
41
76
|
},
|