@remotion/three 4.0.340 → 4.0.344

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/LICENSE.md CHANGED
@@ -6,10 +6,10 @@ In Remotion 5.0, the license will slightly change. [View the changes here](https
6
6
 
7
7
  Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
8
8
 
9
- - [Free license](#free-license)
10
- - [Company license](#company-license)
9
+ - [Free License](#free-license)
10
+ - [Company License](#company-license)
11
11
 
12
- ## Free license
12
+ ## Free License
13
13
 
14
14
  Copyright © 2025 [Remotion](https://www.remotion.dev)
15
15
 
@@ -24,7 +24,7 @@ You are eligible to use Remotion for free if you are:
24
24
 
25
25
  ### Allowed use cases
26
26
 
27
- Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
27
+ Permission is hereby granted, free of charge, to any person eligible for the "Free License", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
28
28
 
29
29
  ### Disallowed use cases
30
30
 
@@ -38,12 +38,12 @@ The software is provided "as is", without warranty of any kind, express or impli
38
38
 
39
39
  Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
40
40
 
41
- ## Company license
41
+ ## Company License
42
42
 
43
- You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
43
+ You are required to obtain a Company License to use Remotion if you are not within the group of entities eligible for a Free License. This license will enable you to use Remotion for the allowed use cases specified in the Free License, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
44
44
 
45
45
  Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
46
46
 
47
47
  ### FAQs
48
48
 
49
- Are you not sure whether you need a company license because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
49
+ Are you not sure whether you need a Company License because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
@@ -25,14 +25,14 @@ const FiberFrameInvalidator = () => {
25
25
  }, [frame, invalidate]);
26
26
  return null;
27
27
  };
28
- const { isRendering } = (0, remotion_1.getRemotionEnvironment)();
29
- // https://r3f.docs.pmnd.rs/advanced/scaling-performance#on-demand-rendering
30
- const shouldUseFrameloopDemand = isRendering;
31
28
  /*
32
29
  * @description A wrapper for React Three Fiber's <Canvas /> which synchronizes with Remotion's useCurrentFrame().
33
30
  * @see [Documentation](https://www.remotion.dev/docs/three-canvas)
34
31
  */
35
32
  const ThreeCanvas = (props) => {
33
+ const { isRendering } = (0, remotion_1.useRemotionEnvironment)();
34
+ // https://r3f.docs.pmnd.rs/advanced/scaling-performance#on-demand-rendering
35
+ const shouldUseFrameloopDemand = isRendering;
36
36
  const { children, width, height, style, onCreated, ...rest } = props;
37
37
  const [waitForCreated] = (0, react_1.useState)(() => (0, remotion_1.delayRender)('Waiting for <ThreeCanvas/> to be created'));
38
38
  (0, validate_1.validateDimension)(width, 'width', 'of the <ThreeCanvas /> component');
@@ -109,9 +109,10 @@ function useOffthreadVideoTexture({ src, playbackRate = 1, transparent = false,
109
109
  if (!src) {
110
110
  throw new Error('src must be provided to useOffthreadVideoTexture');
111
111
  }
112
- const { isRendering } = (0, remotion_1.getRemotionEnvironment)();
112
+ const env = (0, remotion_1.useRemotionEnvironment)();
113
+ const { isRendering } = env;
113
114
  if (!isRendering) {
114
- throw new Error('useOffthreadVideoTexture() can only be used during rendering. Use getRemotionEnvironment().isRendering to render it conditionally.');
115
+ throw new Error('useOffthreadVideoTexture() can only be used during rendering. Use useRemotionEnvironment().isRendering to render it conditionally.');
115
116
  }
116
117
  return (0, exports.useInnerVideoTexture)({
117
118
  playbackRate,
@@ -29,8 +29,8 @@ import {
29
29
  Internals,
30
30
  continueRender as continueRender2,
31
31
  delayRender as delayRender2,
32
- getRemotionEnvironment,
33
- useCurrentFrame
32
+ useCurrentFrame,
33
+ useRemotionEnvironment
34
34
  } from "remotion";
35
35
 
36
36
  // src/SuspenseLoader.tsx
@@ -82,9 +82,9 @@ var FiberFrameInvalidator = () => {
82
82
  }, [frame, invalidate]);
83
83
  return null;
84
84
  };
85
- var { isRendering } = getRemotionEnvironment();
86
- var shouldUseFrameloopDemand = isRendering;
87
85
  var ThreeCanvas = (props) => {
86
+ const { isRendering } = useRemotionEnvironment();
87
+ const shouldUseFrameloopDemand = isRendering;
88
88
  const { children, width, height, style, onCreated, ...rest } = props;
89
89
  const [waitForCreated] = useState(() => delayRender2("Waiting for <ThreeCanvas/> to be created"));
90
90
  validateDimension(width, "width", "of the <ThreeCanvas /> component");
@@ -128,8 +128,8 @@ import {
128
128
  cancelRender,
129
129
  continueRender as continueRender3,
130
130
  delayRender as delayRender3,
131
- getRemotionEnvironment as getRemotionEnvironment2,
132
131
  useCurrentFrame as useCurrentFrame2,
132
+ useRemotionEnvironment as useRemotionEnvironment2,
133
133
  useVideoConfig
134
134
  } from "remotion";
135
135
  import { NoReactInternals as NoReactInternals2 } from "remotion/no-react";
@@ -210,9 +210,10 @@ function useOffthreadVideoTexture({
210
210
  if (!src) {
211
211
  throw new Error("src must be provided to useOffthreadVideoTexture");
212
212
  }
213
- const { isRendering: isRendering2 } = getRemotionEnvironment2();
214
- if (!isRendering2) {
215
- throw new Error("useOffthreadVideoTexture() can only be used during rendering. Use getRemotionEnvironment().isRendering to render it conditionally.");
213
+ const env = useRemotionEnvironment2();
214
+ const { isRendering } = env;
215
+ if (!isRendering) {
216
+ throw new Error("useOffthreadVideoTexture() can only be used during rendering. Use useRemotionEnvironment().isRendering to render it conditionally.");
216
217
  }
217
218
  return useInnerVideoTexture({
218
219
  playbackRate,
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.340",
6
+ "version": "4.0.344",
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.340"
19
+ "remotion": "4.0.344"
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.340"
26
+ "remotion": "4.0.344"
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/eslint-config-internal": "4.0.340",
38
- "remotion": "4.0.340"
37
+ "@remotion/eslint-config-internal": "4.0.344",
38
+ "remotion": "4.0.344"
39
39
  },
40
40
  "keywords": [
41
41
  "remotion",