feat(assets): new assets loading system (currently only for images)
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import CLOCK_IMAGE from "/assets/images/home/top-screen/clock.webp";
|
||||
|
||||
const CENTER_X = 63;
|
||||
const CENTER_Y = 95;
|
||||
|
||||
const store = useHomeStore();
|
||||
|
||||
const [clockImage] = useImages(CLOCK_IMAGE);
|
||||
const { assets } = useAssets();
|
||||
|
||||
function drawLine(
|
||||
ctx: CanvasRenderingContext2D,
|
||||
@@ -59,7 +57,7 @@ useRender((ctx) => {
|
||||
: store.isOutro && store.outro.animateTop
|
||||
? store.outro.stage1Opacity
|
||||
: 1;
|
||||
ctx.drawImage(clockImage!, 13, 45);
|
||||
ctx.drawImage(assets.home.topScreen.clock, 13, 45);
|
||||
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage1Opacity
|
||||
|
||||
Reference in New Issue
Block a user