<script setup lang="ts">
const store = useHomeStore();
const app = useAppStore();

const backgroundImage = useTemplateRef("backgroundImage");

useRender((ctx) => {
  if (!backgroundImage.value) return;

  ctx.globalAlpha = app.booted ? 1 : store.intro.stage1Opacity;
  ctx.drawImage(backgroundImage.value, 0, 0);
});
</script>

<template>
  <img
    ref="backgroundImage"
    src="/assets/images/home/bottom-screen/background.png"
    hidden
  />
</template>
