screen based translate for cast
This commit is contained in:
parent
4558eeaee0
commit
21203ee06a
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user