@aura3d/animation 1.3.3 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +36 -3
- package/src/AnimationAction.ts +0 -166
- package/src/AnimationClip.ts +0 -63
- package/src/AnimationClipEvents.ts +0 -501
- package/src/AnimationClipRegistry.ts +0 -404
- package/src/AnimationController.ts +0 -1017
- package/src/AnimationEvents.ts +0 -34
- package/src/AnimationLayer.ts +0 -73
- package/src/AnimationMixer.ts +0 -402
- package/src/AnimationStateGraph.ts +0 -105
- package/src/AnimationStateMachine.ts +0 -265
- package/src/AnimationTrack.ts +0 -176
- package/src/BlendTree.ts +0 -89
- package/src/Bone.ts +0 -40
- package/src/CrowdAnimation.ts +0 -25
- package/src/ECSAnimationBridge.ts +0 -30
- package/src/FighterAnimationAdapter.ts +0 -124
- package/src/FootIk.ts +0 -251
- package/src/HumanoidBoneInference.ts +0 -323
- package/src/HumanoidRetargeting.ts +0 -700
- package/src/IK.ts +0 -117
- package/src/Inertialization.ts +0 -269
- package/src/Keyframe.ts +0 -159
- package/src/LocomotionController.ts +0 -155
- package/src/LocomotionKit.ts +0 -89
- package/src/MotionMatchingFixtures.ts +0 -254
- package/src/MotionQuality.ts +0 -182
- package/src/RigQuality.ts +0 -101
- package/src/RootMotion.ts +0 -124
- package/src/SceneAnimationBridge.ts +0 -80
- package/src/SecondaryAnimationFixtures.ts +0 -210
- package/src/Skeleton.ts +0 -78
- package/src/Skinning.ts +0 -18
- package/src/SpringBones.ts +0 -243
- package/src/browser-index.ts +0 -66
- package/src/index.ts +0 -66
- package/src/library/performanceStateGraph.ts +0 -173
- package/src/library/standardHumanoidClips.ts +0 -659
- package/src/threejs-compatibility/AnimationAction.ts +0 -27
- package/src/threejs-compatibility/AnimationClip.ts +0 -16
- package/src/threejs-compatibility/AnimationDiagnostics.ts +0 -42
- package/src/threejs-compatibility/AnimationMixer.ts +0 -24
- package/src/threejs-compatibility/MorphTargetMixer.ts +0 -16
- package/src/threejs-compatibility/Skeleton.ts +0 -9
- package/src/threejs-compatibility/SkinnedMesh.ts +0 -12
- package/src/threejs-compatibility/index.ts +0 -11
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { AnimationMixerThreeCompat } from "./AnimationMixer";
|
|
2
|
-
import type { MorphTargetMixerThreeCompat } from "./MorphTargetMixer";
|
|
3
|
-
import type { SkinnedMeshThreeCompat } from "./SkinnedMesh";
|
|
4
|
-
|
|
5
|
-
export interface ThreeCompatAnimatedAssetDiagnostic {
|
|
6
|
-
readonly id: string;
|
|
7
|
-
readonly path: string;
|
|
8
|
-
readonly loaded: boolean;
|
|
9
|
-
readonly bytes: number;
|
|
10
|
-
readonly capabilities: readonly string[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const THREE_COMPAT_ANIMATED_GLTF_ASSETS = [
|
|
14
|
-
{ id: "cesium-man", path: "fixtures/three-compat/assets/corpus/cesium-man.glb", capabilities: ["skinning", "animation"] },
|
|
15
|
-
{ id: "animated-colors-cube", path: "fixtures/three-compat/assets/corpus/animated-colors-cube.glb", capabilities: ["animation"] },
|
|
16
|
-
{ id: "animated-morph-cube", path: "fixtures/three-compat/assets/corpus/animated-morph-cube.glb", capabilities: ["morph-target", "animation"] },
|
|
17
|
-
{ id: "box-animated", path: "fixtures/three-compat/assets/corpus/box-animated.glb", capabilities: ["animation"] },
|
|
18
|
-
{ id: "fox", path: "tests/assets/corpus/khronos/Fox/Fox.glb", capabilities: ["skinning", "animation"] }
|
|
19
|
-
] as const;
|
|
20
|
-
|
|
21
|
-
export function inspectThreeCompatAnimatedAssets(): readonly ThreeCompatAnimatedAssetDiagnostic[] {
|
|
22
|
-
const browserRuntime = typeof globalThis.window !== "undefined" && typeof globalThis.document !== "undefined";
|
|
23
|
-
return THREE_COMPAT_ANIMATED_GLTF_ASSETS.map((asset) => {
|
|
24
|
-
const loaded = !browserRuntime;
|
|
25
|
-
return { ...asset, loaded, bytes: loaded ? 1 : 0 };
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function createThreeCompatAnimationDiagnostics(mixer: AnimationMixerThreeCompat, skinnedMesh: SkinnedMeshThreeCompat, morphs: MorphTargetMixerThreeCompat) {
|
|
30
|
-
const assets = inspectThreeCompatAnimatedAssets();
|
|
31
|
-
return {
|
|
32
|
-
loadedAnimatedAssets: assets.filter((asset) => asset.loaded).length,
|
|
33
|
-
assets,
|
|
34
|
-
actionCount: mixer.actions.length,
|
|
35
|
-
playingActionCount: mixer.actions.filter((action) => action.playing && !action.paused).length,
|
|
36
|
-
skinnedBoneCount: skinnedMesh.skeleton.boneCount,
|
|
37
|
-
morphTargetCount: morphs.getWeights().length,
|
|
38
|
-
supportsCrossfade: mixer.actions.length >= 2,
|
|
39
|
-
supportsScrub: mixer.actions.every((action) => action.time >= 0),
|
|
40
|
-
warnings: assets.filter((asset) => !asset.loaded).map((asset) => `${asset.id} missing`)
|
|
41
|
-
};
|
|
42
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AnimationActionThreeCompat } from "./AnimationAction";
|
|
2
|
-
import type { AnimationClipThreeCompat } from "./AnimationClip";
|
|
3
|
-
|
|
4
|
-
export class AnimationMixerThreeCompat {
|
|
5
|
-
readonly actions: AnimationActionThreeCompat[] = [];
|
|
6
|
-
time = 0;
|
|
7
|
-
|
|
8
|
-
clipAction(clip: AnimationClipThreeCompat): AnimationActionThreeCompat {
|
|
9
|
-
const existing = this.actions.find((action) => action.clip === clip);
|
|
10
|
-
if (existing) return existing;
|
|
11
|
-
const action = new AnimationActionThreeCompat(clip);
|
|
12
|
-
this.actions.push(action);
|
|
13
|
-
return action;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
update(deltaSeconds: number): void {
|
|
17
|
-
this.time += deltaSeconds;
|
|
18
|
-
for (const action of this.actions) {
|
|
19
|
-
if (!action.playing || action.paused) continue;
|
|
20
|
-
action.time += deltaSeconds;
|
|
21
|
-
if (action.time > action.clip.duration) action.time = action.loop === "once" ? action.clip.duration : action.time % action.clip.duration;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface ThreeCompatMorphTargetWeight {
|
|
2
|
-
readonly name: string;
|
|
3
|
-
readonly weight: number;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export class MorphTargetMixerThreeCompat {
|
|
7
|
-
private readonly weights = new Map<string, number>();
|
|
8
|
-
|
|
9
|
-
setWeight(name: string, weight: number): void {
|
|
10
|
-
this.weights.set(name, Math.max(0, Math.min(1, weight)));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
getWeights(): readonly ThreeCompatMorphTargetWeight[] {
|
|
14
|
-
return [...this.weights.entries()].map(([name, weight]) => ({ name, weight }));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { SkeletonThreeCompat } from "./Skeleton";
|
|
2
|
-
|
|
3
|
-
export class SkinnedMeshThreeCompat {
|
|
4
|
-
readonly type = "SkinnedMesh";
|
|
5
|
-
bindMatrixVersion = 1;
|
|
6
|
-
|
|
7
|
-
constructor(public readonly skeleton: SkeletonThreeCompat, public readonly geometry: unknown = null, public readonly material: unknown = null) {}
|
|
8
|
-
|
|
9
|
-
pose(): void {
|
|
10
|
-
this.bindMatrixVersion += 1;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { AnimationClipThreeCompat } from "./AnimationClip";
|
|
2
|
-
export type { ThreeCompatKeyframeTrack, ThreeCompatLoopMode } from "./AnimationClip";
|
|
3
|
-
export { AnimationActionThreeCompat } from "./AnimationAction";
|
|
4
|
-
export { AnimationMixerThreeCompat } from "./AnimationMixer";
|
|
5
|
-
export { SkeletonThreeCompat } from "./Skeleton";
|
|
6
|
-
export type { ThreeCompatBone } from "./Skeleton";
|
|
7
|
-
export { SkinnedMeshThreeCompat } from "./SkinnedMesh";
|
|
8
|
-
export { MorphTargetMixerThreeCompat } from "./MorphTargetMixer";
|
|
9
|
-
export type { ThreeCompatMorphTargetWeight } from "./MorphTargetMixer";
|
|
10
|
-
export { createThreeCompatAnimationDiagnostics, inspectThreeCompatAnimatedAssets, THREE_COMPAT_ANIMATED_GLTF_ASSETS } from "./AnimationDiagnostics";
|
|
11
|
-
export type { ThreeCompatAnimatedAssetDiagnostic } from "./AnimationDiagnostics";
|