@remotion/three 4.0.339 → 4.0.340
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.
|
@@ -58,11 +58,7 @@ const useVideoTexture = (videoRef) => {
|
|
|
58
58
|
});
|
|
59
59
|
const [videoTexture, setVideoTexture] = (0, react_1.useState)(null);
|
|
60
60
|
const [vidText] = (0, react_1.useState)(() => Promise.resolve().then(() => __importStar(require('three/src/textures/VideoTexture.js'))));
|
|
61
|
-
const [error, setError] = (0, react_1.useState)(null);
|
|
62
61
|
const frame = (0, remotion_1.useCurrentFrame)();
|
|
63
|
-
if (error) {
|
|
64
|
-
throw error;
|
|
65
|
-
}
|
|
66
62
|
const onReady = (0, react_1.useCallback)(() => {
|
|
67
63
|
vidText
|
|
68
64
|
.then(({ VideoTexture }) => {
|
|
@@ -76,7 +72,7 @@ const useVideoTexture = (videoRef) => {
|
|
|
76
72
|
(0, remotion_1.continueRender)(loaded);
|
|
77
73
|
})
|
|
78
74
|
.catch((err) => {
|
|
79
|
-
|
|
75
|
+
(0, remotion_1.cancelRender)(err);
|
|
80
76
|
});
|
|
81
77
|
}, [loaded, vidText, videoRef]);
|
|
82
78
|
react_1.default.useLayoutEffect(() => {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -225,7 +225,12 @@ function useOffthreadVideoTexture({
|
|
|
225
225
|
}
|
|
226
226
|
// src/use-video-texture.ts
|
|
227
227
|
import React3, { useCallback as useCallback3, useEffect as useEffect2, useState as useState3 } from "react";
|
|
228
|
-
import {
|
|
228
|
+
import {
|
|
229
|
+
cancelRender as cancelRender2,
|
|
230
|
+
continueRender as continueRender4,
|
|
231
|
+
delayRender as delayRender4,
|
|
232
|
+
useCurrentFrame as useCurrentFrame3
|
|
233
|
+
} from "remotion";
|
|
229
234
|
var warned = false;
|
|
230
235
|
var warnAboutRequestVideoFrameCallback = () => {
|
|
231
236
|
if (warned) {
|
|
@@ -243,11 +248,7 @@ var useVideoTexture = (videoRef) => {
|
|
|
243
248
|
});
|
|
244
249
|
const [videoTexture, setVideoTexture] = useState3(null);
|
|
245
250
|
const [vidText] = useState3(() => import("three/src/textures/VideoTexture.js"));
|
|
246
|
-
const [error, setError] = useState3(null);
|
|
247
251
|
const frame = useCurrentFrame3();
|
|
248
|
-
if (error) {
|
|
249
|
-
throw error;
|
|
250
|
-
}
|
|
251
252
|
const onReady = useCallback3(() => {
|
|
252
253
|
vidText.then(({ VideoTexture }) => {
|
|
253
254
|
if (!videoRef.current) {
|
|
@@ -259,7 +260,7 @@ var useVideoTexture = (videoRef) => {
|
|
|
259
260
|
setVideoTexture(vt);
|
|
260
261
|
continueRender4(loaded);
|
|
261
262
|
}).catch((err) => {
|
|
262
|
-
|
|
263
|
+
cancelRender2(err);
|
|
263
264
|
});
|
|
264
265
|
}, [loaded, vidText, videoRef]);
|
|
265
266
|
React3.useLayoutEffect(() => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/three"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/three",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.340",
|
|
7
7
|
"description": "Include React Three Fiber components in a Remotion video",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"remotion": "4.0.
|
|
19
|
+
"remotion": "4.0.340"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@react-three/fiber": ">=8.0.0",
|
|
23
23
|
"react": ">=16.8.0",
|
|
24
24
|
"react-dom": ">=16.8.0",
|
|
25
25
|
"three": ">=0.137.0",
|
|
26
|
-
"remotion": "4.0.
|
|
26
|
+
"remotion": "4.0.340"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@react-three/fiber": "9.2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"react-dom": "19.0.0",
|
|
35
35
|
"three": "0.178.0",
|
|
36
36
|
"eslint": "9.19.0",
|
|
37
|
-
"remotion": "4.0.
|
|
38
|
-
"
|
|
37
|
+
"@remotion/eslint-config-internal": "4.0.340",
|
|
38
|
+
"remotion": "4.0.340"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [
|
|
41
41
|
"remotion",
|