fix: reset store + animate intro on mount, and fix wrong opacity/positions

This commit is contained in:
2025-11-17 01:22:13 +01:00
parent e5ed33f5ce
commit 8d186df4cb
9 changed files with 34 additions and 16 deletions

View File

@@ -6,9 +6,6 @@ const gbaDisplayImage = useTemplateRef("gbaDisplayImage");
const startupModeImage = useTemplateRef("startupModeImage");
const batteryImage = useTemplateRef("batteryImage");
// TODO: don't call it here
callOnce("intro", () => store.animateIntro());
useRender((ctx) => {
if (
!statusBarImage.value ||
@@ -20,9 +17,9 @@ useRender((ctx) => {
const TEXT_Y = 11;
ctx.translate(0, store.intro.statusBarY);
ctx.translate(0, store.isIntro ? store.intro.statusBarY : 0);
ctx.globalAlpha = store.outro.stage2Opacity;
ctx.globalAlpha = store.isOutro ? store.outro.stage2Opacity : 1;
ctx.drawImage(statusBarImage.value, 0, 0);
ctx.fillStyle = "#ffffff";