Import a 3D Model and automatically assign and export animations
TypeScript
Move a few classes into the proces step folders they belong to
Scott Petrovic75c8a5ae2e0d
diff --git a/src/lib/AnimationPlayer.ts b/src/lib/processes/animations-listing/AnimationPlayer.tssimilarity index 99%rename from src/lib/AnimationPlayer.tsrename to src/lib/processes/animations-listing/AnimationPlayer.tsindex abf3bec..9d4cdfa 100644--- a/src/lib/AnimationPlayer.ts+++ b/src/lib/processes/animations-listing/AnimationPlayer.ts@@ -1,5 +1,5 @@import { type AnimationClip, type AnimationAction } from 'three'-import { UI } from './UI'+import { UI } from '../../UI'export class AnimationPlayer {private readonly ui: UIdiff --git a/src/lib/AnimationSearch.ts b/src/lib/processes/animations-listing/AnimationSearch.tssimilarity index 98%rename from src/lib/AnimationSearch.tsrename to src/lib/processes/animations-listing/AnimationSearch.tsindex af6e8b0..4d21348 100644--- a/src/lib/AnimationSearch.ts+++ b/src/lib/processes/animations-listing/AnimationSearch.ts@@ -1,6 +1,6 @@import { type AnimationClip } from 'three'-import { ThemeManager } from './ThemeManager'-import { SkeletonType } from './enums/SkeletonType'+import { type ThemeManager } from '../../ThemeManager'+import { SkeletonType } from '../../enums/SkeletonType'export interface AnimationWithState extends AnimationClip {isChecked?: booleandiff --git a/src/lib/processes/animations-listing/StepAnimationsListing.ts b/src/lib/processes/animations-listing/StepAnimationsListing.tsindex 469480c..b5f7a84 100644--- a/src/lib/processes/animations-listing/StepAnimationsListing.ts+++ b/src/lib/processes/animations-listing/StepAnimationsListing.ts@@ -1,5 +1,5 @@import { UI } from '../../UI.ts'-import { AnimationPlayer } from '../../AnimationPlayer.ts'+import { AnimationPlayer } from './AnimationPlayer.ts'import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'@@ -10,7 +10,7 @@ import { AnimationClip, AnimationMixer, Quaternion, Vector3, type SkinnedMesh, timport { SkeletonType } from '../../enums/SkeletonType.ts'import { Utility } from '../../Utilities.ts'import { type ThemeManager } from '../../ThemeManager.ts'-import { AnimationSearch, type AnimationWithState } from '../../AnimationSearch.ts'+import { AnimationSearch, type AnimationWithState } from './AnimationSearch.ts'export interface TransformedAnimationClipPair {/**diff --git a/src/lib/processes/edit-skeleton/StepEditSkeleton.ts b/src/lib/processes/edit-skeleton/StepEditSkeleton.tsindex a117b2a..c17b96b 100644--- a/src/lib/processes/edit-skeleton/StepEditSkeleton.ts+++ b/src/lib/processes/edit-skeleton/StepEditSkeleton.ts@@ -1,10 +1,9 @@import { UI } from '../../UI.ts'import { Generators } from '../../Generators.ts'import { Utility } from '../../Utilities.ts'-import { UndoRedoSystem } from '../../UndoRedoSystem.ts'+import { UndoRedoSystem } from './UndoRedoSystem.ts'import { Vector3, Euler, Object3D, Skeleton, type Scene, type Bone, BufferGeometry,- PointsMaterial, Points, Float32BufferAttribute, TextureLoader,- Raycaster, type Intersection, type Camera, SphereGeometry, MeshBasicMaterial, Mesh } from 'three'+ PointsMaterial, Points, Float32BufferAttribute, TextureLoader, type Camera } from 'three'import { SkinningFormula } from '../../enums/SkinningFormula.ts'/*diff --git a/src/lib/UndoRedoSystem.ts b/src/lib/processes/edit-skeleton/UndoRedoSystem.tssimilarity index 98%rename from src/lib/UndoRedoSystem.tsrename to src/lib/processes/edit-skeleton/UndoRedoSystem.tsindex 943224b..a69f7fb 100644--- a/src/lib/UndoRedoSystem.ts+++ b/src/lib/processes/edit-skeleton/UndoRedoSystem.ts@@ -1,6 +1,6 @@import { type Skeleton, type Bone } from 'three'-import { Utility } from './Utilities.ts'-import type BoneTransformState from './models/BoneTransformState.ts'+import { Utility } from '../../Utilities.ts'+import type BoneTransformState from '../../models/BoneTransformState.ts'/*** UndoRedoSystem