@remotion/three 4.0.231 → 4.0.233
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 +31 -15
- package/package.json +5 -5
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
10
|
+
if (!__hasOwnProp.call(to, key))
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: () => mod[key],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
1
17
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
18
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
19
|
}) : x)(function(x) {
|
|
@@ -97,21 +113,6 @@ import {
|
|
|
97
113
|
useVideoConfig
|
|
98
114
|
} from "remotion";
|
|
99
115
|
import { NoReactInternals as NoReactInternals2 } from "remotion/no-react";
|
|
100
|
-
function useOffthreadVideoTexture({
|
|
101
|
-
src,
|
|
102
|
-
playbackRate = 1,
|
|
103
|
-
transparent = false,
|
|
104
|
-
toneMapped = true
|
|
105
|
-
}) {
|
|
106
|
-
if (!src) {
|
|
107
|
-
throw new Error("src must be provided to useOffthreadVideoTexture");
|
|
108
|
-
}
|
|
109
|
-
const { isRendering } = getRemotionEnvironment();
|
|
110
|
-
if (!isRendering) {
|
|
111
|
-
throw new Error("useOffthreadVideoTexture() can only be used during rendering. Use getRemotionEnvironment().isRendering to render it conditionally.");
|
|
112
|
-
}
|
|
113
|
-
return useInnerVideoTexture({ playbackRate, src, transparent, toneMapped });
|
|
114
|
-
}
|
|
115
116
|
var useInnerVideoTexture = ({
|
|
116
117
|
playbackRate,
|
|
117
118
|
src,
|
|
@@ -168,6 +169,21 @@ var useInnerVideoTexture = ({
|
|
|
168
169
|
}, [offthreadVideoFrameSrc, fetchTexture]);
|
|
169
170
|
return imageTexture;
|
|
170
171
|
};
|
|
172
|
+
function useOffthreadVideoTexture({
|
|
173
|
+
src,
|
|
174
|
+
playbackRate = 1,
|
|
175
|
+
transparent = false,
|
|
176
|
+
toneMapped = true
|
|
177
|
+
}) {
|
|
178
|
+
if (!src) {
|
|
179
|
+
throw new Error("src must be provided to useOffthreadVideoTexture");
|
|
180
|
+
}
|
|
181
|
+
const { isRendering } = getRemotionEnvironment();
|
|
182
|
+
if (!isRendering) {
|
|
183
|
+
throw new Error("useOffthreadVideoTexture() can only be used during rendering. Use getRemotionEnvironment().isRendering to render it conditionally.");
|
|
184
|
+
}
|
|
185
|
+
return useInnerVideoTexture({ playbackRate, src, transparent, toneMapped });
|
|
186
|
+
}
|
|
171
187
|
// src/use-video-texture.ts
|
|
172
188
|
import React3, { useCallback as useCallback3, useState as useState3 } from "react";
|
|
173
189
|
import { continueRender as continueRender4, delayRender as delayRender4, useCurrentFrame as useCurrentFrame2 } from "remotion";
|
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.233",
|
|
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.233"
|
|
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.233"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@react-three/fiber": "8.13.5",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"react-dom": "18.3.1",
|
|
35
35
|
"three": "0.158.0",
|
|
36
36
|
"eslint": "9.14.0",
|
|
37
|
-
"remotion": "4.0.
|
|
38
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
37
|
+
"remotion": "4.0.233",
|
|
38
|
+
"@remotion/eslint-config-internal": "4.0.233"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [
|
|
41
41
|
"remotion",
|