Files
pihkaal-me/app/components/Contact/BottomScreen/Background.vue
2025-11-17 23:13:40 +01:00

31 lines
768 B
Vue

<script setup lang="ts">
const store = useContactStore();
const homeBackgroundImage = useTemplateRef("homeBackgroundImage");
const contactBackgroundImage = useTemplateRef("contactBackgroundImage");
useRender((ctx) => {
if (!homeBackgroundImage.value || !contactBackgroundImage.value) return;
ctx.drawImage(homeBackgroundImage.value, 0, 0);
ctx.globalAlpha = store.isIntro
? store.intro.stage2Opacity
: store.outro.stage3Opacity;
ctx.drawImage(contactBackgroundImage.value, 0, 0);
});
</script>
<template>
<img
ref="homeBackgroundImage"
src="/assets/images/home/bottom-screen/background.png"
hidden
/>
<img
ref="contactBackgroundImage"
src="/assets/images/contact/bottom-screen/background.png"
hidden
/>
</template>