forked from hazem/yslootahrobotics
feat: update attire model loading strategy to improve initial load performance
This commit is contained in:
parent
9b8a50672e
commit
ed6ebcc8af
@ -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> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user