diff --git a/package-lock.json b/package-lock.json index 170a802e59..88e7b98c42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@babel/plugin-transform-runtime": "^7.25.4", "@babel/preset-env": "^7.25.4", "@babel/register": "^7.24.6", - "@types/three": "^0.165.0", + "@types/three": "^0.168.0", "@xmldom/xmldom": "^0.9.2", "babel-inline-import-loader": "^1.0.1", "babel-loader": "^9.2.1", @@ -62,7 +62,7 @@ "q": "^1.5.1", "replace-in-file": "^8.1.0", "sinon": "^19.0.2", - "three": "^0.165.0", + "three": "^0.168.0", "typescript": "^5.6.2", "webgl-mock": "^0.1.7", "webpack": "^5.94.0", @@ -71,7 +71,7 @@ }, "peerDependencies": { "proj4": "^2.11.0", - "three": "^0.165.0" + "three": "^0.168.0" } }, "node_modules/@ampproject/remapping": { @@ -2979,14 +2979,16 @@ "license": "MIT" }, "node_modules/@types/three": { - "version": "0.165.0", - "resolved": "https://registry.npmjs.org/@types/three/-/three-0.165.0.tgz", - "integrity": "sha512-AJK8JZAFNBF0kBXiAIl5pggYlzAGGA8geVYQXAcPCEDRbyA+oEjkpUBcJJrtNz6IiALwzGexFJGZG2yV3WsYBw==", + "version": "0.168.0", + "resolved": "https://registry.npmjs.org/@types/three/-/three-0.168.0.tgz", + "integrity": "sha512-qAGLGzbaYgkkonOBfwOr+TZpOskPfFjrDAj801WQSVkUz0/D9zwir4vhruJ/CC/GteywzR9pqeVVfs5th/2oKw==", "dev": true, + "license": "MIT", "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" } @@ -3210,6 +3212,13 @@ "@xtuc/long": "4.2.2" } }, + "node_modules/@webgpu/types": { + "version": "0.1.45", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.45.tgz", + "integrity": "sha512-0TBBF/mhakJoK0qUWCZugBnh23x+VwmYA5RLmtNQwvZt1pQ4P2fzIvQUiSe6jxzkBi4GF8R4BejJjro0ZSoSXQ==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/@webpack-cli/configtest": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", @@ -12471,9 +12480,10 @@ } }, "node_modules/three": { - "version": "0.165.0", - "resolved": "https://registry.npmjs.org/three/-/three-0.165.0.tgz", - "integrity": "sha512-cc96IlVYGydeceu0e5xq70H8/yoVT/tXBxV/W8A/U6uOq7DXc4/s1Mkmnu6SqoYGhSRWWYFOhVwvq6V0VtbplA==" + "version": "0.168.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.168.0.tgz", + "integrity": "sha512-6m6jXtDwMJEK/GGMbAOTSAmxNdzKvvBzgd7q8bE/7Tr6m7PaBh5kKLrN7faWtlglXbzj7sVba48Idwx+NRsZXw==", + "license": "MIT" }, "node_modules/through": { "version": "2.3.8", diff --git a/package.json b/package.json index a033806bf8..5bc4d04ed5 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ }, "peerDependencies": { "proj4": "^2.11.0", - "three": "^0.165.0" + "three": "^0.168.0" }, "devDependencies": { "@babel/cli": "^7.25.6", @@ -80,7 +80,7 @@ "@babel/plugin-transform-runtime": "^7.25.4", "@babel/preset-env": "^7.25.4", "@babel/register": "^7.24.6", - "@types/three": "^0.165.0", + "@types/three": "^0.168.0", "@xmldom/xmldom": "^0.9.2", "babel-inline-import-loader": "^1.0.1", "babel-loader": "^9.2.1", @@ -114,7 +114,7 @@ "q": "^1.5.1", "replace-in-file": "^8.1.0", "sinon": "^19.0.2", - "three": "^0.165.0", + "three": "^0.168.0", "typescript": "^5.6.2", "webgl-mock": "^0.1.7", "webpack": "^5.94.0", diff --git a/src/Renderer/LayeredMaterial.js b/src/Renderer/LayeredMaterial.js index 843a8a29dd..bf1d50c2bc 100644 --- a/src/Renderer/LayeredMaterial.js +++ b/src/Renderer/LayeredMaterial.js @@ -12,10 +12,11 @@ const defaultTex = new THREE.Texture(); // from three.js packDepthToRGBA const UnpackDownscale = 255 / 256; // 0..1 -> fraction (excluding 1) const bitSh = new THREE.Vector4( - UnpackDownscale / (256.0 * 256.0 * 256.0), - UnpackDownscale / (256.0 * 256.0), + UnpackDownscale, UnpackDownscale / 256.0, - UnpackDownscale); + UnpackDownscale / (256.0 * 256.0), + UnpackDownscale / (256.0 * 256.0 * 256.0), +); export function unpack1K(color, factor) { return factor ? bitSh.dot(color) * factor : bitSh.dot(color);