From 74b250439b105391e7af7c0462b2399db7424c8f Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 30 Jun 2019 02:08:08 +1000 Subject: [PATCH] reset hex --- client/src/components/animations.jsx | 1 - client/src/components/anims/hex.jsx | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/client/src/components/animations.jsx b/client/src/components/animations.jsx index bc08bb7b..35fccff1 100644 --- a/client/src/components/animations.jsx +++ b/client/src/components/animations.jsx @@ -105,7 +105,6 @@ function animations(props) { }; const combatAnim = anim(event.skill); - console.log(combatAnim); if (combatAnim) { return (
diff --git a/client/src/components/anims/hex.jsx b/client/src/components/anims/hex.jsx index 595d1b15..536e5615 100644 --- a/client/src/components/anims/hex.jsx +++ b/client/src/components/anims/hex.jsx @@ -32,26 +32,18 @@ class Hex extends Component { anime({ targets: ['.hex-anim polygon'], points: '64 124.94732621931382 8.574 96.00354944613788 8.62269130211947 32.03166105954991 64 4 119.37730869788052 32.03166105954991 119.426 96.00354944613788', - direction: 'alternate', easing: 'easeOutExpo', duration: TIMES.START_SKILL, + complete: anim => anim.reset(), }); anime({ targets: ['feTurbulence', 'feDisplacementMap'], baseFrequency: 0, scale: 1, - direction: 'alternate', easing: 'easeOutSine', duration: TIMES.START_SKILL, - }); - } - - // reset hexagon - componentWillUnmount() { - anime.set({ - targets: ['.hex-anim polygon'], - points: '64 124.94732621931382 8.574 96.00354944613788 8.62269130211947 32.03166105954991 64 4 119.37730869788052 32.03166105954991 119.426 96.00354944613788', + complete: anim => anim.reset(), }); } }