feat(contact): intro animation
This commit is contained in:
24
app/components/Contact/TopScreen/Title.vue
Normal file
24
app/components/Contact/TopScreen/Title.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
const store = useContactStore();
|
||||
|
||||
const titleImage = useTemplateRef("titleImage");
|
||||
|
||||
useRender((ctx) => {
|
||||
if (!titleImage.value) return;
|
||||
|
||||
ctx.globalAlpha = store.isIntro ? store.intro.stage1Opacity : 1;
|
||||
ctx.drawImage(
|
||||
titleImage.value,
|
||||
21,
|
||||
store.isIntro ? store.intro.titleY : SCREEN_HEIGHT - 23,
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<img
|
||||
ref="titleImage"
|
||||
src="/assets/images/contact/top-screen/title.png"
|
||||
hidden
|
||||
/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user