Skip to content

Commit

Permalink
r152
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Nov 4, 2024
1 parent 63c331f commit 1a1755a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"@storybook/theming": "^8.4.1",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/three": "^0.151.0",
"@types/three": "^0.152.0",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"@vitejs/plugin-react": "^4.3.3",
Expand Down Expand Up @@ -129,7 +129,7 @@
"semantic-release": "^24.2.0",
"serve": "^14.2.4",
"storybook": "^8.4.1",
"three": "^0.151.0",
"three": "^0.152.0",
"ts-node": "^10.9.2",
"typescript": "^5.6.3",
"vite": "^5.4.10",
Expand Down
7 changes: 5 additions & 2 deletions src/core/VideoTexture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ export function useVideoTexture(

const texture = new THREE.VideoTexture(video)

if ('colorSpace' in texture) (texture as any).colorSpace = (gl as any).outputColorSpace
else texture.encoding = gl.outputEncoding
if ('colorSpace' in texture) {
texture.colorSpace = gl.outputColorSpace // r152+
} else {
;(texture as any).encoding = gl.outputEncoding // r151-
}

video.addEventListener(unsuspend, () => res(texture))
}),
Expand Down
28 changes: 18 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2820,7 +2820,7 @@ __metadata:
"@storybook/theming": "npm:^8.4.1"
"@types/react": "npm:^18.0.0"
"@types/react-dom": "npm:^18.0.0"
"@types/three": "npm:^0.151.0"
"@types/three": "npm:^0.152.0"
"@typescript-eslint/eslint-plugin": "npm:^8.12.2"
"@typescript-eslint/parser": "npm:^8.12.2"
"@use-gesture/react": "npm:^10.3.1"
Expand Down Expand Up @@ -2860,7 +2860,7 @@ __metadata:
stats.js: "npm:^0.17.0"
storybook: "npm:^8.4.1"
suspend-react: "npm:^0.1.3"
three: "npm:^0.151.0"
three: "npm:^0.152.0"
three-mesh-bvh: "npm:^0.7.8"
three-stdlib: "npm:^2.33.0"
troika-three-text: "npm:^0.50.2"
Expand Down Expand Up @@ -3711,6 +3711,13 @@ __metadata:
languageName: node
linkType: hard

"@tweenjs/tween.js@npm:~18.6.4":
version: 18.6.4
resolution: "@tweenjs/tween.js@npm:18.6.4"
checksum: 10c0/4fc9be51e2d48f1900b62acffbcf0dbe9d4b214a0cde06e6d2482695e8121ba80b066e20fc302bd14ef3ce1eb6e6aa6e7e27fd27d6ceed6589ce44b62b0d6e41
languageName: node
linkType: hard

"@tweenjs/tween.js@npm:~23.1.1":
version: 23.1.3
resolution: "@tweenjs/tween.js@npm:23.1.3"
Expand Down Expand Up @@ -3953,15 +3960,16 @@ __metadata:
languageName: node
linkType: hard

"@types/three@npm:^0.151.0":
version: 0.151.0
resolution: "@types/three@npm:0.151.0"
"@types/three@npm:^0.152.0":
version: 0.152.1
resolution: "@types/three@npm:0.152.1"
dependencies:
"@tweenjs/tween.js": "npm:~18.6.4"
"@types/stats.js": "npm:*"
"@types/webxr": "npm:*"
fflate: "npm:~0.6.9"
lil-gui: "npm:~0.17.0"
checksum: 10c0/0a43947a7b0dbdeef6372091fe612c0f66678950aa735f8f806dec314f9ab5403ab412d47c4a4ab501caa9e8b9493d64c65f7fe8bfacffa91844238ce7fba8dc
checksum: 10c0/26822c66b2cc2faa199b5f40979d9c9478679db5bcc6e5d42c9a85d74b5208a92f9fac599fe2edad3a366f7fa98e6461af84132aead23adc9544aad6342429ef
languageName: node
linkType: hard

Expand Down Expand Up @@ -12257,10 +12265,10 @@ __metadata:
languageName: node
linkType: hard

"three@npm:^0.151.0":
version: 0.151.3
resolution: "three@npm:0.151.3"
checksum: 10c0/892d2addd439e500b37669a86368c09a0a71dc404868b0347d48b5606ebd3264d2e9cce3cb85bc9ac83dc5cac8cc718ed0e9ef7cd22cad9f1233ea4c32108255
"three@npm:^0.152.0":
version: 0.152.2
resolution: "three@npm:0.152.2"
checksum: 10c0/955948d241cf1770216eb30e419196124c1ae3aa4b76eb232b0de7795797b1ab0f6de91aa8f38b0ff780b21e4bb8fced0e6613862cb68b237330caccef7e4d11
languageName: node
linkType: hard

Expand Down

0 comments on commit 1a1755a

Please sign in to comment.