From 1e367303a3af5acf3282bcc660ae1488047fdc77 Mon Sep 17 00:00:00 2001 From: Marcus Longmuir Date: Fri, 1 Dec 2023 14:14:47 +0000 Subject: [PATCH] Fixed scale detection (#19) --- .../src/scene/correction-steps/fixBonesScale.ts | 4 ++-- .../src/scene/correction-steps/fixMeshScale.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/gltf-avatar-exporter/src/scene/correction-steps/fixBonesScale.ts b/tools/gltf-avatar-exporter/src/scene/correction-steps/fixBonesScale.ts index dab2894..3c31c69 100644 --- a/tools/gltf-avatar-exporter/src/scene/correction-steps/fixBonesScale.ts +++ b/tools/gltf-avatar-exporter/src/scene/correction-steps/fixBonesScale.ts @@ -18,8 +18,8 @@ export const fixBonesScaleCorrectionStep: Step = { level: "info", message: `Bones size: x: ${xBonesSize}, y: ${yBonesSize}, z: ${zBonesSize}`, }; - const bonesAre100TimesTooLarge = zBonesSize > 10 || yBonesSize > 10; - const bonesAre1000TimesTooLarge = zBonesSize > 100 || yBonesSize > 100; + const bonesAre100TimesTooLarge = zBonesSize > 100 || yBonesSize > 100; + const bonesAre1000TimesTooLarge = zBonesSize > 1000 || yBonesSize > 1000; if (!bonesAre100TimesTooLarge) { return { diff --git a/tools/gltf-avatar-exporter/src/scene/correction-steps/fixMeshScale.ts b/tools/gltf-avatar-exporter/src/scene/correction-steps/fixMeshScale.ts index 6b3a2d8..f6ecb5c 100644 --- a/tools/gltf-avatar-exporter/src/scene/correction-steps/fixMeshScale.ts +++ b/tools/gltf-avatar-exporter/src/scene/correction-steps/fixMeshScale.ts @@ -21,8 +21,8 @@ export const fixMeshScaleCorrectionStep: Step = { level: "info", message: `Bones size: x: ${xBonesSize}, y: ${yBonesSize}, z: ${zBonesSize}`, }; - const bonesAre100TimesTooLarge = zBonesSize > 10 || yBonesSize > 10; - const bonesAre1000TimesTooLarge = zBonesSize > 100 || yBonesSize > 100; + const bonesAre100TimesTooLarge = zBonesSize > 100 || yBonesSize > 100; + const bonesAre1000TimesTooLarge = zBonesSize > 1000 || yBonesSize > 1000; if (!bonesAre100TimesTooLarge) { return {