@remotion/light-leaks 4.0.463 → 4.0.465
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 +8 -6
- package/package.json +3 -3
package/dist/esm/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
useVideoConfig
|
|
10
10
|
} from "remotion";
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var { createWebGLContextError } = Internals;
|
|
12
13
|
var VERTEX_SHADER = `
|
|
13
14
|
attribute vec2 position;
|
|
14
15
|
void main() {
|
|
@@ -106,7 +107,7 @@ var LightLeakCanvas = ({ seed, hueShift }) => {
|
|
|
106
107
|
alpha: true
|
|
107
108
|
});
|
|
108
109
|
if (!gl) {
|
|
109
|
-
cancelRender(
|
|
110
|
+
cancelRender(createWebGLContextError("light leak"));
|
|
110
111
|
return null;
|
|
111
112
|
}
|
|
112
113
|
gl.enable(gl.BLEND);
|
|
@@ -228,7 +229,7 @@ LightLeak.displayName = "LightLeak";
|
|
|
228
229
|
Internals.addSequenceStackTraces(LightLeak);
|
|
229
230
|
// src/light-leak-internals.ts
|
|
230
231
|
import { Internals as Internals2 } from "remotion";
|
|
231
|
-
var { createEffect } = Internals2;
|
|
232
|
+
var { createEffect, createWebGL2ContextError } = Internals2;
|
|
232
233
|
var lightLeakEffectSchema = {
|
|
233
234
|
seed: { type: "number", default: 0, description: "Seed" },
|
|
234
235
|
hueShift: {
|
|
@@ -385,10 +386,9 @@ var lightLeak = createEffect({
|
|
|
385
386
|
preserveDrawingBuffer: true
|
|
386
387
|
});
|
|
387
388
|
if (!gl) {
|
|
388
|
-
throw
|
|
389
|
+
throw createWebGL2ContextError("light leak effect");
|
|
389
390
|
}
|
|
390
391
|
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
391
|
-
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
|
|
392
392
|
const vs = compileShader(gl, gl.VERTEX_SHADER, LIGHT_LEAK_VS);
|
|
393
393
|
const fs = compileShader(gl, gl.FRAGMENT_SHADER, LIGHT_LEAK_FS);
|
|
394
394
|
const program = linkProgram(gl, vs, fs);
|
|
@@ -453,7 +453,7 @@ var lightLeak = createEffect({
|
|
|
453
453
|
uResolution: gl.getUniformLocation(program, "resolution")
|
|
454
454
|
};
|
|
455
455
|
},
|
|
456
|
-
apply: ({ source, width, height, params, state }) => {
|
|
456
|
+
apply: ({ source, width, height, params, state, flipSourceY }) => {
|
|
457
457
|
const r = resolve(params);
|
|
458
458
|
if (typeof r.seed !== "number" || !Number.isFinite(r.seed)) {
|
|
459
459
|
throw new TypeError(`"seed" must be a finite number, but got ${JSON.stringify(r.seed)}`);
|
|
@@ -489,6 +489,7 @@ var lightLeak = createEffect({
|
|
|
489
489
|
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
490
490
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
|
491
491
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
492
|
+
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipSourceY);
|
|
492
493
|
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);
|
|
493
494
|
if (uSource)
|
|
494
495
|
gl.uniform1i(uSource, 0);
|
|
@@ -515,7 +516,8 @@ var lightLeak = createEffect({
|
|
|
515
516
|
gl.deleteVertexArray(vao);
|
|
516
517
|
gl.deleteTexture(texture);
|
|
517
518
|
},
|
|
518
|
-
schema: lightLeakEffectSchema
|
|
519
|
+
schema: lightLeakEffectSchema,
|
|
520
|
+
validateParams: () => {}
|
|
519
521
|
});
|
|
520
522
|
var LightLeakInternals = {
|
|
521
523
|
lightLeak
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/light-leaks",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.465",
|
|
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.465",
|
|
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.465",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
46
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
47
47
|
},
|