feat(intro): play home intro once in the intro screen instead of having weird boolean in app store

This commit is contained in:
2026-01-14 11:59:13 +01:00
parent a044d87977
commit fd06c031d4
8 changed files with 23 additions and 33 deletions

View File

@@ -1,15 +1,8 @@
<script setup lang="ts">
const { onRender } = useScreen();
const app = useAppStore();
const store = useHomeStore();
const { assets } = useAssets();
onRender((ctx) => {
ctx.fillStyle = "#fbfbfb"
ctx.fillRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT);
ctx.globalAlpha = store.isIntro && !app.homeIntroPlayed ? store.intro.stage1Opacity : 1;
assets.images.home.topScreen.background.draw(ctx, 0, 0);
});