Compare commits
3 commits
31aa58a863
...
091f4ddc4a
Author | SHA1 | Date | |
---|---|---|---|
091f4ddc4a | |||
9ff1b20248 | |||
351931fdeb |
1 changed files with 47 additions and 44 deletions
|
@ -38,7 +38,10 @@ function updateAnimation(id, frames, totalFrames) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
animate("illustration-accueil", 500);
|
// If the user have a setting on their device to minimize the amount of non-essential motion
|
||||||
animate("rennes", 1000);
|
const preferReduceMotion = window.matchMedia("(prefers-reduced-motion)").matches;
|
||||||
animate("orsay", 2000);
|
|
||||||
|
animate("illustration-accueil", preferReduceMotion ? 1500 : 500); // Reduce framerate if use preference is to reduce motion
|
||||||
|
animate("rennes", preferReduceMotion ? 3000 : 1000); // Reduce framerate if use preference is to reduce motion
|
||||||
|
animate("orsay", preferReduceMotion ? 4000 : 2000); // Reduce framerate if use preference is to reduce motion
|
||||||
animate("parterre", 1500);
|
animate("parterre", 1500);
|
Loading…
Reference in a new issue