feat(assets): new assets loading system (currently only for images)

This commit is contained in:
2025-12-17 12:28:48 +01:00
parent 05398d5252
commit b85899617b
106 changed files with 359 additions and 366 deletions

View File

@@ -1,14 +1,12 @@
<script setup lang="ts">
import BACKGROUND_IMAGE from "/assets/images/home/top-screen/background.webp";
const store = useHomeStore();
const app = useAppStore();
const [backgroundImage] = useImages(BACKGROUND_IMAGE);
const { assets } = useAssets();
useRender((ctx) => {
ctx.globalAlpha = app.booted ? 1 : store.intro.stage1Opacity;
ctx.drawImage(backgroundImage!, 0, 0);
ctx.drawImage(assets.home.topScreen.background, 0, 0);
});
defineOptions({