File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,8 +302,14 @@ <h2 class="headingfont text-[16px] md:text-[20px] font-bold mb-6 text-center tex
302302 }
303303 }
304304 const curH = gameContainer . offsetHeight ;
305- let dogY = curH * 0.75 ;
306- const targetY = isPerfect ? curH * 0.49 : curH * 0.50 ;
305+ const rootFontSize = parseFloat ( getComputedStyle ( document . documentElement ) . fontSize ) || 16 ;
306+ const dogHeight = ( isPerfect ? 14 : 11 ) * rootFontSize ;
307+
308+ // Start position (hidden under the grass)
309+ let dogY = curH * 0.88 ;
310+
311+ // Peak position (feet slightly below the grass line at 85%)
312+ const targetY = ( curH * 0.86 ) - dogHeight ;
307313
308314 dog . style . top = `${ dogY } px` ;
309315 dog . classList . remove ( 'hidden' ) ;
@@ -318,7 +324,7 @@ <h2 class="headingfont text-[16px] md:text-[20px] font-bold mb-6 text-center tex
318324 const slideDown = setInterval ( ( ) => {
319325 dogY += 4 ;
320326 dog . style . top = `${ dogY } px` ;
321- if ( dogY >= curH * 0.75 ) {
327+ if ( dogY >= curH * 0.88 ) {
322328 clearInterval ( slideDown ) ;
323329 dog . classList . add ( 'hidden' ) ;
324330 dog . style . width = '' ;
You can’t perform that action at this time.
0 commit comments