reset hex
This commit is contained in:
parent
3e525f0d45
commit
74b250439b
@ -105,7 +105,6 @@ function animations(props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const combatAnim = anim(event.skill);
|
const combatAnim = anim(event.skill);
|
||||||
console.log(combatAnim);
|
|
||||||
if (combatAnim) {
|
if (combatAnim) {
|
||||||
return (
|
return (
|
||||||
<div class={`combat-anim`}>
|
<div class={`combat-anim`}>
|
||||||
|
|||||||
@ -32,26 +32,18 @@ class Hex extends Component {
|
|||||||
anime({
|
anime({
|
||||||
targets: ['.hex-anim polygon'],
|
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',
|
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',
|
easing: 'easeOutExpo',
|
||||||
duration: TIMES.START_SKILL,
|
duration: TIMES.START_SKILL,
|
||||||
|
complete: anim => anim.reset(),
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: ['feTurbulence', 'feDisplacementMap'],
|
targets: ['feTurbulence', 'feDisplacementMap'],
|
||||||
baseFrequency: 0,
|
baseFrequency: 0,
|
||||||
scale: 1,
|
scale: 1,
|
||||||
direction: 'alternate',
|
|
||||||
easing: 'easeOutSine',
|
easing: 'easeOutSine',
|
||||||
duration: TIMES.START_SKILL,
|
duration: TIMES.START_SKILL,
|
||||||
});
|
complete: anim => anim.reset(),
|
||||||
}
|
|
||||||
|
|
||||||
// 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',
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user