@remotion/effects 4.0.538 → 4.0.539

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/levels.d.ts CHANGED
@@ -1,11 +1,78 @@
1
+ declare const LEVELS_CHANNELS: readonly ['rgb', 'red', 'green', 'blue'];
2
+ export declare const levelsSchema: {
3
+ readonly channel: {
4
+ readonly type: 'enum';
5
+ readonly variants: {
6
+ readonly rgb: {};
7
+ readonly red: {};
8
+ readonly green: {};
9
+ readonly blue: {};
10
+ };
11
+ readonly default: "rgb";
12
+ readonly description: 'Channel';
13
+ };
14
+ readonly blackPoint: {
15
+ readonly type: 'number';
16
+ readonly min: 0;
17
+ readonly max: 1;
18
+ readonly step: 0.01;
19
+ readonly default: 0;
20
+ readonly description: 'Input black';
21
+ readonly hiddenFromList: false;
22
+ };
23
+ readonly whitePoint: {
24
+ readonly type: 'number';
25
+ readonly min: 0;
26
+ readonly max: 1;
27
+ readonly step: 0.01;
28
+ readonly default: 1;
29
+ readonly description: 'Input white';
30
+ readonly hiddenFromList: false;
31
+ };
32
+ readonly gamma: {
33
+ readonly type: 'number';
34
+ readonly min: 0.01;
35
+ readonly max: 10;
36
+ readonly step: 0.01;
37
+ readonly default: 1;
38
+ readonly description: 'Gamma';
39
+ readonly hiddenFromList: false;
40
+ };
41
+ readonly outputBlack: {
42
+ readonly type: 'number';
43
+ readonly min: 0;
44
+ readonly max: 1;
45
+ readonly step: 0.01;
46
+ readonly default: 0;
47
+ readonly description: 'Output black';
48
+ readonly hiddenFromList: false;
49
+ };
50
+ readonly outputWhite: {
51
+ readonly type: 'number';
52
+ readonly min: 0;
53
+ readonly max: 1;
54
+ readonly step: 0.01;
55
+ readonly default: 1;
56
+ readonly description: 'Output white';
57
+ readonly hiddenFromList: false;
58
+ };
59
+ };
60
+ export type LevelsChannel = (typeof LEVELS_CHANNELS)[number];
1
61
  export type LevelsParams = {
2
- /** Input value mapped to black, from `0` to `1`. Defaults to `0`. */
62
+ /** Color channels to adjust. Defaults to `"rgb"`. */
63
+ readonly channel?: LevelsChannel;
64
+ /** Input value mapped to outputBlack, from `0` to `1`. Defaults to `0`. */
3
65
  readonly blackPoint?: number;
4
- /** Input value mapped to white, from `0` to `1`. Defaults to `1`. */
66
+ /** Input value mapped to outputWhite, from `0` to `1`. Defaults to `1`. */
5
67
  readonly whitePoint?: number;
6
68
  /** Midtone gamma from `0.01` to `10`. Defaults to `1`. */
7
69
  readonly gamma?: number;
70
+ /** Output value for the input black point, from `0` to `1`. Defaults to `0`. */
71
+ readonly outputBlack?: number;
72
+ /** Output value for the input white point, from `0` to `1`. Defaults to `1`. */
73
+ readonly outputWhite?: number;
8
74
  };
9
75
  export declare const levels: (params?: (LevelsParams & {
10
76
  readonly disabled?: boolean;
11
77
  }) | undefined) => import("remotion").EffectDescriptor<unknown>;
