feat: update attire model loading strategy to improve initial load performance

This commit is contained in:
Najjar\NajjarV02 2026-04-17 15:13:42 +04:00
parent 9b8a50672e
commit ed6ebcc8af

View File

@ -13,8 +13,7 @@ const STATIC_ATTIRE_GLB: Record<string, string> = {
'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<string, string> {