@remotion/effects 4.0.462 → 4.0.463

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.
@@ -1,4 +1,6 @@
1
1
  export type BlurParams = {
2
2
  readonly radius: number;
3
3
  };
4
- export declare const blur: (params: BlurParams) => import("remotion").EffectDescriptor<unknown>;
4
+ export declare const blur: (params: BlurParams & {
5
+ readonly disabled?: boolean | undefined;
6
+ }) => import("remotion").EffectDescriptor<unknown>;
@@ -1,4 +1,6 @@
1
1
  import * as blurExports from '../blur/index.js';
2
2
  export type { BlurParams } from '../blur/index.js';
3
- declare const blur: (params: blurExports.BlurParams) => import("remotion").EffectDescriptor<unknown>;
3
+ declare const blur: (params: blurExports.BlurParams & {
4
+ readonly disabled?: boolean | undefined;
5
+ }) => import("remotion").EffectDescriptor<unknown>;
4
6
  export { blur };
package/dist/esm/blur.mjs CHANGED
@@ -1,11 +1,15 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
2
6
  var __export = (target, all) => {
3
7
  for (var name in all)
4
8
  __defProp(target, name, {
5
9
  get: all[name],
6
10
  enumerable: true,
7
11
  configurable: true,
8
- set: (newValue) => all[name] = () => newValue
12
+ set: __exportSetter.bind(all, name)
9
13
  });
10
14
  };
11
15
 
@@ -1,11 +1,15 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
2
6
  var __export = (target, all) => {
3
7
  for (var name in all)
4
8
  __defProp(target, name, {
5
9
  get: all[name],
6
10
  enumerable: true,
7
11
  configurable: true,
8
- set: (newValue) => all[name] = () => newValue
12
+ set: __exportSetter.bind(all, name)
9
13
  });
10
14
  };
11
15
 
@@ -49,6 +53,16 @@ var halftoneSchema = {
49
53
  step: 1,
50
54
  default: 0,
51
55
  description: "Offset Y"
56
+ },
57
+ shape: {
58
+ type: "enum",
59
+ variants: {
60
+ circle: {},
61
+ square: {},
62
+ line: {}
63
+ },
64
+ default: "circle",
65
+ description: "Shape"
52
66
  }
53
67
  };
