This commit is contained in:
ntr 2019-07-01 14:53:27 +10:00
parent ed0eb2038c
commit beb40da7fe
3 changed files with 11 additions and 4 deletions

View File

@ -10,6 +10,7 @@ const Bash = require('./anims/bash');
const Block = require('./anims/block');
const Buff = require('./anims/buff');
const Debuff = require('./anims/debuff');
const Decay = require('./anims/decay');
const Curse = require('./anims/curse');
const Haste = require('./anims/haste');
const Stun = require('./anims/stun');
@ -107,6 +108,7 @@ function animations(props) {
case 'Curse': return <Curse />;
case 'Blast': return <Blast id={construct.id} stage={stage} team={player}/>;
case 'Debuff': return <Debuff />;
case 'Decay': return <Decay />;
case 'Strike': return <Strike id={construct.id} stage={stage} team={player} colour={colours.red}/>;
case 'Chaos': return <Chaos id={construct.id} team={player} colour={colours.purple}/>;
case 'Slay': return <Slay id={construct.id} team={player} colour={colours.yellow}/>;

View File

@ -2,7 +2,10 @@ const preact = require('preact');
const { Component } = require('preact');
const anime = require('animejs').default;
const { TIMES } = require('../../constants');
const {
TIMES,
COLOURS,
} = require('../../constants');
class Curse extends Component {
constructor() {
@ -38,10 +41,10 @@ class Curse extends Component {
this.animations.push(anime({
targets: ['#curse'],
scale: [0.5, 0.8],
strokeWidth: 0,
strokeWidth: [8, 0],
easing: 'easeInOutSine',
direction: 'alternate',
duration: TIMES.START_SKILL,
// delay: TIMES.TARGET_DELAY_MS,
duration: TIMES.TARGET_DURATION_MS,
}));
}

View File

@ -37,6 +37,8 @@ class Haste extends Component {
);
}
// transform: ['translate(0 0)', 'translate(0 -100)']
componentDidMount() {
this.animations.push(anime({
targets: ['#haste'],