Files
pihkaal-me/app/components/Home/TopScreen/Background.vue
Pihkaal c8dab1ae9e feat(home): play the white -> background fade only once
NOTE: it's not correctly done, i'm using app state for that, i might move to intro but it's fine for now
2026-01-12 16:36:30 +01:00

20 lines
461 B
Vue

<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);
});
defineOptions({
render: () => null,
});
</script>