reset hex

This commit is contained in:
ntr 2019-06-30 02:08:08 +10:00
parent 3e525f0d45
commit 74b250439b
2 changed files with 2 additions and 11 deletions

View File

@ -105,7 +105,6 @@ function animations(props) {
};
const combatAnim = anim(event.skill);
console.log(combatAnim);
if (combatAnim) {
return (
<div class={`combat-anim`}>

View File

@ -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(),
});
}
}