From ed6ebcc8afd4cb2ad7c9fee8c3b1e890ca00e40a Mon Sep 17 00:00:00 2001 From: "Najjar\\NajjarV02" Date: Fri, 17 Apr 2026 15:13:42 +0400 Subject: [PATCH] feat: update attire model loading strategy to improve initial load performance --- src/components/RobotModel.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/RobotModel.tsx b/src/components/RobotModel.tsx index bdf6bd4..43eb884 100644 --- a/src/components/RobotModel.tsx +++ b/src/components/RobotModel.tsx @@ -13,8 +13,7 @@ const STATIC_ATTIRE_GLB: Record = { 'business-suit': '/Suit.glb', }; -// Preload static attire models so they're cached before user clicks -Object.values(STATIC_ATTIRE_GLB).forEach((p) => useGLTF.preload(p)); +// Attire models are loaded on-demand to avoid blocking the initial 50 MB robot load /** Merge static map with any custom GLBs stored in the persona store */ function buildAttireGlbMap(personas: { id: string; modelPath?: string }[]): Record {