Skip to content

Commit

Permalink
fix: fix build errors of three-vrm-animation
Browse files Browse the repository at this point in the history
- test job should not call jest since there is no test
- it's dependant of `@pixiv/three-vrm-core`
  • Loading branch information
0b5vr committed Sep 15, 2023
1 parent b74e8c2 commit a883536
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 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 @@ -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"
Expand All @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/three-vrm-animation/src/VRMAnimation.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
3 changes: 2 additions & 1 deletion packages/three-vrm-animation/src/VRMAnimationLoaderPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
10 changes: 5 additions & 5 deletions packages/three-vrm-animation/src/createVRMAnimationClip.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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));
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a883536

Please sign in to comment.