changed y position calculation
This commit is contained in:
@ -224,8 +224,9 @@ function animateSanta() {
|
||||
const fromLeft = Math.random() < 0.5;
|
||||
const startX = fromLeft ? -220 : screenWidth + 220;
|
||||
const endX = fromLeft ? screenWidth + 220 : -220;
|
||||
const startY = Math.random() * (screenHeight / 6) + 20; // Restrict to upper screen
|
||||
const endY = Math.random() * (screenHeight / 6) + 20; // Restrict to upper screen
|
||||
const santaHeight = santa.offsetHeight;
|
||||
const startY = Math.random() * (screenHeight / 5 - santaHeight - 50) + 50; // Restrict to upper screen
|
||||
const endY = Math.random() * (screenHeight / 5 - santaHeight - 50) + 50; // Restrict to upper screen
|
||||
const angle = Math.random() * 20 - 10; // -10 to 10 degrees
|
||||
|
||||
santa.style.left = `${startX}px`;
|
||||
|
Reference in New Issue
Block a user