feat: add Robot Doctor and Security Guard personas with pricing and model paths
CI/CD / test-and-build (push) Waiting to run
CI/CD / deploy (push) Blocked by required conditions

This commit is contained in:
Najjar\NajjarV02
2026-04-17 10:10:54 +04:00
parent f53b2d3cb8
commit 0793a650fb
8 changed files with 62 additions and 6 deletions
+10 -1
View File
@@ -22,7 +22,7 @@ function buildAttireGlbMap(personas: { id: string; modelPath?: string }[]): Reco
personas.forEach((p) => {
if (p.modelPath && p.id !== 'none') dynamic[p.id] = p.modelPath;
});
return { ...dynamic, ...STATIC_ATTIRE_GLB }; // static takes priority
return { ...STATIC_ATTIRE_GLB, ...dynamic }; // uploaded GLBs override static
}
function easeInOutCubic(t: number): number {
@@ -32,6 +32,15 @@ function easeInOutCubic(t: number): number {
}
function AttireModel({ glbPath, onLoaded }: { glbPath: string; onLoaded: () => void }) {
// Clear stale useGLTF cache entries for paths that share the same base filename
// (e.g. /models/robot-doctor.glb?v=1 replaced by ?v=2). This prevents Three.js
// from serving the old binary when the version query string changes.
useEffect(() => {
return () => {
useGLTF.clear(glbPath);
};
}, [glbPath]);
const { scene } = useGLTF(glbPath);
const processedAttire = useMemo(() => {