@remotion/light-leaks 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.
- package/dist/esm/index.mjs +12 -12
- package/dist/light-leak-internals.d.ts +11 -12
- package/package.json +3 -3
package/dist/esm/index.mjs
CHANGED
|
@@ -189,7 +189,8 @@ var lightLeakSchema = {
|
|
|
189
189
|
default: 0,
|
|
190
190
|
description: "Hue Shift"
|
|
191
191
|
},
|
|
192
|
-
...Internals.sequenceStyleSchema
|
|
192
|
+
...Internals.sequenceStyleSchema,
|
|
193
|
+
hidden: Internals.hiddenField
|
|
193
194
|
};
|
|
194
195
|
var LightLeakInner = ({
|
|
195
196
|
seed = 0,
|
|
@@ -237,19 +238,19 @@ var lightLeakEffectSchema = {
|
|
|
237
238
|
default: 0,
|
|
238
239
|
description: "Hue Shift"
|
|
239
240
|
},
|
|
240
|
-
|
|
241
|
+
progress: {
|
|
241
242
|
type: "number",
|
|
242
|
-
min:
|
|
243
|
-
max:
|
|
244
|
-
step:
|
|
245
|
-
default:
|
|
246
|
-
description: "
|
|
243
|
+
min: 0,
|
|
244
|
+
max: 1,
|
|
245
|
+
step: 0.01,
|
|
246
|
+
default: 0,
|
|
247
|
+
description: "Progress"
|
|
247
248
|
}
|
|
248
249
|
};
|
|
249
250
|
var resolve = (p) => ({
|
|
250
251
|
seed: p.seed ?? 0,
|
|
251
252
|
hueShift: p.hueShift ?? 0,
|
|
252
|
-
|
|
253
|
+
progress: p.progress ?? 0
|
|
253
254
|
});
|
|
254
255
|
var LIGHT_LEAK_VS = `#version 300 es
|
|
255
256
|
in vec2 aPos;
|
|
@@ -375,7 +376,7 @@ var lightLeak = createEffect({
|
|
|
375
376
|
backend: "webgl2",
|
|
376
377
|
calculateKey: (params) => {
|
|
377
378
|
const r = resolve(params);
|
|
378
|
-
return `light-leak-${r.seed}-${r.hueShift}-${r.
|
|
379
|
+
return `light-leak-${r.seed}-${r.hueShift}-${r.progress}`;
|
|
379
380
|
},
|
|
380
381
|
setup: (target) => {
|
|
381
382
|
const gl = target.getContext("webgl2", {
|
|
@@ -452,7 +453,7 @@ var lightLeak = createEffect({
|
|
|
452
453
|
uResolution: gl.getUniformLocation(program, "resolution")
|
|
453
454
|
};
|
|
454
455
|
},
|
|
455
|
-
apply: ({ source, width, height, params, state
|
|
456
|
+
apply: ({ source, width, height, params, state }) => {
|
|
456
457
|
const r = resolve(params);
|
|
457
458
|
if (typeof r.seed !== "number" || !Number.isFinite(r.seed)) {
|
|
458
459
|
throw new TypeError(`"seed" must be a finite number, but got ${JSON.stringify(r.seed)}`);
|
|
@@ -463,8 +464,7 @@ var lightLeak = createEffect({
|
|
|
463
464
|
if (r.hueShift < 0 || r.hueShift > 360) {
|
|
464
465
|
throw new RangeError(`"hueShift" must be between 0 and 360, but got ${r.hueShift}`);
|
|
465
466
|
}
|
|
466
|
-
const
|
|
467
|
-
const normalized = duration <= 1 ? 0 : frame / (duration - 1);
|
|
467
|
+
const normalized = Math.min(1, Math.max(0, r.progress));
|
|
468
468
|
const evolveProgress = Math.min(1, normalized * 2);
|
|
469
469
|
const retractProgress = Math.max(0, normalized * 2 - 1);
|
|
470
470
|
const {
|
|
@@ -11,27 +11,26 @@ export declare const lightLeakEffectSchema: {
|
|
|
11
11
|
readonly default: 0;
|
|
12
12
|
readonly description: "Hue Shift";
|
|
13
13
|
};
|
|
14
|
-
readonly
|
|
14
|
+
readonly progress: {
|
|
15
15
|
readonly type: "number";
|
|
16
|
-
readonly min:
|
|
17
|
-
readonly max:
|
|
18
|
-
readonly step:
|
|
19
|
-
readonly default:
|
|
20
|
-
readonly description: "
|
|
16
|
+
readonly min: 0;
|
|
17
|
+
readonly max: 1;
|
|
18
|
+
readonly step: 0.01;
|
|
19
|
+
readonly default: 0;
|
|
20
|
+
readonly description: "Progress";
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export type LightLeakEffectParams = {
|
|
24
24
|
readonly seed?: number;
|
|
25
25
|
readonly hueShift?: number;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
* duration as your composition or sequence.
|
|
29
|
-
*/
|
|
30
|
-
readonly durationInFrames?: number;
|
|
26
|
+
/** Evolve/retract phase from 0 (start) to 1 (end). */
|
|
27
|
+
readonly progress?: number;
|
|
31
28
|
};
|
|
32
29
|
/**
|
|
33
30
|
* Experimental internals for the light leak canvas effect pipeline.
|
|
34
31
|
*/
|
|
35
32
|
export declare const LightLeakInternals: {
|
|
36
|
-
readonly lightLeak: (params?: LightLeakEffectParams
|
|
33
|
+
readonly lightLeak: (params?: (LightLeakEffectParams & {
|
|
34
|
+
readonly disabled?: boolean | undefined;
|
|
35
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|
|
37
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/light-leaks",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.463",
|
|
4
4
|
"description": "Light leak effects for Remotion",
|
|
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.
|
|
26
|
+
"remotion": "4.0.463",
|
|
27
27
|
"zod": "4.3.6"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"react": "19.2.3",
|
|
43
43
|
"react-dom": "19.2.3",
|
|
44
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
44
|
+
"@remotion/eslint-config-internal": "4.0.463",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
46
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
47
47
|
},
|