Skip to content

Commit

Permalink
Remove decay "snow" in reduced motion mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccacremona committed Dec 4, 2024
1 parent 8e21ca5 commit 1033957
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/century-scale-storage/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ window.onload = () => {
// Initialize shared resources
new p5(shared);
initIntersectionObservers();
decay();
if (!isReducedMotion()) {
decay();
}

document.addEventListener("resize", () => {
decay();
if (!isReducedMotion()) {
decay();
}
});

document.addEventListener("scroll", () => {
if (isReducedMotion()) {
return;
if (!isReducedMotion()) {
decay();
}
decay();
});
};

Expand Down

0 comments on commit 1033957

Please sign in to comment.