Updates to the readme

This commit is contained in:
jme9
2024-12-11 14:48:53 -08:00
parent 5b89ec3b53
commit 00f9eea57a
3 changed files with 23 additions and 3 deletions
+1 -2
View File
@@ -15,14 +15,13 @@ document.addEventListener("DOMContentLoaded", () => {
let startTime = null;
function easeOutCubic(t) {
// Custom easing function for gradual slowdown
return 1 - Math.pow(1 - t, 3);
}
function scrollAnimation(currentTime) {
if (!startTime) startTime = currentTime;
const timeElapsed = currentTime - startTime;
const progress = Math.min(timeElapsed / duration, 1); // Ensure progress doesn't exceed 1
const progress = Math.min(timeElapsed / duration, 1);
const easeProgress = easeOutCubic(progress);
window.scrollTo(0, startPosition + distance * easeProgress);