@remotion/effects 4.0.465 → 4.0.466

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,7 @@
1
+ export type GrayscaleParams = {
2
+ /** Mix between original color and grayscale. Defaults to `1`. */
3
+ readonly amount?: number;
4
+ };
5
+ export declare const grayscale: (params?: (GrayscaleParams & {
6
+ readonly disabled?: boolean | undefined;
7
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -1,3 +1,5 @@
1
+ declare const HALFTONE_SHAPES: readonly ["circle", "square", "line"];
2
+ declare const HALFTONE_SAMPLING: readonly ["bilinear", "nearest"];
1
3
  export declare const halftoneSchema: {
2
4
  readonly dotSize: {
3
5
  readonly type: "number";
@@ -45,9 +47,19 @@ export declare const halftoneSchema: {
45
47
  readonly default: "circle";
46
48
  readonly description: "Shape";
47
49
  };
50
+ readonly invert: {
51
+ readonly type: "boolean";
52
+ readonly default: false;
53
+ readonly description: "Invert";
54
+ };
55
+ readonly color: {
56
+ readonly type: "color";
57
+ readonly default: "black";
58
+ readonly description: "Color";
59
+ };
48
60
  };
49
- export type HalftoneShape = 'circle' | 'square' | 'line';
50
- export type HalftoneSampling = 'bilinear' | 'nearest';
61
+ export type HalftoneShape = (typeof HALFTONE_SHAPES)[number];
62
+ export type HalftoneSampling = (typeof HALFTONE_SAMPLING)[number];
51
63
  export type HalftoneParams = {
52
64
  readonly shape?: HalftoneShape;
53
65
  readonly dotSize?: number;
@@ -63,13 +75,13 @@ export type HalftoneParams = {
63
75
  /** Dot color. Defaults to black. */
64
76
  readonly color?: string;
65
77
  /**
66
- * When false (default), halftone follows luminance on opaque pixels (classic
67
- * halftone on your subject). When true, the same dot pattern fills transparent
68
- * and low-alpha areas instead—e.g. the canvas around a cut-out shape—while
69
- * leaving the opaque shape mostly free of those dots.
78
+ * When false (default), dark areas produce larger dots.
79
+ * When true, the pattern is inverted:
80
+ * bright and transparent areas produce larger dots instead.
70
81
  */
71
- readonly shadeOutside?: boolean;
82
+ readonly invert?: boolean;
72
83
  };
73
84
  export declare const halftone: (params?: (HalftoneParams & {
74
85
  readonly disabled?: boolean | undefined;
75
86
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
87
+ export {};
package/dist/hue.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export type HueParams = {
2
+ /** Hue rotation in degrees. Defaults to `0`. */
3
+ readonly degrees?: number;
4
+ };
5
+ export declare const hue: (params?: (HueParams & {
6
+ readonly disabled?: boolean | undefined;
7
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
package/dist/index.d.ts CHANGED
@@ -1,3 +1 @@
1
- export { EffectInternals } from './effect-internals.js';
2
- export { halftoneSchema, type HalftoneParams } from './halftone.js';
3
- export { tintSchema, type TintParams } from './tint.js';
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export type InvertParams = {
2
+ /** Mix between original color and inverted color. Defaults to `1`. */
3
+ readonly amount?: number;
4
+ };
5
+ export declare const invert: (params?: (InvertParams & {
6
+ readonly disabled?: boolean | undefined;
7
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,13 @@
1
+ import { type MirrorDirection } from './mirror-runtime.js';
2
+ export type { MirrorDirection };
3
+ export type MirrorParams = {
4
+ /** Mirror direction. Defaults to `horizontal`. */
5
+ readonly direction?: MirrorDirection;
6
+ /** Mirror position in UV coordinates. Defaults to `0.5`. */
7
+ readonly position?: number;
8
+ /** Mirror the other side of the image. Defaults to `false`. */
9
+ readonly invert?: boolean;
10
+ };
11
+ export declare const mirror: (params?: (MirrorParams & {
12
+ readonly disabled?: boolean | undefined;
13
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,26 @@
1
+ export type MirrorDirection = 'horizontal' | 'vertical';
2
+ export type MirrorState = {
3
+ gl: WebGL2RenderingContext;
4
+ program: WebGLProgram;
5
+ vao: WebGLVertexArrayObject;
6
+ vbo: WebGLBuffer;
7
+ textureSource: WebGLTexture;
8
+ uniforms: {
9
+ uSource: WebGLUniformLocation | null;
10
+ uPosition: WebGLUniformLocation | null;
11
+ uDirection: WebGLUniformLocation | null;
12
+ uInvert: WebGLUniformLocation | null;
13
+ };
14
+ };
15
+ export declare const setupMirror: (target: HTMLCanvasElement) => MirrorState;
16
+ export declare const cleanupMirror: (state: MirrorState) => void;
17
+ export declare const applyMirror: ({ state, source, width, height, position, direction, invert, flipSourceY, }: {
18
+ readonly state: MirrorState;
19
+ readonly source: CanvasImageSource;
20
+ readonly width: number;
21
+ readonly height: number;
22
+ readonly position: number;
23
+ readonly direction: MirrorDirection;
24
+ readonly invert: boolean;
25
+ readonly flipSourceY: boolean;
26
+ }) => void;
@@ -0,0 +1,2 @@
1
+ export declare const MIRROR_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 MIRROR_FS = "#version 300 es\nprecision highp float;\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform sampler2D uSource;\nuniform float uPosition;\nuniform int uDirection;\nuniform bool uInvert;\n\nvoid main() {\n\tvec2 srcUv = vUv;\n\tfloat coord = uDirection == 0 ? vUv.x : vUv.y;\n\tbool shouldMirror = uInvert ? coord < uPosition : coord > uPosition;\n\n\tif (shouldMirror) {\n\t\tfloat mirrored = 2.0 * uPosition - coord;\n\t\tif (uDirection == 0) {\n\t\t\tsrcUv.x = mirrored;\n\t\t} else {\n\t\t\tsrcUv.y = mirrored;\n\t\t}\n\t}\n\n\tfragColor = texture(uSource, clamp(srcUv, vec2(0.0), vec2(1.0)));\n}\n";
@@ -0,0 +1 @@
1
+ export { mirror, type MirrorDirection, type MirrorParams, } from './mirror/index.js';
@@ -0,0 +1,7 @@
1
+ export type SaturationParams = {
2
+ /** Saturation multiplier. `1` leaves colors unchanged, `0` makes them grayscale. Defaults to `1`. */
3
+ readonly amount?: number;
4
+ };
5
+ export declare const saturation: (params?: (SaturationParams & {
6
+ readonly disabled?: boolean | undefined;
7
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,11 @@
1
+ export type ScaleParams = {
2
+ /** Scale factor. Defaults to `1`. Must be greater than 0. */
3
+ readonly scale: number;
4
+ /** Whether to apply horizontal scaling. Defaults to `true`. */
5
+ readonly horizontal?: boolean;
6
+ /** Whether to apply vertical scaling. Defaults to `true`. */
7
+ readonly vertical?: boolean;
8
+ };
9
+ export declare const scale: (params: ScaleParams & {
10
+ readonly disabled?: boolean | undefined;
11
+ }) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1 @@
1
+ export { scale, type ScaleParams } from './scale/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/effects",
3
- "version": "4.0.465",
3
+ "version": "4.0.466",
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",
@@ -24,7 +24,7 @@
24
24
  "url": "https://github.com/remotion-dev/remotion/issues"
25
25
  },
26
26
  "dependencies": {
27
- "remotion": "4.0.465"
27
+ "remotion": "4.0.466"
28
28
  },
29
29
  "exports": {
30
30
  ".": {
@@ -32,11 +32,61 @@
32
32
  "module": "./dist/esm/index.mjs",
33
33
  "import": "./dist/esm/index.mjs"
34
34
  },
35
+ "./barrel-distortion": {
36
+ "types": "./dist/barrel-distortion.d.ts",
37
+ "module": "./dist/esm/barrel-distortion.mjs",
38
+ "import": "./dist/esm/barrel-distortion.mjs"
39
+ },
35
40
  "./blur": {
36
41
  "types": "./dist/blur.d.ts",
37
42
  "module": "./dist/esm/blur.mjs",
38
43
  "import": "./dist/esm/blur.mjs"
39
44
  },
45
+ "./brightness": {
46
+ "types": "./dist/brightness.d.ts",
47
+ "module": "./dist/esm/brightness.mjs",
48
+ "import": "./dist/esm/brightness.mjs"
49
+ },
50
+ "./halftone": {
51
+ "types": "./dist/halftone.d.ts",
52
+ "module": "./dist/esm/halftone.mjs",
53
+ "import": "./dist/esm/halftone.mjs"
54
+ },
55
+ "./grayscale": {
56
+ "types": "./dist/grayscale.d.ts",
57
+ "module": "./dist/esm/grayscale.mjs",
58
+ "import": "./dist/esm/grayscale.mjs"
59
+ },
60
+ "./hue": {
61
+ "types": "./dist/hue.d.ts",
62
+ "module": "./dist/esm/hue.mjs",
63
+ "import": "./dist/esm/hue.mjs"
64
+ },
65
+ "./invert": {
66
+ "types": "./dist/invert.d.ts",
67
+ "module": "./dist/esm/invert.mjs",
68
+ "import": "./dist/esm/invert.mjs"
69
+ },
70
+ "./mirror": {
71
+ "types": "./dist/mirror.d.ts",
72
+ "module": "./dist/esm/mirror.mjs",
73
+ "import": "./dist/esm/mirror.mjs"
74
+ },
75
+ "./saturation": {
76
+ "types": "./dist/saturation.d.ts",
77
+ "module": "./dist/esm/saturation.mjs",
78
+ "import": "./dist/esm/saturation.mjs"
79
+ },
80
+ "./scale": {
81
+ "types": "./dist/scale.d.ts",
82
+ "module": "./dist/esm/scale.mjs",
83
+ "import": "./dist/esm/scale.mjs"
84
+ },
85
+ "./tint": {
86
+ "types": "./dist/tint.d.ts",
87
+ "module": "./dist/esm/tint.mjs",
88
+ "import": "./dist/esm/tint.mjs"
89
+ },
40
90
  "./wave": {
41
91
  "types": "./dist/wave.d.ts",
42
92
  "module": "./dist/esm/wave.mjs",
@@ -46,9 +96,39 @@
46
96
  },
47
97
  "typesVersions": {
48
98
  ">=1.0": {
99
+ "barrel-distortion": [
100
+ "dist/barrel-distortion.d.ts"
101
+ ],
49
102
  "blur": [
50
103
  "dist/blur.d.ts"
51
104
  ],
105
+ "brightness": [
106
+ "dist/brightness.d.ts"
107
+ ],
108
+ "halftone": [
109
+ "dist/halftone.d.ts"
110
+ ],
111
+ "grayscale": [
112
+ "dist/grayscale.d.ts"
113
+ ],
114
+ "hue": [
115
+ "dist/hue.d.ts"
116
+ ],
117
+ "invert": [
118
+ "dist/invert.d.ts"
119
+ ],
120
+ "mirror": [
121
+ "dist/mirror.d.ts"
122
+ ],
123
+ "saturation": [
124
+ "dist/saturation.d.ts"
125
+ ],
126
+ "scale": [
127
+ "dist/scale.d.ts"
128
+ ],
129
+ "tint": [
130
+ "dist/tint.d.ts"
131
+ ],
52
132
  "wave": [
53
133
  "dist/wave.d.ts"
54
134
  ]
@@ -56,7 +136,7 @@
56
136
  },
57
137
  "homepage": "https://www.remotion.dev/docs/effects/api",
58
138
  "devDependencies": {
59
- "@remotion/eslint-config-internal": "4.0.465",
139
+ "@remotion/eslint-config-internal": "4.0.466",
60
140
  "eslint": "9.19.0",
61
141
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
62
142
  },