@remotion/effects 4.0.536 → 4.0.538

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.
Files changed (113) hide show
  1. package/THIRD_PARTY_LICENSES.md +30 -0
  2. package/dist/barrel-distortion/index.d.ts +1 -1
  3. package/dist/bevel-alpha/index.d.ts +13 -0
  4. package/dist/bevel-alpha/shaders.d.ts +3 -0
  5. package/dist/bevel-alpha.d.ts +1 -0
  6. package/dist/blur/index.d.ts +1 -1
  7. package/dist/brightness.d.ts +1 -1
  8. package/dist/burlap.d.ts +1 -1
  9. package/dist/checkerboard.d.ts +17 -17
  10. package/dist/chromatic-aberration/index.d.ts +1 -1
  11. package/dist/color-correction.d.ts +1 -1
  12. package/dist/color-key.d.ts +9 -9
  13. package/dist/color-utils.d.ts +8 -8
  14. package/dist/contour-lines.d.ts +23 -23
  15. package/dist/contrast.d.ts +1 -1
  16. package/dist/corner-pin/index.d.ts +1 -1
  17. package/dist/cylinder/index.d.ts +20 -0
  18. package/dist/cylinder/shader.d.ts +1 -0
  19. package/dist/cylinder.d.ts +1 -0
  20. package/dist/dot-grid.d.ts +7 -7
  21. package/dist/drop-shadow/index.d.ts +1 -1
  22. package/dist/duotone.d.ts +7 -7
  23. package/dist/emboss.d.ts +15 -15
  24. package/dist/esm/bevel-alpha.mjs +474 -0
  25. package/dist/esm/cylinder.mjs +390 -0
  26. package/dist/esm/fractal-noise.mjs +688 -0
  27. package/dist/esm/lens-blur.mjs +550 -0
  28. package/dist/esm/long-shadows.mjs +410 -0
  29. package/dist/esm/page-turn.mjs +405 -0
  30. package/dist/esm/sphere.mjs +376 -0
  31. package/dist/esm/turbulent-displace.mjs +652 -0
  32. package/dist/evolve.d.ts +8 -8
  33. package/dist/exposure.d.ts +1 -1
  34. package/dist/fisheye/index.d.ts +1 -1
  35. package/dist/flannel.d.ts +1 -1
  36. package/dist/fractal-noise/index.d.ts +40 -0
  37. package/dist/fractal-noise/shader.d.ts +1 -0
  38. package/dist/fractal-noise.d.ts +1 -0
  39. package/dist/gaussian-blur-shader.d.ts +1 -1
  40. package/dist/glow/index.d.ts +1 -1
  41. package/dist/grayscale.d.ts +1 -1
  42. package/dist/gridlines.d.ts +23 -23
  43. package/dist/halftone-linear-gradient.d.ts +21 -21
  44. package/dist/halftone.d.ts +25 -25
  45. package/dist/hue.d.ts +1 -1
  46. package/dist/invert.d.ts +1 -1
  47. package/dist/lens-blur/index.d.ts +30 -0
  48. package/dist/lens-blur/shader.d.ts +1 -0
  49. package/dist/lens-blur.d.ts +1 -0
  50. package/dist/levels.d.ts +1 -1
  51. package/dist/light-leak.d.ts +7 -7
  52. package/dist/light-trail/index.d.ts +1 -1
  53. package/dist/linear-gradient-tint.d.ts +1 -1
  54. package/dist/linear-gradient.d.ts +1 -1
  55. package/dist/linear-progressive-blur/index.d.ts +1 -1
  56. package/dist/linear-progressive-blur/linear-progressive-blur-shaders.d.ts +1 -1
  57. package/dist/linear-progressive-pixelate/index.d.ts +1 -1
  58. package/dist/lines.d.ts +18 -18
  59. package/dist/liquid-contours.d.ts +21 -21
  60. package/dist/long-shadows.d.ts +13 -0
  61. package/dist/lut/index.d.ts +3 -3
  62. package/dist/mirror/index.d.ts +1 -1
  63. package/dist/noise-displacement.d.ts +1 -1
  64. package/dist/noise.d.ts +1 -1
  65. package/dist/outline/polygonize-alpha.d.ts +1 -1
  66. package/dist/outline.d.ts +11 -11
  67. package/dist/page-turn/index.d.ts +20 -0
  68. package/dist/page-turn/shader.d.ts +1 -0
  69. package/dist/page-turn.d.ts +1 -0
  70. package/dist/paper.d.ts +1 -1
  71. package/dist/pattern.d.ts +1 -1
  72. package/dist/pixel-dissolve.d.ts +1 -1
  73. package/dist/pixelate.d.ts +1 -1
  74. package/dist/radial-progressive-blur/index.d.ts +1 -1
  75. package/dist/radial-progressive-blur/radial-progressive-blur-shaders.d.ts +1 -1
  76. package/dist/radial-progressive-pixelate/index.d.ts +1 -1
  77. package/dist/region-blur/index.d.ts +11 -11
  78. package/dist/rings.d.ts +15 -15
  79. package/dist/roughen-edges.d.ts +1 -1
  80. package/dist/saturation.d.ts +1 -1
  81. package/dist/scale/index.d.ts +1 -1
  82. package/dist/scanlines.d.ts +1 -1
  83. package/dist/shadows-highlights.d.ts +1 -1
  84. package/dist/shine.d.ts +1 -1
  85. package/dist/shrinkwrap.d.ts +1 -1
  86. package/dist/skew.d.ts +1 -1
  87. package/dist/speckle.d.ts +1 -1
  88. package/dist/sphere/index.d.ts +18 -0
  89. package/dist/sphere/shader.d.ts +1 -0
  90. package/dist/sphere.d.ts +1 -0
  91. package/dist/starburst.d.ts +13 -13
  92. package/dist/tear.d.ts +1 -1
  93. package/dist/thermal-vision.d.ts +7 -7
  94. package/dist/tile.d.ts +1 -1
  95. package/dist/tint.d.ts +5 -5
  96. package/dist/translate/index.d.ts +2 -2
  97. package/dist/turbulent-displace/index.d.ts +28 -0
  98. package/dist/turbulent-displace/shader.d.ts +1 -0
  99. package/dist/turbulent-displace.d.ts +1 -0
  100. package/dist/tv-signal-off.d.ts +1 -1
  101. package/dist/value-noise-shader.d.ts +1 -0
  102. package/dist/venetian-blinds.d.ts +8 -8
  103. package/dist/vibrance.d.ts +1 -1
  104. package/dist/vignette.d.ts +16 -16
  105. package/dist/visual-test/visual-utils.d.ts +8 -8
  106. package/dist/wave/index.d.ts +1 -1
  107. package/dist/waves.d.ts +24 -24
  108. package/dist/webgpu-projection-runtime.d.ts +24 -0
  109. package/dist/white-balance.d.ts +1 -1
  110. package/dist/white-noise.d.ts +1 -1
  111. package/dist/zigzag.d.ts +22 -22
  112. package/dist/zoom-blur/index.d.ts +1 -1
  113. package/package.json +71 -6