78
+ export {};
@@ -0,0 +1,19 @@
1
+ export type ShatterGeometryParams = {
2
+ time: number;
3
+ pattern: 'bricks' | 'glass' | 'hexagons' | 'squares' | 'triangles';
4
+ repetitions: number;
5
+ direction: number;
6
+ origin: readonly [number, number];
7
+ center: readonly [number, number];
8
+ radius: number;
9
+ depth: number;
10
+ strength: number;
11
+ rotationSpeed: number;
12
+ randomness: number;
13
+ viscosity: number;
14
+ massVariance: number;
15
+ gravity: number;
16
+ seed: number;
17
+ extrusionDepth: number;
18
+ };
19
+ export declare const createShatterGeometry: (width: number, height: number, params: ShatterGeometryParams) => Float32Array;
@@ -0,0 +1,39 @@
1
+ import { type ShatterGeometryParams } from './geometry.js';
2
+ export type ShatterPattern = ShatterGeometryParams['pattern'];
3
+ export type ShatterParams = {
4
+ /** Elapsed simulation time in seconds. Must be nonnegative. Defaults to 0.5. */
5
+ readonly time?: number;
6
+ /** Shape of the shards. Defaults to 'bricks'. */
7
+ readonly pattern?: ShatterPattern;
8
+ /** Number of pattern cells across the canvas width, from 1 to 100. Defaults to 10. */
9
+ readonly repetitions?: number;
10
+ /** Clockwise rotation of the pattern in degrees. Defaults to 0. */
11
+ readonly direction?: number;
12
+ /** Pattern origin as fractions of the canvas width and height. Defaults to [0.5, 0.5]. */
13
+ readonly origin?: readonly [number, number];
14
+ /** Force center as fractions of the canvas width and height. Defaults to [0.5, 0.5]. */
15
+ readonly center?: readonly [number, number];
16
+ /** Force sphere radius as a nonnegative fraction of the canvas width. Defaults to 0.4. */
17
+ readonly radius?: number;
18
+ /** Force depth in front of the canvas, as a fraction of its width. Defaults to 0.1. */
19
+ readonly depth?: number;
20
+ /** Radial force strength. Negative values pull shards inward. Defaults to 5. */
21
+ readonly strength?: number;
22
+ /** Nonnegative multiplier for shard rotation in turns per second. Defaults to 0.2. */
23
+ readonly rotationSpeed?: number;
24
+ /** Random variation in shard velocity, from 0 to 1. Defaults to 0.1. */
25
+ readonly randomness?: number;
26
+ /** Drag slowing shard motion and rotation, from 0 to 1. Defaults to 0.1. */
27
+ readonly viscosity?: number;
28
+ /** Variation in shard mass, from 0 to 1. Defaults to 0.3. */
29
+ readonly massVariance?: number;
30
+ /** Nonnegative downward acceleration, in tenths of the canvas width per second squared. Defaults to 3. */
31
+ readonly gravity?: number;
32
+ /** Integer random seed from 0 to 4294967295. Defaults to 0. */
33
+ readonly seed?: number;
34
+ /** Shard thickness as a fraction of the pattern cell size, from 0 to 1. Defaults to 0.05. */
35
+ readonly extrusionDepth?: number;
36
+ };
37
+ export declare const shatter: (params?: (ShatterParams & {
38
+ readonly disabled?: boolean;
39
+ }) | undefined) => import("remotion").EffectDescriptor<unknown>;
@@ -0,0 +1,19 @@
1
+ export type ShatterState = {
2
+ readonly gl: WebGL2RenderingContext;
3
+ readonly program: WebGLProgram;
4
+ readonly vao: WebGLVertexArrayObject;
5
+ readonly vbo: WebGLBuffer;
6
+ readonly texture: WebGLTexture;
7
+ readonly uSource: WebGLUniformLocation | null;
8
+ readonly uResolution: WebGLUniformLocation | null;
9
+ };
10
+ export declare const setupShatter: (gl: WebGL2RenderingContext) => ShatterState;
11
+ export declare const drawShatter: ({ state, source, width, height, flipSourceY, vertices, }: {
12
+ readonly state: ShatterState;
13
+ readonly source: CanvasImageSource;
14
+ readonly width: number;
15
+ readonly height: number;
16
+ readonly flipSourceY: boolean;
17
+ readonly vertices: Float32Array;
18
+ }) => void;
19
+ export declare const cleanupShatter: ({ gl, program, vao, vbo, texture, }: ShatterState) => void;
@@ -0,0 +1 @@
1
+ export { shatter, type ShatterParams, type ShatterPattern, } from './shatter/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/effects",
3
- "version": "4.0.538",
3
+ "version": "4.0.539",
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",
@@ -26,7 +26,7 @@
26
26
  "url": "https://github.com/remotion-dev/remotion/issues"
27
27
  },
28
28
  "dependencies": {
29
- "remotion": "4.0.538"
29
+ "remotion": "4.0.539"
30
30
  },
31
31
  "exports": {
32
32
  ".": {
@@ -99,6 +99,11 @@
99
99
  "module": "./dist/esm/contour-lines.mjs",
100
100
  "import": "./dist/esm/contour-lines.mjs"
101
101
  },
102
+ "./curves": {
103
+ "types": "./dist/curves.d.ts",
104
+ "module": "./dist/esm/curves.mjs",
105
+ "import": "./dist/esm/curves.mjs"
106
+ },
102
107
  "./cylinder": {
103
108
  "types": "./dist/cylinder.d.ts",
104
109
  "module": "./dist/esm/cylinder.mjs",
@@ -329,6 +334,11 @@
329
334
  "module": "./dist/esm/shadows-highlights.mjs",
330
335
  "import": "./dist/esm/shadows-highlights.mjs"
331
336
  },
337
+ "./shatter": {
338
+ "types": "./dist/shatter.d.ts",
339
+ "module": "./dist/esm/shatter.mjs",
340
+ "import": "./dist/esm/shatter.mjs"
341
+ },
332
342
  "./shine": {
333
343
  "types": "./dist/shine.d.ts",
334
344
  "module": "./dist/esm/shine.mjs",
@@ -482,6 +492,9 @@
482
492
  "contour-lines": [
483
493
  "dist/contour-lines.d.ts"
484
494
  ],
495
+ "curves": [
496
+ "dist/curves.d.ts"
497
+ ],
485
498
  "cylinder": [
486
499
  "dist/cylinder.d.ts"
487
500
  ],
@@ -620,6 +633,9 @@
620
633
  "shadows-highlights": [
621
634
  "dist/shadows-highlights.d.ts"
622
635
  ],
636
+ "shatter": [
637
+ "dist/shatter.d.ts"
638
+ ],
623
639
  "shine": [
624
640
  "dist/shine.d.ts"
625
641
  ],
@@ -690,7 +706,7 @@
690
706
  },
691
707
  "homepage": "https://www.remotion.dev/docs/effects/api",
692
708
  "devDependencies": {
693
- "@remotion/eslint-config-internal": "4.0.538",
709
+ "@remotion/eslint-config-internal": "4.0.539",
694
710
  "@vitest/browser-playwright": "5.0.3",
695
711
  "@webgpu/types": "0.1.74",
696
712
  "eslint": "9.19.0",