fix(pets): cat renders on shared KiraAvatar canvas via onAppReady callback

Single WebGL context, no bindBuffer spam. Cat model loads onto
KiraAvatar's stage and positions itself at bottom-right corner.
PetZone passes app prop through to Live2DCat.
This commit is contained in:
2026-06-05 13:19:32 -04:00
parent 37f8bf59a0
commit 1f8bcf6b4f
4 changed files with 38 additions and 44 deletions
+2
View File
@@ -7,6 +7,7 @@ interface Props {
outfit: string;
accessory: string | null;
onTalkToggle: () => void;
onAppReady?: (app: any) => void;
}
type ExpressionName = 'Normal' | 'Smile' | 'Sad' | 'Angry' | 'Surprised' | 'Blushing';
@@ -82,6 +83,7 @@ export default function KiraAvatar(props: Props) {
app.stage.addChild(model as any);
(model as any).isInteractive = () => false;
if (!mounted) return;
if (props.onAppReady) props.onAppReady(app);
try {
textureRef.current = {