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',
|
'business-suit': '/Suit.glb',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Preload static attire models so they're cached before user clicks
|
// Attire models are loaded on-demand to avoid blocking the initial 50 MB robot load
|
||||||
Object.values(STATIC_ATTIRE_GLB).forEach((p) => useGLTF.preload(p));
|
|
||||||
|
|
||||||
/** Merge static map with any custom GLBs stored in the persona store */
|
/** Merge static map with any custom GLBs stored in the persona store */
|
||||||
function buildAttireGlbMap(personas: { id: string; modelPath?: string }[]): Record<string, string> {
|
function buildAttireGlbMap(personas: { id: string; modelPath?: string }[]): Record<string, string> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user