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,10 +1,8 @@
<script setup lang="ts">
import CLOCK_IMAGE from "/assets/images/home/top-screen/clock.webp";
const CENTER_X = 63;
const CENTER_Y = 95;
const [clockImage] = useImages(CLOCK_IMAGE);
const { assets } = useAssets();
function drawLine(
ctx: CanvasRenderingContext2D,
@@ -54,7 +52,7 @@ function drawLine(
useRender((ctx) => {
ctx.translate(0, -16);
ctx.drawImage(clockImage!, 13, 45);
ctx.drawImage(assets.home.topScreen.clock, 13, 45);
const now = new Date();