@remotion/effects 4.0.479 → 4.0.482
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/checkerboard.d.ts +75 -0
- package/dist/corner-pin/corner-pin-runtime.d.ts +27 -0
- package/dist/corner-pin/corner-pin-shaders.d.ts +2 -0
- package/dist/corner-pin/index.d.ts +14 -0
- package/dist/corner-pin.d.ts +1 -0
- package/dist/emboss.d.ts +76 -0
- package/dist/esm/blur.mjs +1 -1
- package/dist/esm/checkerboard.mjs +516 -0
- package/dist/esm/corner-pin.mjs +389 -0
- package/dist/esm/emboss.mjs +477 -0
- package/dist/esm/gridlines.mjs +577 -0
- package/dist/esm/index.mjs +1902 -676
- package/dist/esm/light-trail.mjs +519 -0
- package/dist/esm/pixelate.mjs +3 -3
- package/dist/esm/vignette.mjs +5 -10
- package/dist/esm/zoom-blur.mjs +419 -0
- package/dist/gridlines.d.ts +113 -0
- package/dist/index.d.ts +3 -0
- package/dist/light-trail/index.d.ts +19 -0
- package/dist/light-trail/light-trail-runtime.d.ts +38 -0
- package/dist/light-trail/light-trail-shaders.d.ts +2 -0
- package/dist/light-trail.d.ts +1 -0
- package/dist/visual-test/visual-utils.d.ts +4 -2
- package/dist/zoom-blur/index.d.ts +12 -0
- package/dist/zoom-blur/zoom-blur-runtime.d.ts +26 -0
- package/dist/zoom-blur/zoom-blur-shaders.d.ts +2 -0
- package/dist/zoom-blur.d.ts +1 -0
- package/package.json +51 -3
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const checkerboardSchema: {
|
|
2
|
+
readonly colors: {
|
|
3
|
+
readonly type: "array";
|
|
4
|
+
readonly item: {
|
|
5
|
+
readonly type: "color";
|
|
6
|
+
};
|
|
7
|
+
readonly default: readonly ["#dff4ff", "#7cc6ff"];
|
|
8
|
+
readonly minLength: 2;
|
|
9
|
+
readonly newItemDefault: "#ff0000";
|
|
10
|
+
readonly description: "Colors";
|
|
11
|
+
readonly keyframable: false;
|
|
12
|
+
};
|
|
13
|
+
readonly cellSize: {
|
|
14
|
+
readonly type: "number";
|
|
15
|
+
readonly min: 0.1;
|
|
16
|
+
readonly max: 800;
|
|
17
|
+
readonly step: 0.1;
|
|
18
|
+
readonly default: 80;
|
|
19
|
+
readonly description: "Cell size";
|
|
20
|
+
readonly hiddenFromList: false;
|
|
21
|
+
};
|
|
22
|
+
readonly gap: {
|
|
23
|
+
readonly type: "number";
|
|
24
|
+
readonly min: 0;
|
|
25
|
+
readonly max: 400;
|
|
26
|
+
readonly step: 0.1;
|
|
27
|
+
readonly default: 0;
|
|
28
|
+
readonly description: "Gap";
|
|
29
|
+
readonly hiddenFromList: false;
|
|
30
|
+
};
|
|
31
|
+
readonly angle: {
|
|
32
|
+
readonly type: "rotation-degrees";
|
|
33
|
+
readonly step: 1;
|
|
34
|
+
readonly default: 0;
|
|
35
|
+
readonly description: "Angle";
|
|
36
|
+
};
|
|
37
|
+
readonly offsetX: {
|
|
38
|
+
readonly type: "number";
|
|
39
|
+
readonly step: 0.1;
|
|
40
|
+
readonly default: 0;
|
|
41
|
+
readonly description: "Offset X";
|
|
42
|
+
readonly hiddenFromList: false;
|
|
43
|
+
};
|
|
44
|
+
readonly offsetY: {
|
|
45
|
+
readonly type: "number";
|
|
46
|
+
readonly step: 0.1;
|
|
47
|
+
readonly default: 0;
|
|
48
|
+
readonly description: "Offset Y";
|
|
49
|
+
readonly hiddenFromList: false;
|
|
50
|
+
};
|
|
51
|
+
readonly maskToSourceAlpha: {
|
|
52
|
+
readonly type: "boolean";
|
|
53
|
+
readonly default: false;
|
|
54
|
+
readonly description: "Mask to source alpha";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export type CheckerboardParams = {
|
|
58
|
+
/** Checker colors, assigned cyclically. Same semantics as lines(). */
|
|
59
|
+
readonly colors?: readonly string[];
|
|
60
|
+
/** Size of each square cell in pixels. */
|
|
61
|
+
readonly cellSize?: number;
|
|
62
|
+
/** Transparent gap in pixels between cells. Same as lines(). */
|
|
63
|
+
readonly gap?: number;
|
|
64
|
+
/** Rotates the full pattern in degrees. Same as lines(). */
|
|
65
|
+
readonly angle?: number;
|
|
66
|
+
/** Horizontal offset in pixels. Animate to scroll the cells. */
|
|
67
|
+
readonly offsetX?: number;
|
|
68
|
+
/** Vertical offset in pixels. Animate to scroll the cells. */
|
|
69
|
+
readonly offsetY?: number;
|
|
70
|
+
/** Masks the generated checkerboard pattern to the source alpha channel. Defaults to `false`. */
|
|
71
|
+
readonly maskToSourceAlpha?: boolean;
|
|
72
|
+
};
|
|
73
|
+
export declare const checkerboard: (params?: (CheckerboardParams & {
|
|
74
|
+
readonly disabled?: boolean | undefined;
|
|
75
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type CornerPinState = {
|
|
2
|
+
gl: WebGL2RenderingContext;
|
|
3
|
+
program: WebGLProgram;
|
|
4
|
+
vao: WebGLVertexArrayObject;
|
|
5
|
+
vbo: WebGLBuffer;
|
|
6
|
+
textureSource: WebGLTexture;
|
|
7
|
+
uniforms: {
|
|
8
|
+
uSource: WebGLUniformLocation | null;
|
|
9
|
+
uTopLeft: WebGLUniformLocation | null;
|
|
10
|
+
uTopRight: WebGLUniformLocation | null;
|
|
11
|
+
uBottomRight: WebGLUniformLocation | null;
|
|
12
|
+
uBottomLeft: WebGLUniformLocation | null;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const setupCornerPin: (target: HTMLCanvasElement) => CornerPinState;
|
|
16
|
+
export declare const cleanupCornerPin: (state: CornerPinState) => void;
|
|
17
|
+
export declare const applyCornerPin: ({ state, source, width, height, topLeft, topRight, bottomRight, bottomLeft, flipSourceY, }: {
|
|
18
|
+
readonly state: CornerPinState;
|
|
19
|
+
readonly source: CanvasImageSource;
|
|
20
|
+
readonly width: number;
|
|
21
|
+
readonly height: number;
|
|
22
|
+
readonly topLeft: readonly [number, number];
|
|
23
|
+
readonly topRight: readonly [number, number];
|
|
24
|
+
readonly bottomRight: readonly [number, number];
|
|
25
|
+
readonly bottomLeft: readonly [number, number];
|
|
26
|
+
readonly flipSourceY: boolean;
|
|
27
|
+
}) => void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const CORNER_PIN_VS = "#version 300 es\nlayout(location = 0) in vec2 aPos;\nlayout(location = 1) in vec2 aUv;\nout vec2 vUv;\n\nvoid main() {\n\tvUv = aUv;\n\tgl_Position = vec4(aPos, 0.0, 1.0);\n}\n";
|
|
2
|
+
export declare const CORNER_PIN_FS = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform sampler2D uSource;\nuniform vec2 uTopLeft;\nuniform vec2 uTopRight;\nuniform vec2 uBottomRight;\nuniform vec2 uBottomLeft;\n\nfloat cross2(vec2 a, vec2 b) {\n\treturn a.x * b.y - a.y * b.x;\n}\n\nbool solveBilinearInverse(vec2 p, out vec2 uv) {\n\tvec2 a = uBottomLeft;\n\tvec2 b = uBottomRight - uBottomLeft;\n\tvec2 c = uTopLeft - uBottomLeft;\n\tvec2 d = uBottomLeft - uBottomRight + uTopRight - uTopLeft;\n\tvec2 q = p - a;\n\n\tfloat linearDenominator = cross2(b, c);\n\tif (abs(cross2(b, d)) < 0.000001) {\n\t\tif (abs(linearDenominator) < 0.000001) {\n\t\t\treturn false;\n\t\t}\n\n\t\tuv.x = cross2(q, c) / linearDenominator;\n\t\tuv.y = cross2(q, b) / cross2(c, b);\n\t\treturn true;\n\t}\n\n\tfloat qa = -cross2(b, d);\n\tfloat qb = cross2(q, d) - cross2(b, c);\n\tfloat qc = cross2(q, c);\n\tfloat discriminant = qb * qb - 4.0 * qa * qc;\n\n\tif (discriminant < 0.0) {\n\t\treturn false;\n\t}\n\n\tfloat sqrtDiscriminant = sqrt(discriminant);\n\tfloat u1 = (-qb + sqrtDiscriminant) / (2.0 * qa);\n\tfloat u2 = (-qb - sqrtDiscriminant) / (2.0 * qa);\n\tfloat u = u1;\n\tif (u1 < -0.001 || u1 > 1.001) {\n\t\tu = u2;\n\t}\n\n\tvec2 denominator = c + d * u;\n\tfloat v = abs(denominator.x) > abs(denominator.y)\n\t\t? (q.x - b.x * u) / denominator.x\n\t\t: (q.y - b.y * u) / denominator.y;\n\n\tuv = vec2(u, v);\n\treturn true;\n}\n\nvoid main() {\n\tvec2 sourceUv;\n\tif (!solveBilinearInverse(vUv, sourceUv)) {\n\t\tfragColor = vec4(0.0);\n\t\treturn;\n\t}\n\n\tif (\n\t\tsourceUv.x < 0.0 ||\n\t\tsourceUv.x > 1.0 ||\n\t\tsourceUv.y < 0.0 ||\n\t\tsourceUv.y > 1.0\n\t) {\n\t\tfragColor = vec4(0.0);\n\t\treturn;\n\t}\n\n\tfragColor = texture(uSource, sourceUv);\n}\n";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CornerPinUvCoordinate = readonly [number, number];
|
|
2
|
+
export type CornerPinParams = {
|
|
3
|
+
/** Top-left output corner in UV coordinates. Defaults to `[0, 0]`. */
|
|
4
|
+
readonly topLeft?: CornerPinUvCoordinate;
|
|
5
|
+
/** Top-right output corner in UV coordinates. Defaults to `[1, 0]`. */
|
|
6
|
+
readonly topRight?: CornerPinUvCoordinate;
|
|
7
|
+
/** Bottom-right output corner in UV coordinates. Defaults to `[1, 1]`. */
|
|
8
|
+
readonly bottomRight?: CornerPinUvCoordinate;
|
|
9
|
+
/** Bottom-left output corner in UV coordinates. Defaults to `[0, 1]`. */
|
|
10
|
+
readonly bottomLeft?: CornerPinUvCoordinate;
|
|
11
|
+
};
|
|
12
|
+
export declare const cornerPin: (params?: (CornerPinParams & {
|
|
13
|
+
readonly disabled?: boolean | undefined;
|
|
14
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cornerPin, type CornerPinParams, type CornerPinUvCoordinate, } from './corner-pin/index.js';
|
package/dist/emboss.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare const embossSchema: {
|
|
2
|
+
readonly amount: {
|
|
3
|
+
readonly type: "number";
|
|
4
|
+
readonly min: 0;
|
|
5
|
+
readonly max: 1;
|
|
6
|
+
readonly step: 0.01;
|
|
7
|
+
readonly default: 0.7;
|
|
8
|
+
readonly description: "Amount";
|
|
9
|
+
readonly hiddenFromList: false;
|
|
10
|
+
};
|
|
11
|
+
readonly size: {
|
|
12
|
+
readonly type: "number";
|
|
13
|
+
readonly min: 1;
|
|
14
|
+
readonly max: 200;
|
|
15
|
+
readonly step: 1;
|
|
16
|
+
readonly default: 26;
|
|
17
|
+
readonly description: "Size";
|
|
18
|
+
readonly hiddenFromList: false;
|
|
19
|
+
};
|
|
20
|
+
readonly lineWidth: {
|
|
21
|
+
readonly type: "number";
|
|
22
|
+
readonly min: 0.1;
|
|
23
|
+
readonly max: 100;
|
|
24
|
+
readonly step: 0.1;
|
|
25
|
+
readonly default: 7;
|
|
26
|
+
readonly description: "Line width";
|
|
27
|
+
readonly hiddenFromList: false;
|
|
28
|
+
};
|
|
29
|
+
readonly depth: {
|
|
30
|
+
readonly type: "number";
|
|
31
|
+
readonly min: 0;
|
|
32
|
+
readonly max: 1;
|
|
33
|
+
readonly step: 0.01;
|
|
34
|
+
readonly default: 0.75;
|
|
35
|
+
readonly description: "Depth";
|
|
36
|
+
readonly hiddenFromList: false;
|
|
37
|
+
};
|
|
38
|
+
readonly angle: {
|
|
39
|
+
readonly type: "rotation-degrees";
|
|
40
|
+
readonly step: 1;
|
|
41
|
+
readonly default: 0;
|
|
42
|
+
readonly description: "Angle";
|
|
43
|
+
};
|
|
44
|
+
readonly lightAngle: {
|
|
45
|
+
readonly type: "rotation-degrees";
|
|
46
|
+
readonly step: 1;
|
|
47
|
+
readonly default: 135;
|
|
48
|
+
readonly description: "Light angle";
|
|
49
|
+
};
|
|
50
|
+
readonly offset: {
|
|
51
|
+
readonly type: "number";
|
|
52
|
+
readonly step: 0.1;
|
|
53
|
+
readonly default: 0;
|
|
54
|
+
readonly description: "Offset";
|
|
55
|
+
readonly hiddenFromList: false;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export type EmbossParams = {
|
|
59
|
+
/** Strength of the relief shading from `0` to `1`. Defaults to `0.7`. */
|
|
60
|
+
readonly amount?: number;
|
|
61
|
+
/** Size of the repeated relief cells in pixels. Defaults to `26`. */
|
|
62
|
+
readonly size?: number;
|
|
63
|
+
/** Width of each raised dash in pixels. Defaults to `7`. */
|
|
64
|
+
readonly lineWidth?: number;
|
|
65
|
+
/** Height of the virtual relief from `0` to `1`. Defaults to `0.75`. */
|
|
66
|
+
readonly depth?: number;
|
|
67
|
+
/** Rotates the repeated relief pattern in degrees. Defaults to `0`. */
|
|
68
|
+
readonly angle?: number;
|
|
69
|
+
/** Direction of the virtual light in degrees. Defaults to `135`. */
|
|
70
|
+
readonly lightAngle?: number;
|
|
71
|
+
/** Offset in pixels. Animate this value to scroll the relief pattern. Defaults to `0`. */
|
|
72
|
+
readonly offset?: number;
|
|
73
|
+
};
|
|
74
|
+
export declare const emboss: (params?: (EmbossParams & {
|
|
75
|
+
readonly disabled?: boolean | undefined;
|
|
76
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|