@@ -1,49 +1,49 @@
1
1
  export declare const starburstEffectSchema: {
2
2
  readonly rays: {
3
- readonly type: "number";
3
+ readonly type: 'number';
4
4
  readonly min: 2;
5
5
  readonly max: 100;
6
6
  readonly step: 1;
7
7
  readonly default: undefined;
8
- readonly description: "Number of Rays";
8
+ readonly description: 'Number of Rays';
9
9
  readonly hiddenFromList: false;
10
10
  };
11
11
  readonly colors: {
12
- readonly type: "array";
12
+ readonly type: 'array';
13
13
  readonly item: {
14
- readonly type: "color";
14
+ readonly type: 'color';
15
15
  };
16
16
  readonly default: undefined;
17
17
  readonly minLength: 2;
18
- readonly newItemDefault: "#ff0000";
19
- readonly description: "Colors";
18
+ readonly newItemDefault: '#ff0000';
19
+ readonly description: 'Colors';
20
20
  readonly keyframable: false;
21
21
  };
22
22
  readonly rotation: {
23
- readonly type: "number";
23
+ readonly type: 'number';
24
24
  readonly min: 0;
25
25
  readonly max: 360;
26
26
  readonly step: 1;
27
27
  readonly default: 0;
28
- readonly description: "Rotation";
28
+ readonly description: 'Rotation';
29
29
  readonly hiddenFromList: false;
30
30
  };
31
31
  readonly smoothness: {
32
- readonly type: "number";
32
+ readonly type: 'number';
33
33
  readonly min: 0;
34
34
  readonly max: 1;
35
35
  readonly step: 0.01;
36
36
  readonly default: 0;
37
- readonly description: "Edge Smoothness";
37
+ readonly description: 'Edge Smoothness';
38
38
  readonly hiddenFromList: false;
39
39
  };
40
40
  readonly origin: {
41
- readonly type: "uv-coordinate";
41
+ readonly type: 'uv-coordinate';
42
42
  readonly min: 0;
43
43
  readonly max: 1;
44
44
  readonly step: 0.01;
45
45
  readonly default: readonly [0.5, 0.5];
46
- readonly description: "Origin";
46
+ readonly description: 'Origin';
47
47
  };
48
48
  };
49
49
  export type StarburstOrigin = readonly [number, number];
@@ -55,5 +55,5 @@ export type StarburstEffectParams = {
55
55
  readonly origin?: StarburstOrigin;
56
56
  };
57
57
  export declare const starburst: (params: StarburstEffectParams & {
58
- readonly disabled?: boolean | undefined;
58
+ readonly disabled?: boolean;
59
59
  }) => import("remotion").EffectDescriptor<unknown>;
package/dist/tear.d.ts CHANGED
@@ -9,5 +9,5 @@ export type TearParams = {
9
9
  readonly jaggedness?: number;
10
10
  };
