fix: reset store + animate intro on mount, and fix wrong opacity/positions
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user