Import a 3D Model and automatically assign and export animations
TypeScript
if no scaling of skeleton, just return the skeleton
Scott Petrovica54aa829102c
diff --git a/src/lib/processes/load-skeleton/StepLoadSkeleton.ts b/src/lib/processes/load-skeleton/StepLoadSkeleton.tsindex 31549fd..af62fe9 100644--- a/src/lib/processes/load-skeleton/StepLoadSkeleton.ts+++ b/src/lib/processes/load-skeleton/StepLoadSkeleton.ts@@ -234,7 +234,7 @@ export class StepLoadSkeleton extends EventTarget {// update all positions for bones and resets scale to 1private bake_scale_for_armature (armature: Object3D): Object3D {const scale = armature.scale.x // assumes uniform scale- if (scale === 1) return;+ if (scale === 1) return armature.clone() // no changes. just return existing skeletonconst cloned_armature: Object3D = armature.clone()cloned_armature.traverse((obj) => {