Skip to content

Commit 04c2124

Browse files
committed
fix: adjust dog animation peak height to 59% of viewport to align with the true grass line
1 parent 262e9cd commit 04c2124

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

contact.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ <h2 class="headingfont text-[16px] md:text-[20px] font-bold mb-6 text-center tex
305305
const rootFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
306306
const dogHeight = (isPerfect ? 14 : 11) * rootFontSize;
307307

308-
// Start position (hidden under the grass)
309-
let dogY = curH * 0.88;
308+
// Start position (hidden under the grass/dirt)
309+
let dogY = curH * 0.90;
310310

311-
// Peak position (feet slightly below the grass line at 85%)
312-
const targetY = (curH * 0.86) - dogHeight;
311+
// Peak position (feet slightly below the grass line at 57.14%)
312+
const targetY = (curH * 0.59) - dogHeight;
313313

314314
dog.style.top = `${dogY}px`;
315315
dog.classList.remove('hidden');
@@ -324,7 +324,7 @@ <h2 class="headingfont text-[16px] md:text-[20px] font-bold mb-6 text-center tex
324324
const slideDown = setInterval(() => {
325325
dogY += 4;
326326
dog.style.top = `${dogY}px`;
327-
if (dogY >= curH * 0.88) {
327+
if (dogY >= curH * 0.90) {
328328
clearInterval(slideDown);
329329
dog.classList.add('hidden');
330330
dog.style.width = '';

0 commit comments

Comments
 (0)