@remotion/light-leaks 4.0.533 → 4.0.535

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 (2) hide show
  1. package/dist/esm/index.mjs +8 -10
  2. package/package.json +4 -4
@@ -5,7 +5,7 @@ import {
5
5
  } from "@remotion/effects/light-leak";
6
6
 
7
7
  // src/LightLeak.tsx
8
- import { useCallback, useEffect, useRef, useState } from "react";
8
+ import { useCallback, useLayoutEffect, useRef } from "react";
9
9
  import {
10
10
  AbsoluteFill,
11
11
  Internals,
@@ -106,8 +106,7 @@ var LightLeakCanvas = ({ seed, hueShift }) => {
106
106
  const { width, height, durationInFrames } = useVideoConfig();
107
107
  const canvasRef = useRef(null);
108
108
  const glRef = useRef(null);
109
- const { delayRender, continueRender, cancelRender } = useDelayRender();
110
- const [handle] = useState(() => delayRender());
109
+ const { cancelRender } = useDelayRender();
111
110
  const initGl = useCallback((canvas) => {
112
111
  const gl = canvas.getContext("webgl", {
113
112
  premultipliedAlpha: false,
@@ -136,7 +135,6 @@ var LightLeakCanvas = ({ seed, hueShift }) => {
136
135
  const pos = gl.getAttribLocation(program, "position");
137
136
  gl.enableVertexAttribArray(pos);
138
137
  gl.vertexAttribPointer(pos, 2, gl.FLOAT, false, 0, 0);
139
- continueRender(handle);
140
138
  return {
141
139
  gl,
142
140
  resLoc: gl.getUniformLocation(program, "resolution"),
@@ -146,14 +144,14 @@ var LightLeakCanvas = ({ seed, hueShift }) => {
146
144
  retractSeedLoc: gl.getUniformLocation(program, "retractSeed"),
147
145
  hueShiftLoc: gl.getUniformLocation(program, "hueShift")
148
146
  };
149
- }, [continueRender, handle, cancelRender]);
150
- useEffect(() => {
147
+ }, [cancelRender]);
148
+ useLayoutEffect(() => {
151
149
  const canvas = canvasRef.current;
152
150
  if (!canvas || glRef.current)
153
151
  return;
154
152
  glRef.current = initGl(canvas);
155
153
  }, [initGl]);
156
- useEffect(() => {
154
+ useLayoutEffect(() => {
157
155
  const ctx = glRef.current;
158
156
  if (!ctx)
159
157
  return;
@@ -256,8 +254,8 @@ var LightLeakInternals = {
256
254
  lightLeak
257
255
  };
258
256
  export {
259
- lightLeakEffectSchema,
260
- lightLeak,
257
+ LightLeak,
261
258
  LightLeakInternals,
262
- LightLeak
259
+ lightLeak,
260
+ lightLeakEffectSchema
263
261
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/light-leaks",
3
- "version": "4.0.533",
3
+ "version": "4.0.535",
4
4
  "description": "Light leak effects for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,8 +24,8 @@
24
24
  "url": "https://github.com/remotion-dev/remotion/issues"
25
25
  },
26
26
  "dependencies": {
27
- "@remotion/effects": "4.0.533",
28
- "remotion": "4.0.533",
27
+ "@remotion/effects": "4.0.535",
28
+ "remotion": "4.0.535",
29
29
  "zod": "4.5.4"
30
30
  },
31
31
  "peerDependencies": {
@@ -43,7 +43,7 @@
43
43
  "devDependencies": {
44
44
  "react": "19.2.3",
45
45
  "react-dom": "19.2.3",
46
- "@remotion/eslint-config-internal": "4.0.533",
46
+ "@remotion/eslint-config-internal": "4.0.535",
47
47
  "eslint": "9.19.0",
48
48
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
49
49
  },