Import a 3D Model and automatically assign and export animations
TypeScript
Adding rig config and setup files for horse for testing
Scott Petrovicbce8db67b44c
diff --git a/src/lib/RigConfig.ts b/src/lib/RigConfig.tsindex 7ae660b..ad8b6ac 100644--- a/src/lib/RigConfig.ts+++ b/src/lib/RigConfig.ts@@ -1,5 +1,6 @@import { SkeletonType } from './enums/SkeletonType'-import { humanVariations, foxVariations, birdVariations, kaijuVariations, fishVariations, ModelVariation } from './RigModelVariations'+import { humanVariations, foxVariations, birdVariations, kaijuVariations,+ fishVariations, ModelVariation } from './RigModelVariations'export interface RigConfigEntry {skeleton_type: SkeletonType // The SkeletonType enum member for this rig@@ -107,6 +108,16 @@ export class RigConfig {position_tracking_bone_name: 'pelvis',skeleton_template_image_url: 'rigs/reference/shark.png',model_variations: fishVariations+ } satisfies RigConfigEntry,+ {+ skeleton_type: SkeletonType.Horse,+ model_file: 'models/model-horse.glb',+ rig_file: 'rigs/rig-horse.glb',+ rig_display_name: 'Horse',+ animation_files: ['../animations/horse-animations.glb'],+ animation_preview_folder: 'horse',+ position_tracking_bone_name: 'hips',+ skeleton_template_image_url: 'rigs/reference/horse.png',} satisfies RigConfigEntry]diff --git a/src/lib/enums/SkeletonType.ts b/src/lib/enums/SkeletonType.tsindex cc85a6b..e1eef99 100644--- a/src/lib/enums/SkeletonType.ts+++ b/src/lib/enums/SkeletonType.ts@@ -8,6 +8,7 @@ export enum SkeletonType {Spider = 'spider',Snake = 'snake',Fish = 'fish',+ Horse = 'horse',Error = 'error',None = 'none'}diff --git a/static/animations/horse-animations.glb b/static/animations/horse-animations.glbnew file mode 100644index 0000000..e65d465Binary files /dev/null and b/static/animations/horse-animations.glb differdiff --git a/static/models/model-horse.glb b/static/models/model-horse.glbnew file mode 100644index 0000000..6f7e045Binary files /dev/null and b/static/models/model-horse.glb differdiff --git a/static/rigs/rig-horse.glb b/static/rigs/rig-horse.glbnew file mode 100644index 0000000..775b74eBinary files /dev/null and b/static/rigs/rig-horse.glb differ