54
68
  var resolve = (p) => ({
package/dist/esm/tint.mjs CHANGED
@@ -1,11 +1,15 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
2
6
  var __export = (target, all) => {
3
7
  for (var name in all)
4
8
  __defProp(target, name, {
5
9
  get: all[name],
6
10
  enumerable: true,
7
11
  configurable: true,
8
- set: (newValue) => all[name] = () => newValue
12
+ set: __exportSetter.bind(all, name)
9
13
  });
10
14
  };
11
15
 
package/dist/esm/wave.mjs CHANGED
@@ -1,21 +1,61 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
2
6
  var __export = (target, all) => {
3
7
  for (var name in all)
4
8
  __defProp(target, name, {
5
9
  get: all[name],
6
10
  enumerable: true,
7
11
  configurable: true,
8
- set: (newValue) => all[name] = () => newValue
12
+ set: __exportSetter.bind(all, name)
9
13
  });
10
14
  };
11
15
 
12
16
  // src/wave.ts
13
17
  import { Internals } from "remotion";
14
18
  var { createEffect } = Internals;
19
+ var waveSchema = {
20
+ amplitude: {
21
+ type: "number",
22
+ min: 0,
23
+ max: 500,
24
+ step: 1,
25
+ default: 60,
26
+ description: "Amplitude"
27
+ },
28
+ wavelength: {
29
+ type: "number",
30
+ min: 1,
31
+ max: 2000,
32
+ step: 1,
33
+ default: 240,
34
+ description: "Wavelength"
35
+ },
36
+ evolution: {
37
+ type: "number",
38
+ default: 0,
39
+ description: "Evolution"
40
+ },
41
+ sliceWidth: {
42
+ type: "number",
43
+ min: 1,
44
+ max: 100,
45
+ step: 1,
46
+ default: 4,
47
+ description: "Slice width"
48
+ },
49
+ background: {
50
+ type: "color",
51
+ default: "transparent",
52
+ description: "Background"
53
+ }
54
+ };
15
55
  var resolve = (p) => ({
16
56
  amplitude: p.amplitude ?? 60,
17
57
  wavelength: p.wavelength ?? 240,
18
- speed: p.speed ?? 1 / 6,
58
+ evolution: p.evolution ?? 0,
19
59
  sliceWidth: p.sliceWidth ?? 4,
20
60
  background: p.background ?? "transparent"
21
61
  });
@@ -25,10 +65,10 @@ var wave = createEffect({
25
65
  backend: "2d",
26
66
  calculateKey: (params) => {
27
67
  const r = resolve(params);
28
- return `wave-${r.amplitude}-${r.wavelength}-${r.speed}-${r.sliceWidth}-${r.background}`;
68
+ return `wave-${r.amplitude}-${r.wavelength}-${r.evolution}-${r.sliceWidth}-${r.background}`;
29
69
  },
30
70
  setup: () => null,
31
- apply: ({ source, target, frame, width, height, params }) => {
71
+ apply: ({ source, target, width, height, params }) => {
32
72
  const ctx = target.getContext("2d");
33
73
  if (!ctx) {
34
74
  throw new Error("Failed to acquire 2D context for wave effect. The canvas may have been assigned a different context type.");
@@ -40,15 +80,16 @@ var wave = createEffect({
40
80
  ctx.fillRect(0, 0, width, height);
41
81
  }
42
82
  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;
83
+ const offset = Math.sin(x / r.wavelength * Math.PI * 2 + r.evolution) * r.amplitude;
44
84
  ctx.drawImage(source, x, 0, r.sliceWidth, height, x, offset, r.sliceWidth, height);
45
85
  }
46
86
  },
47
87
  cleanup: () => {
48
88
  return;
49
89
  },
50
- schema: null
90
+ schema: waveSchema
51
91
  });
52
92
  export {
93
+ waveSchema,
53
94
  wave
54
95
  };
@@ -35,6 +35,16 @@ export declare const halftoneSchema: {
35
35
  readonly default: 0;
36
36
  readonly description: "Offset Y";
37
37
  };
38
+ readonly shape: {
39
+ readonly type: "enum";
40
+ readonly variants: {
41
+ readonly circle: {};
42
+ readonly square: {};
43
+ readonly line: {};
44
+ };
45
+ readonly default: "circle";
46
+ readonly description: "Shape";
47
+ };
38
48
  };
39
49
  export type HalftoneShape = 'circle' | 'square' | 'line';
40
50
  export type HalftoneSampling = 'bilinear' | 'nearest';
@@ -60,4 +70,6 @@ export type HalftoneParams = {
60
70
  */
61
71
  readonly shadeOutside?: boolean;
62
72
  };
63
- export declare const halftone: (params?: HalftoneParams | undefined) => import("remotion").EffectDescriptor<unknown>;
73
+ export declare const halftone: (params?: (HalftoneParams & {
74
+ readonly disabled?: boolean | undefined;
75
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
package/dist/tint.d.ts CHANGED
@@ -17,4 +17,6 @@ export type TintParams = {
17
17
  readonly color: string;
18
18
  readonly amount?: number;
19
19
  };
20
- export declare const tint: (params: TintParams) => import("remotion").EffectDescriptor<unknown>;
20
+ export declare const tint: (params: TintParams & {
21
+ readonly disabled?: boolean | undefined;
22
+ }) => import("remotion").EffectDescriptor<unknown>;
package/dist/wave.d.ts CHANGED
@@ -1,8 +1,46 @@
1
+ export declare const waveSchema: {
2
+ readonly amplitude: {
3
+ readonly type: "number";
4
+ readonly min: 0;
5
+ readonly max: 500;
6
+ readonly step: 1;
7
+ readonly default: 60;
8
+ readonly description: "Amplitude";
9
+ };
10
+ readonly wavelength: {
11
+ readonly type: "number";
12
+ readonly min: 1;
13
+ readonly max: 2000;
14
+ readonly step: 1;
15
+ readonly default: 240;
16
+ readonly description: "Wavelength";
17
+ };
18
+ readonly evolution: {
19
+ readonly type: "number";
20
+ readonly default: 0;
21
+ readonly description: "Evolution";
22
+ };
23
+ readonly sliceWidth: {
24
+ readonly type: "number";
25
+ readonly min: 1;
26
+ readonly max: 100;
27
+ readonly step: 1;
28
+ readonly default: 4;
29
+ readonly description: "Slice width";
30
+ };
31
+ readonly background: {
32
+ readonly type: "color";
33
+ readonly default: "transparent";
34
+ readonly description: "Background";
35
+ };
36
+ };
1
37
  export type WaveParams = {
2
38
  readonly amplitude?: number;
3
39
  readonly wavelength?: number;
4
- readonly speed?: number;
40
+ readonly evolution?: number;
5
41
  readonly sliceWidth?: number;
6
42
  readonly background?: string;
7
43
  };
8
- export declare const wave: (params?: WaveParams | undefined) => import("remotion").EffectDescriptor<unknown>;
44
+ export declare const wave: (params?: (WaveParams & {
45
+ readonly disabled?: boolean | undefined;
46
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/effects",
3
- "version": "4.0.462",
3
+ "version": "4.0.463",
4
4
  "description": "Experimental presets for Remotion canvas effect hooks",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "url": "https://github.com/remotion-dev/remotion/issues"
24
24
  },
25
25
  "dependencies": {
26
- "remotion": "4.0.462"
26
+ "remotion": "4.0.463"
27
27
  },
28
28
  "exports": {
29
29
  ".": {
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "devDependencies": {
73
- "@remotion/eslint-config-internal": "4.0.462",
73
+ "@remotion/eslint-config-internal": "4.0.463",
74
74
  "eslint": "9.19.0",
75
75
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
76
76
  },
@@ -1,4 +0,0 @@
1
- export type BlurHorizontalParams = {
2
- readonly radius: number;
3
- };
4
- export declare const blurHorizontal: (params: BlurHorizontalParams) => import("remotion").EffectDescriptor<unknown>;
@@ -1,4 +0,0 @@
1
- export type BlurVerticalParams = {
2
- readonly radius: number;
3
- };
4
- export declare const blurVertical: (params: BlurVerticalParams) => import("remotion").EffectDescriptor<unknown>;