From 21dee36a98248b48a40cc52bf1e6f5bdc86266cc Mon Sep 17 00:00:00 2001 From: mileswa1q22 Date: Fri, 11 Apr 2025 16:16:07 +0000 Subject: [PATCH] Enhance game animations with rotation and elastic easing; update event details display in calendar --- WebGames-master/WebGames-master/index.html | 76 ++++++++++------------ cal.html | 15 +++-- index.html | 4 +- 3 files changed, 47 insertions(+), 48 deletions(-) diff --git a/WebGames-master/WebGames-master/index.html b/WebGames-master/WebGames-master/index.html index 55bf973a..553117c3 100644 --- a/WebGames-master/WebGames-master/index.html +++ b/WebGames-master/WebGames-master/index.html @@ -871,44 +871,39 @@ }); } - // Check if animation is enabled - const gameAnimationEnabled = getCookie('gameAnimation') === 'true'; - - if (gameAnimationEnabled) { - // Function to animate a single game element - function animateGame(game) { - anime({ - targets: game, - translateY: [-50, 0], // Fly in from above - opacity: [0, 1], // Fade in - duration: 800, - easing: 'easeOutExpo', - }); - } - - // Create an Intersection Observer to detect when games come into view - const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Animate the game when it comes into view - animateGame(entry.target); - - // Stop observing the element after animating it - observer.unobserve(entry.target); - } - }); - }); - - // Select all game elements and hide them initially - const games = document.querySelectorAll('.game'); - games.forEach(game => { - game.style.opacity = '0'; // Hide games - game.style.transform = 'translateY(-50px)'; // Move them above - observer.observe(game); // Start observing the game + // Function to animate a single game element + function animateGame(game) { + anime({ + targets: game, + translateY: [-50, 0], // Fly in from above + rotate: [-10, 0], // Rotate back to normal + opacity: [0, 1], // Fade in + duration: 1000, // Animation duration + easing: 'easeOutElastic(1, 0.5)', // Elastic easing for a bouncy effect }); } - - -
hi mom
-

hi mom

\ No newline at end of file diff --git a/index.html b/index.html index a17239ac..ac97cd21 100644 --- a/index.html +++ b/index.html @@ -149,12 +149,12 @@ // Make the title visible const title = document.querySelector('h1'); if (title) { - title.style.opacity = '1'; + title.style.opacity = '1'; // Ensure the title is fully visible title.style.transform = 'none'; } // Make all buttons visible - const buttons = document.querySelectorAll('.button, .calendar-button'); + const buttons = document.querySelectorAll('.button, .calendar-button, .button-container'); buttons.forEach(button => { button.style.opacity = '1'; // Ensure the button is fully visible button.style.transform = 'none'; // Reset any transform styles