Skip to content

🎥 Make videos programmatically with React

three texture

Jonny Burger2bfe282f792a
diff --git a/packages/example/package.json b/packages/example/package.json
index 5b1d6f18ac..0bde1fa631 100644
--- a/packages/example/package.json
+++ b/packages/example/package.json
@@ -67,7 +67,7 @@
"@types/hls.js": "^0.13.3",
"@types/opentype.js": "^1.3.4",
"@types/styled-components": "5.1.34",
- "@types/three": "0.157.2",
+ "@types/three": "0.170.0",
"@types/web": "0.0.166",
"babel-loader": "^8.2.2",
"dotenv": "9.0.2",
diff --git a/packages/three/src/use-offthread-video-texture.ts b/packages/three/src/use-offthread-video-texture.ts
index f48f030e6b..7e67bf973d 100644
--- a/packages/three/src/use-offthread-video-texture.ts
+++ b/packages/three/src/use-offthread-video-texture.ts
@@ -9,6 +9,7 @@ import {
useVideoConfig,
} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
+import type {Texture} from 'three';
export type UseOffthreadVideoTextureOptions = {
src: string;
@@ -55,12 +56,12 @@ export const useInnerVideoTexture = ({
() => import('three/src/loaders/TextureLoader.js'),
);
- const [imageTexture, setImageTexture] = useState<THREE.Texture | null>(null);
+ const [imageTexture, setImageTexture] = useState<Texture | null>(null);
const fetchTexture = useCallback(() => {
const imageTextureHandle = delayRender('fetch offthread video frame');
- let textureLoaded: THREE.Texture | null = null;
+ let textureLoaded: Texture | null = null;
let cleanedUp = false;
textLoaderPromise.then((loader) => {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index afbfb0ee4c..54507e9c7b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -919,7 +919,7 @@ importers:
version: 2.3.0([email protected])
'@react-three/drei':
specifier: 9.120.0
'@react-three/fiber':
specifier: 9.0.0-rc.1
@@ -1032,8 +1032,8 @@ importers:
specifier: 5.1.34
version: 5.1.34
'@types/three':
- specifier: 0.157.2
- version: 0.157.2
+ specifier: 0.170.0
+ version: 0.170.0
'@types/web':
specifier: 0.0.166
version: 0.0.166
@@ -11511,7 +11511,7 @@ packages:
resolution: {integrity: sha512-HVj7LrZ4ReHWBimBvu2SKND3cDVUPWKLqRTmWe/fNY6o1owGOX0cAHbdPDTMelgBlVbrTKrre6lFkhqGZErK/g==}
dev: false
resolution: {integrity: sha512-RAZxvEACy9QXPs1gHOXuosZYqN8CY5bVBTpiqz7i52YH0w5YgF+cvvoMtK/fS06vaBNZTu/D84K6c+oM75ptaQ==}
peerDependencies:
'@react-three/fiber': '>=8.0'
@@ -11533,12 +11533,12 @@ packages:
detect-gpu: 5.0.59
glsl-noise: 0.0.0
hls.js: 1.5.17
- maath: 0.10.8(@types/[email protected])([email protected])
+ maath: 0.10.8(@types/[email protected])([email protected])
meshline: 3.3.1([email protected])
react: 19.0.0
react-composer: 5.0.3([email protected])
react-dom: 19.0.0([email protected])
- stats-gl: 2.4.2(@types/[email protected])([email protected])
+ stats-gl: 2.4.2(@types/[email protected])([email protected])
stats.js: 0.17.0
suspend-react: 0.1.3([email protected])
three: 0.171.0
@@ -13739,7 +13739,6 @@ packages:
/@tweenjs/[email protected]:
resolution: {integrity: sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==}
- dev: true
resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==}
@@ -14308,15 +14307,6 @@ packages:
'@types/node': 18.14.6
dev: true
- resolution: {integrity: sha512-2kykrMgvO5LTAiahadM6ijoER+GcbEJ61pQVOyGxIJTCASoUnzwJvfhilsLxvEw4+glzhLYUDvvTvNjx+58Vzw==}
- dependencies:
- '@types/stats.js': 0.17.0
- '@types/webxr': 0.5.2
- fflate: 0.6.10
- meshoptimizer: 0.18.1
- dev: false
-
resolution: {integrity: sha512-CUm2uckq+zkCY7ZbFpviRttY+6f9fvwm6YqSqPfA5K22s9w7R4VnA3rzJse8kHVvuzLcTx+CjNCs2NYe0QFAyg==}
dependencies:
@@ -14326,7 +14316,6 @@ packages:
'@webgpu/types': 0.1.21
fflate: 0.8.2
meshoptimizer: 0.18.1
- dev: true
resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
@@ -19537,7 +19526,6 @@ packages:
resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==}
- dev: true
resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
@@ -22080,13 +22068,13 @@ packages:
hasBin: true
dev: true
resolution: {integrity: sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==}
peerDependencies:
'@types/three': '>=0.134.0'
three: '>=0.134.0'
dependencies:
- '@types/three': 0.157.2
+ '@types/three': 0.170.0
three: 0.171.0
dev: false
@@ -27326,13 +27314,13 @@ packages:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
resolution: {integrity: sha512-g5O9B0hm9CvnM36+v7SFl39T7hmAlv541tU81ME8YeSb3i1CIP5/QdDeSB3A0la0bKNHpxpwxOVRo2wFTYEosQ==}
peerDependencies:
'@types/three': '*'
three: '*'
dependencies:
- '@types/three': 0.157.2
+ '@types/three': 0.170.0
three: 0.171.0
dev: false