Merge branch 'develop' into release/1.6.5

This commit is contained in:
ntr 2019-10-26 14:38:12 +11:00
commit f40b6c65b7

View File

@ -6,17 +6,18 @@ function wiggle(id, idle) {
const x = window.innerWidth * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random()); const x = window.innerWidth * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
const y = window.innerHeight * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random()); const y = window.innerHeight * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
const originalX = parseFloat(idle.animations[0].currentValue);
const originalY = parseFloat(idle.animations[1].currentValue);
// console.log(x, y); // console.log(x, y);
return anime({ return anime({
targets: target, targets: target,
rotate: 0, translateX: [originalX + x, originalX - x, originalX],
translateX: [x, -x, 0], translateY: [originalY + y, originalY - y, originalY],
translateY: [y, -y, 0],
duration, duration,
easing: 'easeInOutSine', easing: 'easeInOutSine',
// direction: 'alternate', // direction: 'alternate',
begin: idle.pause, begin: idle.pause,
complete: idle.restart, complete: idle.play,
}); });
} }