diff --git a/src/viser/client/package.json b/src/viser/client/package.json
index 40538ff6..5055c305 100644
--- a/src/viser/client/package.json
+++ b/src/viser/client/package.json
@@ -18,7 +18,7 @@
"@types/node": "^20.11.30",
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
- "@types/three": "^0.167.0",
+ "@types/three": "0.170.0",
"@vanilla-extract/css": "^1.14.1",
"@vitejs/plugin-react": "^4.0.1",
"await-lock": "^2.2.2",
@@ -41,7 +41,7 @@
"react-router-dom": "^6.10.0",
"rehype-color-chips": "^0.1.3",
"remark-gfm": "^4.0.0",
- "three": "0.167.0",
+ "three": "0.170.0",
"vite": "^5.2.6",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.2.0",
diff --git a/src/viser/client/src/App.tsx b/src/viser/client/src/App.tsx
index 61719689..717de5cb 100644
--- a/src/viser/client/src/App.tsx
+++ b/src/viser/client/src/App.tsx
@@ -565,17 +565,17 @@ function DefaultLights() {
if (enableDefaultLights)
return (
<>
- {envMapNode}
+ {envMapNode}
>
);
else return envMapNode;
diff --git a/src/viser/client/src/ThreeAssets.tsx b/src/viser/client/src/ThreeAssets.tsx
index be20cdfc..ddf84aa1 100644
--- a/src/viser/client/src/ThreeAssets.tsx
+++ b/src/viser/client/src/ThreeAssets.tsx
@@ -419,17 +419,10 @@ export const ViserMesh = React.forwardRef<
const generateGradientMap = (shades: 3 | 5) => {
const texture = new THREE.DataTexture(
- Uint8Array.from(
- shades == 3
- ? [0, 0, 0, 255, 128, 128, 128, 255, 255, 255, 255, 255]
- : [
- 0, 0, 0, 255, 64, 64, 64, 255, 128, 128, 128, 255, 192, 192, 192,
- 255, 255, 255, 255, 255,
- ],
- ),
+ Uint8Array.from(shades == 3 ? [0, 128, 255] : [0, 64, 128, 192, 255]),
shades,
1,
- THREE.RGBAFormat,
+ THREE.RedFormat,
);
texture.needsUpdate = true;
@@ -473,6 +466,7 @@ export const ViserMesh = React.forwardRef<
...standardArgs,
})
: assertUnreachable(message.props.material);
+ console.log(material);
const geometry = new THREE.BufferGeometry();
geometry.setAttribute(
"position",
diff --git a/src/viser/client/yarn.lock b/src/viser/client/yarn.lock
index df49a0ef..cdc929d9 100644
--- a/src/viser/client/yarn.lock
+++ b/src/viser/client/yarn.lock
@@ -999,7 +999,7 @@
resolved "https://registry.yarnpkg.com/@tanstack/virtual-core/-/virtual-core-3.8.3.tgz#9db61ab2a96e43d9e035b1cfd82eeede6d52f171"
integrity sha512-vd2A2TnM5lbnWZnHi9B+L2gPtkSeOtJOAw358JqokIH1+v2J7vUAzFVPwB/wrye12RFOurffXu33plm4uQ+JBQ==
-"@tweenjs/tween.js@~23.1.1", "@tweenjs/tween.js@~23.1.2":
+"@tweenjs/tween.js@~23.1.1", "@tweenjs/tween.js@~23.1.3":
version "23.1.3"
resolved "https://registry.yarnpkg.com/@tweenjs/tween.js/-/tween.js-23.1.3.tgz#eff0245735c04a928bb19c026b58c2a56460539d"
integrity sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==
@@ -1180,23 +1180,24 @@
resolved "https://registry.yarnpkg.com/@types/stats.js/-/stats.js-0.17.3.tgz#705446e12ce0fad618557dd88236f51148b7a935"
integrity sha512-pXNfAD3KHOdif9EQXZ9deK82HVNaXP5ZIF5RP2QG6OQFNTaY2YIetfrE9t528vEreGQvEPRDDc8muaoYeK0SxQ==
-"@types/three@^0.163.0":
- version "0.163.0"
- resolved "https://registry.yarnpkg.com/@types/three/-/three-0.163.0.tgz#96f5440fcd39452d2c84dfe0c9b7a9cf0247b9e6"
- integrity sha512-uIdDhsXRpQiBUkflBS/i1l3JX14fW6Ot9csed60nfbZNXHDTRsnV2xnTVwXcgbvTiboAR4IW+t+lTL5f1rqIqA==
+"@types/three@0.170.0":
+ version "0.170.0"
+ resolved "https://registry.yarnpkg.com/@types/three/-/three-0.170.0.tgz#1fe17693e4e08dd6fd8662542af4c9cba9671620"
+ integrity sha512-CUm2uckq+zkCY7ZbFpviRttY+6f9fvwm6YqSqPfA5K22s9w7R4VnA3rzJse8kHVvuzLcTx+CjNCs2NYe0QFAyg==
dependencies:
- "@tweenjs/tween.js" "~23.1.1"
+ "@tweenjs/tween.js" "~23.1.3"
"@types/stats.js" "*"
"@types/webxr" "*"
+ "@webgpu/types" "*"
fflate "~0.8.2"
meshoptimizer "~0.18.1"
-"@types/three@^0.167.0":
- version "0.167.2"
- resolved "https://registry.yarnpkg.com/@types/three/-/three-0.167.2.tgz#51d12194fdf96ac228f91037a30cd4afb6e49978"
- integrity sha512-onxnIUNYpXcZJ5DTiIsxfnr4F9kAWkkxAUWx5yqzz/u0a4IygCLCjMuOl2DEeCxyJdJ2nOJZvKpu48sBMqfmkQ==
+"@types/three@^0.163.0":
+ version "0.163.0"
+ resolved "https://registry.yarnpkg.com/@types/three/-/three-0.163.0.tgz#96f5440fcd39452d2c84dfe0c9b7a9cf0247b9e6"
+ integrity sha512-uIdDhsXRpQiBUkflBS/i1l3JX14fW6Ot9csed60nfbZNXHDTRsnV2xnTVwXcgbvTiboAR4IW+t+lTL5f1rqIqA==
dependencies:
- "@tweenjs/tween.js" "~23.1.2"
+ "@tweenjs/tween.js" "~23.1.1"
"@types/stats.js" "*"
"@types/webxr" "*"
fflate "~0.8.2"
@@ -1391,6 +1392,11 @@
"@types/babel__core" "^7.20.5"
react-refresh "^0.14.2"
+"@webgpu/types@*":
+ version "0.1.51"
+ resolved "https://registry.yarnpkg.com/@webgpu/types/-/types-0.1.51.tgz#a4c5a12d0554032bb3cdfad632123e736b9de943"
+ integrity sha512-ktR3u64NPjwIViNCck+z9QeyN0iPkQCUOQ07ZCV1RzlkfP+olLTeEZ95O1QHS+v4w9vJeY9xj/uJuSphsHy5rQ==
+
acorn-jsx@^5.0.0, acorn-jsx@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
@@ -4663,10 +4669,10 @@ three-stdlib@^2.29.9:
fflate "^0.6.9"
potpack "^1.0.1"
-three@0.167.0:
- version "0.167.0"
- resolved "https://registry.yarnpkg.com/three/-/three-0.167.0.tgz#399ae7b69604c0a45b93ba3706ad8dc962056c42"
- integrity sha512-9Y1a66fpjqF3rhq7ivKTaKtjQLZ97Hj/lZ00DmZWaKHaQFH4uzYT1znwRDWQOcgMmCcOloQzo61gDmqO8l9xmA==
+three@0.170.0:
+ version "0.170.0"
+ resolved "https://registry.yarnpkg.com/three/-/three-0.170.0.tgz#6087f97aab79e9e9312f9c89fcef6808642dfbb7"
+ integrity sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ==
to-fast-properties@^2.0.0:
version "2.0.0"