From 9874334fc3e3840f0b693968dedfc4e1d33c346e Mon Sep 17 00:00:00 2001 From: Mashy Date: Wed, 11 Sep 2019 11:55:48 +1000 Subject: [PATCH] screen width % for anims --- WORKLOG.md | 2 -- client/src/components/anims/chaos.jsx | 5 ++--- client/src/components/anims/siphon.jsx | 1 - client/src/components/anims/slay.jsx | 2 +- client/src/components/anims/strike.jsx | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 066e89c0..e80b67a5 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -21,9 +21,7 @@ * game invites * change score to enum -* pct based translates for combat animation * add speed to descriptions -* clear skill (if currently targetted) ## SOON *SERVER* diff --git a/client/src/components/anims/chaos.jsx b/client/src/components/anims/chaos.jsx index 288501ba..dfe3ae5c 100644 --- a/client/src/components/anims/chaos.jsx +++ b/client/src/components/anims/chaos.jsx @@ -69,10 +69,9 @@ class Chaos extends Component { stroke: colour, }); }); - anime.set('.skill-anim', { - translateY: -300 * this.props.direction.y, - translateX: -200 * this.props.direction.x, + translateY: -(window.screen.height) * 0.35 * this.props.direction.y, + translateX: -(window.screen.width) * 0.15 * this.props.direction.x, opacity: 0, }); anime.set('#explosion feDisplacementMap', { diff --git a/client/src/components/anims/siphon.jsx b/client/src/components/anims/siphon.jsx index f6812a05..020d2962 100644 --- a/client/src/components/anims/siphon.jsx +++ b/client/src/components/anims/siphon.jsx @@ -71,7 +71,6 @@ class Siphon extends Component { } this.props.animCb(); } - } module.exports = addState(Siphon); diff --git a/client/src/components/anims/slay.jsx b/client/src/components/anims/slay.jsx index 2713a569..c0ffbf88 100644 --- a/client/src/components/anims/slay.jsx +++ b/client/src/components/anims/slay.jsx @@ -91,7 +91,7 @@ class Slay extends Component { }); anime.set('#slay', { - translateY: -400, + translateY: (window.screen.height) * 0.35 * this.props.direction.y, translateX: 0, }); anime.set('#explosion feDisplacementMap', { diff --git a/client/src/components/anims/strike.jsx b/client/src/components/anims/strike.jsx index 5aca4fbc..e40d7623 100644 --- a/client/src/components/anims/strike.jsx +++ b/client/src/components/anims/strike.jsx @@ -85,7 +85,7 @@ class Strike extends Component { }); anime.set('#strike', { - translateY: -400, + translateY: (window.screen.height) * 0.35 * this.props.direction.y, translateX: 0, });