From 21203ee06a5860f6337e5d9a30e4926faccdb476 Mon Sep 17 00:00:00 2001 From: Mashy Date: Sun, 15 Sep 2019 14:15:03 +1000 Subject: [PATCH] screen based translate for cast --- client/src/components/anims/source.cast.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/anims/source.cast.jsx b/client/src/components/anims/source.cast.jsx index 2ca2f6c3..74a17184 100644 --- a/client/src/components/anims/source.cast.jsx +++ b/client/src/components/anims/source.cast.jsx @@ -6,8 +6,8 @@ function sourceCast(id, direction, idle) { const { x, y } = direction; return anime({ targets: [document.getElementById(id)], - translateX: x * 200, - translateY: y * 200, + translateX: x * window.screen.width * 0.15, + translateY: y * window.screen.height * 0.15, easing: 'easeInOutElastic', direction: 'alternate', duration: TIMES.SOURCE_DURATION_MS,