fix: reset store + animate intro on mount, and fix wrong opacity/positions

This commit is contained in:
2025-11-17 01:22:13 +01:00
parent e5ed33f5ce
commit 8d186df4cb
9 changed files with 34 additions and 16 deletions

View File

@@ -29,7 +29,9 @@ useRender((ctx) => {
ctx.globalAlpha = store.isIntro
? store.intro.stage1Opacity
: store.outro.stage1Opacity;
: store.isOutro
? store.outro.stage1Opacity
: 1;
ctx.drawImage(calendarImage.value, CALENDAR_LEFT - 3, CALENDAR_TOP - 33);
const extraRow = CALENDAR_COLS * CALENDAR_ROWS - daysInMonth - firstDay < 0;
@@ -39,7 +41,9 @@ useRender((ctx) => {
ctx.globalAlpha = store.isIntro
? store.intro.stage1Opacity
: store.outro.stage2Opacity;
: store.isOutro
? store.outro.stage2Opacity
: 1;
for (let col = 0; col < CALENDAR_ROWS + (extraRow ? 1 : 0); col += 1) {
for (let row = 0; row < CALENDAR_COLS; row += 1) {
const cellIndex = col * CALENDAR_COLS + row;