diff --git a/packages/three-vrm-animation/package.json b/packages/three-vrm-animation/package.json index d9795eddc..237e0bd33 100644 --- a/packages/three-vrm-animation/package.json +++ b/packages/three-vrm-animation/package.json @@ -34,7 +34,6 @@ "build-prod": "cross-env NODE_ENV=production rollup -c", "build-types": "tsc --declaration --declarationDir ./types --emitDeclarationOnly && downlevel-dts types ts3.4/types", "docs": "typedoc --entryPoints ./src/index.ts --out docs", - "test": "jest", "lint": "eslint \"src/**/*.{ts,tsx}\" && yarn lint-examples && prettier \"src/**/*.{ts,tsx}\" --check", "lint-examples": "eslint \"examples/**/*.{ts,tsx,js,html}\" --rule \"padded-blocks: error\"", "lint-fix": "eslint \"src/**/*.{ts,tsx}\" --fix && eslint \"examples/**/*.{ts,tsx,js,html}\" --fix && prettier \"src/**/*.{ts,tsx}\" --write" @@ -46,6 +45,7 @@ ] }, "dependencies": { + "@pixiv/three-vrm-core": "2.0.3", "@pixiv/types-vrmc-vrm-1.0": "2.0.3", "@pixiv/types-vrmc-vrm-animation-1.0": "0.0.1" }, diff --git a/packages/three-vrm-animation/src/VRMAnimation.ts b/packages/three-vrm-animation/src/VRMAnimation.ts index 551ce4433..fc7c84ebe 100644 --- a/packages/three-vrm-animation/src/VRMAnimation.ts +++ b/packages/three-vrm-animation/src/VRMAnimation.ts @@ -1,5 +1,5 @@ import * as THREE from 'three'; -import { VRMHumanBoneName } from '@pixiv/three-vrm'; +import type { VRMHumanBoneName } from '@pixiv/three-vrm-core'; // eslint-disable-next-line @typescript-eslint/no-unused-vars import type { createVRMAnimationClip } from './createVRMAnimationClip'; diff --git a/packages/three-vrm-animation/src/VRMAnimationLoaderPlugin.ts b/packages/three-vrm-animation/src/VRMAnimationLoaderPlugin.ts index cd2bef8b8..fbc89cd56 100644 --- a/packages/three-vrm-animation/src/VRMAnimationLoaderPlugin.ts +++ b/packages/three-vrm-animation/src/VRMAnimationLoaderPlugin.ts @@ -2,7 +2,8 @@ import * as THREE from 'three'; import { GLTF, GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader'; import { GLTF as GLTFSchema } from '@gltf-transform/core'; import { VRMCVRMAnimation } from '@pixiv/types-vrmc-vrm-animation-1.0'; -import { VRMHumanBoneName, VRMHumanBoneParentMap } from '@pixiv/three-vrm'; +import type { VRMHumanBoneName } from '@pixiv/three-vrm-core'; +import { VRMHumanBoneParentMap } from '@pixiv/three-vrm-core'; import { VRMAnimation } from './VRMAnimation'; import { arrayChunk } from './utils/arrayChunk'; diff --git a/packages/three-vrm-animation/src/createVRMAnimationClip.ts b/packages/three-vrm-animation/src/createVRMAnimationClip.ts index ef03c11cf..f32b569b2 100644 --- a/packages/three-vrm-animation/src/createVRMAnimationClip.ts +++ b/packages/three-vrm-animation/src/createVRMAnimationClip.ts @@ -1,6 +1,6 @@ import * as THREE from 'three'; -import { VRM, VRMExpressionManager, VRMHumanoid } from '@pixiv/three-vrm'; -import { VRMAnimation } from './VRMAnimation'; +import type { VRMCore, VRMExpressionManager, VRMHumanoid } from '@pixiv/three-vrm-core'; +import type { VRMAnimation } from './VRMAnimation'; function createHumanoidTracks( vrmAnimation: VRMAnimation, @@ -72,11 +72,11 @@ function createLookAtTrack(vrmAnimation: VRMAnimation, trackName: string): THREE /** * Create an AnimationClip out of the given VRMAnimation and the VRM. * - * @param vrmAnimation An {@link VRMAnimation}. - * @param vrm An {@link VRM}. + * @param vrmAnimation A {@link VRMAnimation}. + * @param vrm A {@link VRMCore}. * @returns An AnimationClip */ -export function createVRMAnimationClip(vrmAnimation: VRMAnimation, vrm: VRM): THREE.AnimationClip { +export function createVRMAnimationClip(vrmAnimation: VRMAnimation, vrm: VRMCore): THREE.AnimationClip { const tracks: THREE.KeyframeTrack[] = []; tracks.push(...createHumanoidTracks(vrmAnimation, vrm.humanoid, vrm.meta.metaVersion)); diff --git a/yarn.lock b/yarn.lock index 674d47d61..4f6727c9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1579,6 +1579,14 @@ dependencies: esquery "^1.0.1" +"@pixiv/three-vrm-core@2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@pixiv/three-vrm-core/-/three-vrm-core-2.0.3.tgz#f24296820b77c4c38fccd77878234a7e3c169fcb" + integrity sha512-zFJwDvmkkjkt25U42nNrDO3uKbdG/PtRRfJD7yT8ZjQqiMWVwNOodRzz3Wabrj/7hWpFhHBUm02YX+N9O3ITCA== + dependencies: + "@pixiv/types-vrm-0.0" "2.0.3" + "@pixiv/types-vrmc-vrm-1.0" "2.0.3" + "@rollup/plugin-node-resolve@^15.0.1": version "15.0.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.1.tgz#72be449b8e06f6367168d5b3cd5e2802e0248971"