fix cast anim size

This commit is contained in:
ntr 2020-01-15 09:28:31 +10:00
parent 6d1b60620c
commit 2fd3364a52

View File

@ -6,8 +6,8 @@ function sourceCast(id, direction, idle) {
const { x, y } = direction;
return anime({
targets: [document.getElementById(id)],
translateX: x * window.screen.width * 0.1,
translateY: y * window.screen.height * 0.1,
translateX: x * window.innerWidth * 0.1,
translateY: y * window.innerHeight * 0.1,
easing: 'easeInOutElastic',
direction: 'alternate',
duration: TIMES.SOURCE_DURATION_MS,