From 3427523bece688724afeed0a224bd9fc729db78c Mon Sep 17 00:00:00 2001 From: 0b5vr <0b5vr@0b5vr.com> Date: Thu, 15 Feb 2024 19:14:24 +0900 Subject: [PATCH] fix: Fix module and type error I had to install `types-vrmc-vrm-animation-1.0` also --- package.json | 1 + src/lib/bvh-converter/VRMAnimationExporterPlugin.ts | 3 ++- yarn.lock | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 157fe17..993b6b1 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@gltf-transform/core": "^3.4.0", "@pixiv/three-vrm": "^2.1.0", "@pixiv/three-vrm-animation": "^2.1.0", + "@pixiv/types-vrmc-vrm-animation-1.0": "^2.1.0", "@types/node": "20.2.5", "@types/react": "18.2.9", "@types/react-dom": "18.2.4", diff --git a/src/lib/bvh-converter/VRMAnimationExporterPlugin.ts b/src/lib/bvh-converter/VRMAnimationExporterPlugin.ts index 4a9add2..0482f3e 100644 --- a/src/lib/bvh-converter/VRMAnimationExporterPlugin.ts +++ b/src/lib/bvh-converter/VRMAnimationExporterPlugin.ts @@ -1,8 +1,8 @@ import * as THREE from 'three'; import { GLTFExporterPlugin, GLTFWriter } from 'three/examples/jsm/exporters/GLTFExporter'; import { GLTF as GLTFSchema } from '@gltf-transform/core'; -import { VRMCVRMAnimation } from '../VRMAnimation/VRMCVRMAnimation'; import { VRMHumanBoneName } from '@pixiv/three-vrm'; +import { VRMCVRMAnimation } from '@pixiv/types-vrmc-vrm-animation-1.0'; const EXTENSION_NAME = 'VRMC_vrm_animation'; @@ -39,6 +39,7 @@ export class VRMAnimationExporterPlugin implements GLTFExporterPlugin { const extension: VRMCVRMAnimation = { specVersion: '1.0', + // @ts-expect-error: will fix the three-vrm side later humanoid, }; diff --git a/yarn.lock b/yarn.lock index 0ebcaa7..9800a26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -595,7 +595,7 @@ resolved "https://registry.yarnpkg.com/@pixiv/types-vrmc-vrm-1.0/-/types-vrmc-vrm-1.0-2.1.0.tgz#60400a2d7a93ea159bbd1b09c8bfc9da082fff81" integrity sha512-fanxk+/M2h9ErUhqc1dyfyhPnT5RNcpI0++y6cfTZcqb3EiZFhijG4C4QptjelLJSn3wDWr6pvzotTxLAew5ug== -"@pixiv/types-vrmc-vrm-animation-1.0@2.1.0": +"@pixiv/types-vrmc-vrm-animation-1.0@2.1.0", "@pixiv/types-vrmc-vrm-animation-1.0@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@pixiv/types-vrmc-vrm-animation-1.0/-/types-vrmc-vrm-animation-1.0-2.1.0.tgz#cc0be2b4a57d7208ed79b78fafa5d9a017b6e8b4" integrity sha512-pYc9ZQf4kX2CeOFiOvbGL0KZcSQti2XDg+c7W8dVrbjBYM/JSNnn8VgFQrD8SSsu3xlwvWeA6BUnf4BIZHU80A==