feat(contact): animate outro
This commit is contained in:
@@ -7,12 +7,10 @@ const contactBackgroundImage = useTemplateRef("contactBackgroundImage");
|
||||
useRender((ctx) => {
|
||||
if (!homeBackgroundImage.value || !contactBackgroundImage.value) return;
|
||||
|
||||
ctx.drawImage(contactBackgroundImage.value, 0, 0);
|
||||
|
||||
if (store.isIntro) {
|
||||
ctx.drawImage(homeBackgroundImage.value, 0, 0);
|
||||
ctx.globalAlpha = store.intro.stage2Opacity;
|
||||
}
|
||||
ctx.drawImage(homeBackgroundImage.value, 0, 0);
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage2Opacity
|
||||
: store.outro.stage3Opacity;
|
||||
|
||||
ctx.drawImage(contactBackgroundImage.value, 0, 0);
|
||||
});
|
||||
|
||||
@@ -7,10 +7,14 @@ const thingsImage = useTemplateRef("thingsImage");
|
||||
useRender((ctx) => {
|
||||
if (!backgroundImage.value || !thingsImage.value) return;
|
||||
|
||||
ctx.globalAlpha = store.isIntro ? store.intro.stage1Opacity : 1;
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage1Opacity
|
||||
: store.outro.stage2Opacity;
|
||||
ctx.drawImage(backgroundImage.value, 0, 0);
|
||||
|
||||
ctx.globalAlpha = store.isIntro ? store.intro.stage3Opacity : 1;
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage3Opacity
|
||||
: store.outro.stage1Opacity;
|
||||
ctx.drawImage(thingsImage.value, 0, 0);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -8,6 +8,7 @@ const titleImage = useTemplateRef("titleImage");
|
||||
useRender((ctx) => {
|
||||
if (!notificationImage.value || !titleImage.value) return;
|
||||
|
||||
ctx.globalAlpha = store.outro.stage2Opacity;
|
||||
ctx.font = "10px NDS10";
|
||||
|
||||
// notifications
|
||||
@@ -24,7 +25,9 @@ useRender((ctx) => {
|
||||
}
|
||||
|
||||
// title
|
||||
ctx.globalAlpha = store.isIntro ? store.intro.stage1Opacity : 1;
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage1Opacity
|
||||
: store.outro.stage2Opacity;
|
||||
ctx.drawImage(
|
||||
titleImage.value,
|
||||
21,
|
||||
|
||||
Reference in New Issue
Block a user