11
11
  export declare const tear: (params?: (TearParams & {
12
- readonly disabled?: boolean | undefined;
12
+ readonly disabled?: boolean;
13
13
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -1,22 +1,22 @@
1
1
  export declare const thermalVisionSchema: {
2
2
  readonly amount: {
3
- readonly type: "number";
3
+ readonly type: 'number';
4
4
  readonly min: 0;
5
5
  readonly max: 1;
6
6
  readonly step: 0.01;
7
7
  readonly default: 1;
8
- readonly description: "Amount";
8
+ readonly description: 'Amount';
9
9
  readonly hiddenFromList: false;
10
10
  };
11
11
  readonly palette: {
12
- readonly type: "array";
12
+ readonly type: 'array';
13
13
  readonly item: {
14
- readonly type: "color";
14
+ readonly type: 'color';
15
15
  };
16
16
  readonly default: readonly ["#020617", "#1238ff", "#00a6ff", "#00c853", "#d6f542", "#ffb000", "#ff2f00", "#ffffff"];
17
17
  readonly minLength: 2;
18
- readonly newItemDefault: "#00c853";
19
- readonly description: "Palette";
18
+ readonly newItemDefault: '#00c853';
19
+ readonly description: 'Palette';
20
20
  readonly keyframable: false;
21
21
  };
22
22
  };
@@ -27,5 +27,5 @@ export type ThermalVisionParams = {
27
27
  readonly palette?: readonly string[];
28
28
  };
29
29
  export declare const thermalVision: (params?: (ThermalVisionParams & {
30
- readonly disabled?: boolean | undefined;
30
+ readonly disabled?: boolean;
31
31
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
package/dist/tile.d.ts CHANGED
@@ -5,5 +5,5 @@ export type TileParams = {
5
5
  readonly vertical?: boolean;
6
6
  };
7
7
  export declare const tile: (params?: (TileParams & {
8
- readonly disabled?: boolean | undefined;
8
+ readonly disabled?: boolean;
9
9
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
package/dist/tint.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  export declare const tintSchema: {
2
2
  readonly color: {
3
- readonly type: "color";
3
+ readonly type: 'color';
4
4
  readonly default: undefined;
5
- readonly description: "Color";
5
+ readonly description: 'Color';
6
6
  };
7
7
  readonly amount: {
8
- readonly type: "number";
8
+ readonly type: 'number';
9
9
  readonly min: 0;
10
10
  readonly max: 1;
11
11
  readonly step: 0.01;
12
12
  readonly default: 0.5;
13
- readonly description: "Amount";
13
+ readonly description: 'Amount';
14
14
  readonly hiddenFromList: false;
15
15
  };
16
16
  };
@@ -19,5 +19,5 @@ export type TintParams = {
19
19
  readonly amount?: number;
20
20
  };
21
21
  export declare const tint: (params: TintParams & {
22
- readonly disabled?: boolean | undefined;
22
+ readonly disabled?: boolean;
23
23
  }) => import("remotion").EffectDescriptor<unknown>;
@@ -11,8 +11,8 @@ export type UvTranslateParams = {
11
11
  readonly v?: number;
12
12
  };
13
13
  export declare const xyTranslate: (params?: (XyTranslateParams & {
14
- readonly disabled?: boolean | undefined;
14
+ readonly disabled?: boolean;
15
15
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
16
16
  export declare const uvTranslate: (params?: (UvTranslateParams & {
17
- readonly disabled?: boolean | undefined;
17
+ readonly disabled?: boolean;
18
18
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,28 @@
1
+ declare const DISPLACEMENT_MODES: readonly ['turbulent', 'bulge', 'twist', 'turbulent-smoother', 'bulge-smoother', 'twist-smoother', 'vertical', 'horizontal', 'cross'];
2
+ declare const PINNING_MODES: readonly ['none', 'all', 'horizontal', 'vertical', 'left', 'top', 'right', 'bottom', 'all-locked', 'horizontal-locked', 'vertical-locked', 'left-locked', 'top-locked', 'right-locked', 'bottom-locked'];
3
+ export type TurbulentDisplaceParams = {
4
+ /** Distortion mode. Defaults to `turbulent`. */
5
+ readonly displacement?: (typeof DISPLACEMENT_MODES)[number];
6
+ /** Displacement strength in pixels. May be negative. Defaults to `50`. */
7
+ readonly amount?: number;
8
+ /** Size of the noise features in pixels. Must be at least `1`. Defaults to `100`. */
9
+ readonly size?: number;
10
+ /** Noise origin in UV coordinates. Defaults to `[0.5, 0.5]`. */
11
+ readonly offset?: readonly [number, number];
12
+ /** Number of noise layers, including fractional layers, from `1` to `10`. Defaults to `1`. */
13
+ readonly complexity?: number;
14
+ /** Noise evolution in degrees. Animate to morph the distortion. Defaults to `0`. */
15
+ readonly evolution?: number;
16
+ /** Loop the evolution after `cycle` revolutions. Defaults to `false`. */
17
+ readonly cycleEvolution?: boolean;
18
+ /** Loop length in whole revolutions. Defaults to `1`. */
19
+ readonly cycle?: number;
20
+ /** Unsigned 32-bit integer seed for repeatable distortion. Defaults to `0`. */
21
+ readonly seed?: number;
22
+ /** Edges kept in place. Locked modes also keep samples inside the source. Defaults to `all`. */
23
+ readonly pinning?: (typeof PINNING_MODES)[number];
24
+ };
25
+ export declare const turbulentDisplace: (params?: (TurbulentDisplaceParams & {
26
+ readonly disabled?: boolean;
27
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
28
+ export {};
@@ -0,0 +1 @@
1
+ export declare const TURBULENT_DISPLACE_FRAGMENT_SHADER = "#version 300 es\nprecision highp float;\nprecision highp int;\n\nin vec2 vUv;\nout vec4 fragColor;\nuniform sampler2D uSource;\nuniform vec2 uResolution;\nuniform float uAmount;\nuniform float uSize;\nuniform vec2 uOffset;\nuniform float uComplexity;\nuniform float uEvolution;\nuniform bool uCycleEvolution;\nuniform float uCycle;\nuniform uint uSeed;\nuniform int uDisplacement;\nuniform int uPinning;\nconst int uNoiseType = 2;\n\n\nfloat lattice(ivec3 point, uint seed) {\n // Wrap lattice indices as well as coordinates so interpolation stays continuous\n // across the period boundary, including negative coordinates.\n uvec3 p = uvec3(point) & uvec3(65535u);\n uint h = p.x * 0x27d4eb2du ^ p.y * 0x165667b1u ^ p.z * 0x9e3779b9u ^ seed * 0x85ebca6bu;\n h ^= h >> 15;\n h *= 0x2c1b3c6du;\n h ^= h >> 12;\n h *= 0x297a2d39u;\n h ^= h >> 15;\n return float(h & 65535u) / 65535.0;\n}\n\nfloat catmull(vec4 p, float t) {\n return 0.5 * (2.0 * p.y + (p.z - p.x) * t\n + (2.0 * p.x - 5.0 * p.y + 4.0 * p.z - p.w) * t * t\n + (3.0 * p.y - p.x - 3.0 * p.z + p.w) * t * t * t);\n}\n\nvec3 bspline(float t) {\n return vec3(0.5 * (1.0-t) * (1.0-t), 0.5 + t * (1.0-t), 0.5 * t * t);\n}\n\nfloat sliceNoise(ivec3 p, vec2 t, uint seed) {\n if (uNoiseType == 0) return lattice(p, seed);\n if (uNoiseType == 1) {\n return mix(mix(lattice(p, seed), lattice(p + ivec3(1,0,0), seed), t.x),\n mix(lattice(p + ivec3(0,1,0), seed), lattice(p + ivec3(1,1,0), seed), t.x), t.y);\n }\n if (uNoiseType == 2) {\n vec3 wx = bspline(t.x);\n vec3 wy = bspline(t.y);\n float result = 0.0;\n for (int y = 0; y < 3; y++) {\n for (int x = 0; x < 3; x++) {\n result += wx[x] * wy[y] * lattice(p + ivec3(x-1, y-1, 0), seed);\n }\n }\n return result;\n }\n vec4 rows;\n for (int y = 0; y < 4; y++) {\n vec4 row;\n for (int x = 0; x < 4; x++) {\n row[x] = lattice(p + ivec3(x-1, y-1, 0), seed);\n }\n rows[y] = catmull(row, t.x);\n }\n return catmull(rows, t.y);\n}\n\nfloat valueNoise(vec3 point, uint seed) {\n // A large period keeps conversion to integer coordinates defined at extreme scales.\n vec3 p = mod(point + vec3(uNoiseType == 2 ? 0.5 : 0.0, uNoiseType == 2 ? 0.5 : 0.0, 0.0), 65536.0);\n ivec3 cell = ivec3(floor(p));\n vec3 t = fract(p);\n float fz = t.z * t.z * t.z * (t.z * (t.z * 6.0 - 15.0) + 10.0);\n float n = mix(sliceNoise(cell, t.xy, seed), sliceNoise(cell + ivec3(0,0,1), t.xy, seed), fz);\n return uNoiseType == 2 ? 0.5 + (n - 0.5) * (181.0 / 231.0) / 0.55 : n;\n}\n\n\nfloat noiseLayer(vec2 p, float z, uint seed) {\n if (!uCycleEvolution) return valueNoise(vec3(p, uEvolution + z), seed);\n float t = mod(uEvolution, uCycle);\n // Zero blend derivatives at the seam keep the looping motion smooth.\n float weight = smoothstep(0.0, 1.0, t / uCycle);\n return mix(valueNoise(vec3(p, t + z), seed), valueNoise(vec3(p, t - uCycle + z), seed), weight);\n}\n\nfloat turbulence(vec2 p, uint channel) {\n float sum = 0.0;\n float norm = 0.0;\n float amplitude = 1.0;\n float frequency = 1.0;\n float falloff = uDisplacement >= 3 && uDisplacement <= 5 ? 0.3 : 0.5;\n for (int octave = 0; octave < 10; octave++) {\n float weight = clamp(uComplexity - float(octave), 0.0, 1.0);\n if (weight == 0.0) break;\n uint seed = (uSeed ^ 0x7d15u) + channel + uint(octave) * 101u;\n sum += noiseLayer(p * frequency, float(octave) * 5.17, seed) * amplitude * weight;\n norm += amplitude * weight;\n amplitude *= falloff;\n frequency *= 2.0;\n }\n return sum / norm - 0.5;\n}\n\nvec4 readPixel(ivec2 p) {\n if (any(lessThan(p, ivec2(0))) || any(greaterThanEqual(p, ivec2(uResolution)))) return vec4(0.0);\n return texelFetch(uSource, ivec2(p.x, int(uResolution.y) - 1 - p.y), 0);\n}\n\nvec4 sampleSource(vec2 p) {\n // Bilinear interpolation with transparent samples outside the source, so\n // warped alpha edges do not smear the outermost pixel across the canvas.\n ivec2 base = ivec2(floor(p - 0.5));\n vec2 t = fract(p - 0.5);\n return mix(mix(readPixel(base), readPixel(base + ivec2(1,0)), t.x),\n mix(readPixel(base + ivec2(0,1)), readPixel(base + ivec2(1,1)), t.x), t.y);\n}\n\nvoid main() {\n if (uAmount == 0.0) {\n fragColor = texture(uSource, vUv);\n return;\n }\n vec2 pixel = vec2(vUv.x, 1.0 - vUv.y) * uResolution;\n vec2 p = (pixel - uOffset * uResolution) / uSize;\n vec2 displacement;\n if (uDisplacement == 1 || uDisplacement == 2 || uDisplacement == 4 || uDisplacement == 5) {\n float epsilon = 0.05;\n vec2 gradient = vec2(\n turbulence(p + vec2(epsilon,0), 0u) - turbulence(p - vec2(epsilon,0), 0u),\n turbulence(p + vec2(0,epsilon), 0u) - turbulence(p - vec2(0,epsilon), 0u)\n ) / (2.0 * epsilon);\n displacement = (uDisplacement == 1 || uDisplacement == 4) ? gradient : vec2(-gradient.y, gradient.x);\n displacement *= uAmount * 0.25;\n } else if (uDisplacement == 6) {\n displacement = vec2(0.0, turbulence(p, 17u) * uAmount);\n } else if (uDisplacement == 7) {\n displacement = vec2(turbulence(p, 0u) * uAmount, 0.0);\n } else if (uDisplacement == 8) {\n displacement = vec2(turbulence(p, 0u) * uAmount);\n } else {\n displacement = vec2(turbulence(p, 0u), turbulence(p, 17u)) * uAmount;\n }\n bool locked = uPinning >= 8;\n int pin = locked ? uPinning - 7 : uPinning;\n float edge = max(1.0, min(uResolution.x, uResolution.y) * (locked ? 0.25 : 0.1));\n vec2 nearEdge = clamp((pixel - 0.5) / edge, 0.0, 1.0);\n vec2 farEdge = clamp((uResolution - 0.5 - pixel) / edge, 0.0, 1.0);\n float horizontal = min(nearEdge.x, farEdge.x);\n float vertical = min(nearEdge.y, farEdge.y);\n float weight = 1.0;\n if (pin == 1) weight = min(horizontal, vertical);\n if (pin == 2) weight = vertical;\n if (pin == 3) weight = horizontal;\n if (pin == 4) weight = nearEdge.x;\n if (pin == 5) weight = nearEdge.y;\n if (pin == 6) weight = farEdge.x;\n if (pin == 7) weight = farEdge.y;\n vec2 sourcePixel = pixel + displacement * weight;\n if (locked) sourcePixel = clamp(sourcePixel, vec2(0.5), uResolution - 0.5);\n fragColor = sampleSource(sourcePixel);\n}\n";
@@ -0,0 +1 @@
1
+ export { turbulentDisplace, type TurbulentDisplaceParams, } from './turbulent-displace/index.js';
@@ -3,5 +3,5 @@ export type TvSignalOffParams = {
3
3
  readonly amount?: number;
4
4
  };
5
5
  export declare const tvSignalOff: (params?: (TvSignalOffParams & {
6
- readonly disabled?: boolean | undefined;
6
+ readonly disabled?: boolean;
7
7
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1 @@
1
+ export declare const VALUE_NOISE_SHADER = "\nfloat lattice(ivec3 point, uint seed) {\n // Wrap lattice indices as well as coordinates so interpolation stays continuous\n // across the period boundary, including negative coordinates.\n uvec3 p = uvec3(point) & uvec3(65535u);\n uint h = p.x * 0x27d4eb2du ^ p.y * 0x165667b1u ^ p.z * 0x9e3779b9u ^ seed * 0x85ebca6bu;\n h ^= h >> 15;\n h *= 0x2c1b3c6du;\n h ^= h >> 12;\n h *= 0x297a2d39u;\n h ^= h >> 15;\n return float(h & 65535u) / 65535.0;\n}\n\nfloat catmull(vec4 p, float t) {\n return 0.5 * (2.0 * p.y + (p.z - p.x) * t\n + (2.0 * p.x - 5.0 * p.y + 4.0 * p.z - p.w) * t * t\n + (3.0 * p.y - p.x - 3.0 * p.z + p.w) * t * t * t);\n}\n\nvec3 bspline(float t) {\n return vec3(0.5 * (1.0-t) * (1.0-t), 0.5 + t * (1.0-t), 0.5 * t * t);\n}\n\nfloat sliceNoise(ivec3 p, vec2 t, uint seed) {\n if (uNoiseType == 0) return lattice(p, seed);\n if (uNoiseType == 1) {\n return mix(mix(lattice(p, seed), lattice(p + ivec3(1,0,0), seed), t.x),\n mix(lattice(p + ivec3(0,1,0), seed), lattice(p + ivec3(1,1,0), seed), t.x), t.y);\n }\n if (uNoiseType == 2) {\n vec3 wx = bspline(t.x);\n vec3 wy = bspline(t.y);\n float result = 0.0;\n for (int y = 0; y < 3; y++) {\n for (int x = 0; x < 3; x++) {\n result += wx[x] * wy[y] * lattice(p + ivec3(x-1, y-1, 0), seed);\n }\n }\n return result;\n }\n vec4 rows;\n for (int y = 0; y < 4; y++) {\n vec4 row;\n for (int x = 0; x < 4; x++) {\n row[x] = lattice(p + ivec3(x-1, y-1, 0), seed);\n }\n rows[y] = catmull(row, t.x);\n }\n return catmull(rows, t.y);\n}\n\nfloat valueNoise(vec3 point, uint seed) {\n // A large period keeps conversion to integer coordinates defined at extreme scales.\n vec3 p = mod(point + vec3(uNoiseType == 2 ? 0.5 : 0.0, uNoiseType == 2 ? 0.5 : 0.0, 0.0), 65536.0);\n ivec3 cell = ivec3(floor(p));\n vec3 t = fract(p);\n float fz = t.z * t.z * t.z * (t.z * (t.z * 6.0 - 15.0) + 10.0);\n float n = mix(sliceNoise(cell, t.xy, seed), sliceNoise(cell + ivec3(0,0,1), t.xy, seed), fz);\n return uNoiseType == 2 ? 0.5 + (n - 0.5) * (181.0 / 231.0) / 0.55 : n;\n}\n";
@@ -1,32 +1,32 @@
1
- declare const VENETIAN_BLINDS_DIRECTIONS: readonly ["vertical", "horizontal"];
1
+ declare const VENETIAN_BLINDS_DIRECTIONS: readonly ['vertical', 'horizontal'];
2
2
  export type VenetianBlindsDirection = (typeof VENETIAN_BLINDS_DIRECTIONS)[number];
3
3
  export declare const venetianBlindsSchema: {
4
4
  readonly progress: {
5
- readonly type: "number";
5
+ readonly type: 'number';
6
6
  readonly min: 0;
7
7
  readonly max: 1;
8
8
  readonly step: 0.01;
9
9
  readonly default: 0.5;
10
- readonly description: "Progress";
10
+ readonly description: 'Progress';
11
11
  readonly hiddenFromList: false;
12
12
  };
13
13
  readonly direction: {
14
- readonly type: "enum";
14
+ readonly type: 'enum';
15
15
  readonly variants: {
16
16
  readonly vertical: {};
17
17
  readonly horizontal: {};
18
18
  };
19
19
  readonly default: "vertical";
20
- readonly description: "Direction";
20
+ readonly description: 'Direction';
21
21
  };
22
22
  readonly slats: {
23
- readonly type: "number";
23
+ readonly type: 'number';
24
24
  readonly min: 1;
25
25
  readonly max: 100;
26
26
  readonly step: 1;
27
27
  readonly integer: true;
28
28
  readonly default: 12;
29
- readonly description: "Slats";
29
+ readonly description: 'Slats';
30
30
  readonly hiddenFromList: false;
31
31
  };
32
32
  };
@@ -39,6 +39,6 @@ export type VenetianBlindsParams = {
39
39
  readonly slats?: number;
40
40
  };
41
41
  export declare const venetianBlinds: (params?: (VenetianBlindsParams & {
42
- readonly disabled?: boolean | undefined;
42
+ readonly disabled?: boolean;
43
43
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
44
44
  export {};
@@ -3,5 +3,5 @@ export type VibranceParams = {
3
3
  readonly amount?: number;
4
4
  };
5
5
  export declare const vibrance: (params?: (VibranceParams & {
6
- readonly disabled?: boolean | undefined;
6
+ readonly disabled?: boolean;
7
7
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -1,60 +1,60 @@
1
- declare const VIGNETTE_MODES: readonly ["color", "alpha"];
1
+ declare const VIGNETTE_MODES: readonly ['color', 'alpha'];
2
2
  export declare const vignetteSchema: {
3
3
  readonly amount: {
4
- readonly type: "number";
4
+ readonly type: 'number';
5
5
  readonly min: 0;
6
6
  readonly max: 1;
7
7
  readonly step: 0.01;
8
8
  readonly default: 0.5;
9
- readonly description: "Amount";
9
+ readonly description: 'Amount';
10
10
  readonly hiddenFromList: false;
11
11
  };
12
12
  readonly radius: {
13
- readonly type: "number";
13
+ readonly type: 'number';
14
14
  readonly min: 0;
15
15
  readonly max: 1;
16
16
  readonly step: 0.01;
17
17
  readonly default: 0.65;
18
- readonly description: "Radius";
18
+ readonly description: 'Radius';
19
19
  readonly hiddenFromList: false;
20
20
  };
21
21
  readonly feather: {
22
- readonly type: "number";
22
+ readonly type: 'number';
23
23
  readonly min: 0;
24
24
  readonly max: 1;
25
25
  readonly step: 0.01;
26
26
  readonly default: 0.35;
27
- readonly description: "Feather";
27
+ readonly description: 'Feather';
28
28
  readonly hiddenFromList: false;
29
29
  };
30
30
  readonly roundness: {
31
- readonly type: "number";
31
+ readonly type: 'number';
32
32
  readonly min: 0;
33
33
  readonly max: 1;
34
34
  readonly step: 0.01;
35
35
  readonly default: 1;
36
- readonly description: "Roundness";
36
+ readonly description: 'Roundness';
37
37
  readonly hiddenFromList: false;
38
38
  };
39
39
  readonly color: {
40
- readonly type: "color";
40
+ readonly type: 'color';
41
41
  readonly default: "#000000";
42
- readonly description: "Color";
42
+ readonly description: 'Color';
43
43
  };
44
44
  readonly mode: {
45
- readonly type: "enum";
45
+ readonly type: 'enum';
46
46
  readonly default: "color";
47
- readonly description: "Mode";
47
+ readonly description: 'Mode';
48
48
  readonly variants: {
49
49
  readonly color: {};
50
50
  readonly alpha: {};
51
51
  };
52
52
  };
53
53
  readonly center: {
54
- readonly type: "uv-coordinate";
54
+ readonly type: 'uv-coordinate';
55
55
  readonly step: 0.01;
56
56
  readonly default: readonly [0.5, 0.5];
57
- readonly description: "Center";
57
+ readonly description: 'Center';
58
58
  };
59
59
  };
60
60
  export type VignetteMode = (typeof VIGNETTE_MODES)[number];
@@ -76,6 +76,6 @@ export type VignetteParams = {
76
76
  readonly center?: VignetteCenter;
77
77
  };
78
78
  export declare const vignette: (params?: (VignetteParams & {
79
- readonly disabled?: boolean | undefined;
79
+ readonly disabled?: boolean;
80
80
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
81
81
  export {};
@@ -2,19 +2,19 @@ import { type EffectDefinitionAndStack, type EffectDescriptor } from 'remotion';
2
2
  export declare const testImage: ({ blob, testId, threshold, allowedMismatchedPixelRatio, }: {
3
3
  blob: Blob;
4
4
  testId: string;
5
- threshold?: number | undefined;
6
- allowedMismatchedPixelRatio?: number | undefined;
5
+ threshold?: number;
6
+ allowedMismatchedPixelRatio?: number;
7
7
  }) => Promise<void>;
8
8
  export declare const descriptorsToMemoizedEffects: (effects: EffectDescriptor<unknown>[]) => EffectDefinitionAndStack<unknown>[];
9
9
  export declare const renderEffectChainToCanvas: ({ effects, width, height, source, }: {
10
10
  effects: EffectDefinitionAndStack<unknown>[];
11
- width?: number | undefined;
12
- height?: number | undefined;
13
- source?: CanvasImageSource | undefined;
11
+ width?: number;
12
+ height?: number;
13
+ source?: CanvasImageSource;
14
14
  }) => Promise<HTMLCanvasElement>;
15
15
  export declare const renderEffectChainToBlob: ({ effects, width, height, source, }: {
16
16
  effects: EffectDefinitionAndStack<unknown>[];
17
- width?: number | undefined;
18
- height?: number | undefined;
19
- source?: CanvasImageSource | undefined;
17
+ width?: number;
18
+ height?: number;
19
+ source?: CanvasImageSource;
20
20
  }) => Promise<Blob>;
@@ -8,5 +8,5 @@ export type WaveParams = {
8
8
  readonly wavelength?: number;
9
9
  };
10
10
  export declare const wave: (params?: (WaveParams & {
11
- readonly disabled?: boolean | undefined;
11
+ readonly disabled?: boolean;
12
12
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
package/dist/waves.d.ts CHANGED
@@ -1,87 +1,87 @@
1
- declare const WAVE_DIRECTIONS: readonly ["horizontal", "vertical"];
1
+ declare const WAVE_DIRECTIONS: readonly ['horizontal', 'vertical'];
2
2
  export declare const wavesSchema: {
3
3
  readonly colors: {
4
- readonly type: "array";
4
+ readonly type: 'array';
5
5
  readonly item: {
6
- readonly type: "color";
6
+ readonly type: 'color';
7
7
  };
8
8
  readonly default: readonly ["#dff4ff", "#7cc6ff"];
9
9
  readonly minLength: 2;
10
- readonly newItemDefault: "#ff0000";
11
- readonly description: "Colors";
10
+ readonly newItemDefault: '#ff0000';
11
+ readonly description: 'Colors';
12
12
  readonly keyframable: false;
13
13
  };
14
14
  readonly direction: {
15
- readonly type: "enum";
15
+ readonly type: 'enum';
16
16
  readonly variants: {
17
17
  readonly horizontal: {};
18
18
  readonly vertical: {};
19
19
  };
20
20
  readonly default: "horizontal";
21
- readonly description: "Direction";
21
+ readonly description: 'Direction';
22
22
  };
23
23
  readonly thickness: {
24
- readonly type: "number";
24
+ readonly type: 'number';
25
25
  readonly min: 0.1;
26
26
  readonly max: 400;
27
27
  readonly step: 0.1;
28
28
  readonly default: 40;
29
- readonly description: "Thickness";
29
+ readonly description: 'Thickness';
30
30
  readonly hiddenFromList: false;
31
31
  };
32
32
  readonly gap: {
33
- readonly type: "number";
33
+ readonly type: 'number';
34
34
  readonly min: 0;
35
35
  readonly max: 400;
36
36
  readonly step: 0.1;
37
37
  readonly default: 0;
38
- readonly description: "Gap";
38
+ readonly description: 'Gap';
39
39
  readonly hiddenFromList: false;
40
40
  };
41
41
  readonly angle: {
42
- readonly type: "rotation-degrees";
42
+ readonly type: 'rotation-degrees';
43
43
  readonly step: 1;
44
44
  readonly default: 0;
45
- readonly description: "Angle";
45
+ readonly description: 'Angle';
46
46
  };
47
47
  readonly offset: {
48
- readonly type: "number";
48
+ readonly type: 'number';
49
49
  readonly step: 0.1;
50
50
  readonly default: 0;
51
- readonly description: "Offset";
51
+ readonly description: 'Offset';
52
52
  readonly hiddenFromList: false;
53
53
  };
54
54
  readonly amplitude: {
55
- readonly type: "number";
55
+ readonly type: 'number';
56
56
  readonly min: 0;
57
57
  readonly max: 500;
58
58
  readonly step: 0.1;
59
59
  readonly default: 24;
60
- readonly description: "Amplitude";
60
+ readonly description: 'Amplitude';
61
61
  readonly hiddenFromList: false;
62
62
  };
63
63
  readonly wavelength: {
64
- readonly type: "number";
64
+ readonly type: 'number';
65
65
  readonly min: 1;
66
66
  readonly max: 2000;
67
67
  readonly step: 1;
68
68
  readonly default: 160;
69
- readonly description: "Wavelength";
69
+ readonly description: 'Wavelength';
70
70
  readonly hiddenFromList: false;
71
71
  };
72
72
  readonly phase: {
73
- readonly type: "number";
73
+ readonly type: 'number';
74
74
  readonly min: -360;
75
75
  readonly max: 360;
76
76
  readonly step: 1;
77
77
  readonly default: 0;
78
- readonly description: "Phase";
78
+ readonly description: 'Phase';
79
79
  readonly hiddenFromList: false;
80
80
  };
81
81
  readonly maskToSourceAlpha: {
82
- readonly type: "boolean";
82
+ readonly type: 'boolean';
83
83
  readonly default: false;
84
- readonly description: "Mask to source alpha";
84
+ readonly description: 'Mask to source alpha';
85
85
  };
86
86
  };
87
87
  export type WavesDirection = (typeof WAVE_DIRECTIONS)[number];
@@ -108,6 +108,6 @@ export type WavesParams = {
108
108
  readonly maskToSourceAlpha?: boolean;
109
109
  };
110
110
  export declare const waves: (params?: (WavesParams & {
111
- readonly disabled?: boolean | undefined;
111
+ readonly disabled?: boolean;
112
112
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
113
113
  export {};
@@ -0,0 +1,24 @@
1
+ export type WebGpuProjectionState = {
2
+ context: GPUCanvasContext;
3
+ resources: {
4
+ device: GPUDevice;
5
+ pipeline: GPURenderPipeline;
6
+ uniforms: GPUBuffer;
7
+ sampler: GPUSampler;
8
+ texture: GPUTexture;
9
+ bindGroup: GPUBindGroup;
10
+ width: number;
11
+ height: number;
12
+ } | null;
13
+ };
14
+ export declare const cleanupWebGpuProjection: (state: WebGpuProjectionState) => void;
15
+ export declare const setupWebGpuProjection: (target: HTMLCanvasElement, label: string) => WebGpuProjectionState;
16
+ export declare const applyWebGpuProjection: ({ state, source, width, height, device, shader, uniformData, }: {
17
+ state: WebGpuProjectionState;
18
+ source: CanvasImageSource;
19
+ width: number;
20
+ height: number;
21
+ device: GPUDevice;
22
+ shader: string;
23
+ uniformData: Float32Array<ArrayBuffer>;
24
+ }) => void;
@@ -5,5 +5,5 @@ export type WhiteBalanceParams = {
5
5
  readonly tint?: number;
6
6
  };
7
7
  export declare const whiteBalance: (params?: (WhiteBalanceParams & {
8
- readonly disabled?: boolean | undefined;
8
+ readonly disabled?: boolean;
9
9
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -5,5 +5,5 @@ export type WhiteNoiseParams = {
5
5
  readonly seed?: number;
6
6
  };
7
7
  export declare const whiteNoise: (params?: (WhiteNoiseParams & {
8
- readonly disabled?: boolean | undefined;
8
+ readonly disabled?: boolean;
9
9
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;