Optimize animations and transitions

will-change is apparently not enough to run GPU-enabled animations, use translateZ on top of it
This commit is contained in:
2020-04-09 20:23:24 +02:00
parent 7a44d5b0ed
commit be0f4c8b59
16 changed files with 75 additions and 43 deletions

View File

@@ -11,6 +11,7 @@ export const animateIn = (scope, init) => {
const letters = anime({
targets: scope.querySelectorAll('span, em span'),
translateY: ['100%', 0],
translateZ: [0, 0],
easing: 'easeOutQuart',
duration: 1000,
delay: anime.stagger(40, { start: init ? 0 : animDelay }),