Skip to content

Commit

Permalink
deps: Bump @types/three to r168
Browse files Browse the repository at this point in the history
Update type definition of `FnCompat` according the latest `@types/three`
  • Loading branch information
0b5vr committed Sep 5, 2024
1 parent 4277f3e commit cebaa7b
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/three-vrm-animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@pixiv/types-vrmc-vrm-animation-1.0": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"lint-staged": "15.2.9",
"three": "^0.168.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@pixiv/types-vrmc-vrm-1.0": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"three": "^0.168.0"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@pixiv/types-vrmc-materials-hdr-emissive-multiplier-1.0": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"three": "^0.168.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-materials-mtoon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@pixiv/types-vrmc-materials-mtoon-1.0": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"three": "^0.168.0"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import * as THREE from 'three/webgpu';
* See: https://github.com/mrdoob/three.js/pull/29064
*/
// eslint-disable-next-line @typescript-eslint/naming-convention
export const FnCompat: typeof THREE.tslFn = (jsFunc: any) => {
export const FnCompat: typeof THREE.Fn = (jsFunc: any) => {
// COMPAT r168: `tslFn()` has been renamed to `Fn()`
// See: https://github.com/mrdoob/three.js/pull/29064
const threeRevision = parseInt(THREE.REVISION, 10);
if (threeRevision >= 168) {
return (THREE as any).Fn(jsFunc);
return THREE.Fn(jsFunc);
} else {
return (THREE as any).tslFn(jsFunc);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-materials-v0compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@pixiv/types-vrmc-materials-mtoon-1.0": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"three": "^0.168.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-node-constraint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@pixiv/types-vrmc-node-constraint-1.0": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"three": "^0.168.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-springbone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@pixiv/types-vrmc-springbone-extended-collider-1.0": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"three": "^0.168.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@pixiv/three-vrm-springbone": "3.1.0"
},
"devDependencies": {
"@types/three": "^0.167.0",
"@types/three": "^0.168.0",
"three": "^0.168.0"
},
"peerDependencies": {
Expand Down
18 changes: 12 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@
"@tufjs/canonical-json" "2.0.0"
minimatch "^9.0.4"

"@tweenjs/tween.js@~23.1.2":
"@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==
Expand Down Expand Up @@ -1617,14 +1617,15 @@
resolved "https://registry.yarnpkg.com/@types/stats.js/-/stats.js-0.17.0.tgz#0ed81d48e03b590c24da85540c1d952077a9fe20"
integrity sha512-9w+a7bR8PeB0dCT/HBULU2fMqf6BAzvKbxFboYhmDtDkKPiyXYbjoe2auwsXlEFI7CFNMF1dCv3dFH5Poy9R1w==

"@types/three@^0.167.0":
version "0.167.0"
resolved "https://registry.yarnpkg.com/@types/three/-/three-0.167.0.tgz#bd15122d8ef4770571dc02a922b6f9397b54b02e"
integrity sha512-BC+Vbm0d6yMzct7dhTBe9ZjEh6ygupyn1k/UcZncIIS/5aNIbfvF77gQw1IFP09Oyj1UxWj0EUBBqc1GkqzsOw==
"@types/three@^0.168.0":
version "0.168.0"
resolved "https://registry.yarnpkg.com/@types/three/-/three-0.168.0.tgz#510420c4bbee7937bbbcdfbc5dc31160771eaef8"
integrity sha512-qAGLGzbaYgkkonOBfwOr+TZpOskPfFjrDAj801WQSVkUz0/D9zwir4vhruJ/CC/GteywzR9pqeVVfs5th/2oKw==
dependencies:
"@tweenjs/tween.js" "~23.1.2"
"@tweenjs/tween.js" "~23.1.3"
"@types/stats.js" "*"
"@types/webxr" "*"
"@webgpu/types" "*"
fflate "~0.8.2"
meshoptimizer "~0.18.1"

Expand Down Expand Up @@ -1766,6 +1767,11 @@
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==

"@webgpu/types@*":
version "0.1.44"
resolved "https://registry.yarnpkg.com/@webgpu/types/-/types-0.1.44.tgz#1b264c0bfcb298df59d0943dad8ef02b4ff98d14"
integrity sha512-JDpYJN5E/asw84LTYhKyvPpxGnD+bAKPtpW9Ilurf7cZpxaTbxkQcGwOd7jgB9BPBrTYQ+32ufo4HiuomTjHNQ==

"@yarnpkg/lockfile@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
Expand Down

0 comments on commit cebaa7b

Please sign in to comment.