From da7c30032a7fd3ada3a1a8c6d169be8d76d5fcb4 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 1 Jul 2019 14:04:17 +1000 Subject: [PATCH] haste --- client/src/components/anims/amplify.jsx | 2 +- client/src/components/anims/block.jsx | 2 +- client/src/components/anims/buff.jsx | 2 +- client/src/components/anims/debuff.jsx | 2 +- client/src/components/anims/haste.jsx | 34 +++++++++++++++---------- client/src/components/anims/stun.jsx | 3 --- client/src/constants.jsx | 10 ++++++-- 7 files changed, 33 insertions(+), 22 deletions(-) diff --git a/client/src/components/anims/amplify.jsx b/client/src/components/anims/amplify.jsx index 6b42f3ff..adf51c93 100644 --- a/client/src/components/anims/amplify.jsx +++ b/client/src/components/anims/amplify.jsx @@ -21,7 +21,7 @@ class Amplify extends Component { xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"> - + diff --git a/client/src/components/anims/block.jsx b/client/src/components/anims/block.jsx index f3e215b0..812b32cb 100644 --- a/client/src/components/anims/block.jsx +++ b/client/src/components/anims/block.jsx @@ -20,7 +20,7 @@ class Block extends Component { style={{ transform: 'rotate(180deg)' }} viewBox="0 0 256 256"> - + - + diff --git a/client/src/components/anims/debuff.jsx b/client/src/components/anims/debuff.jsx index 6fa300e7..bf7efe98 100644 --- a/client/src/components/anims/debuff.jsx +++ b/client/src/components/anims/debuff.jsx @@ -20,7 +20,7 @@ class Debuff extends Component { style={{ transform: 'rotate(180deg)' }} viewBox="0 0 300 300"> - + diff --git a/client/src/components/anims/haste.jsx b/client/src/components/anims/haste.jsx index eab63272..2aaa34a8 100644 --- a/client/src/components/anims/haste.jsx +++ b/client/src/components/anims/haste.jsx @@ -2,7 +2,7 @@ const preact = require('preact'); const { Component } = require('preact'); const anime = require('animejs').default; -const { TIMES } = require('../../constants'); +const { TIMES, COLOURS } = require('../../constants'); class Haste extends Component { constructor() { @@ -14,15 +14,21 @@ class Haste extends Component { return ( - - + + + - + @@ -42,17 +48,19 @@ class Haste extends Component { })); this.animations.push(anime({ - targets: ['#haste'], - transform: 'perspective(500px)', - easing: 'easeOutExpo', - duration: TIMES.START_SKILL, + targets: ['#haste g'], + stroke: [COLOURS.GREEN, COLOURS.RED], + easing: 'easeInCubic', + delay: TIMES.TARGET_DELAY_MS, + duration: TIMES.TARGET_DURATION_MS, })); this.animations.push(anime({ - targets: ['#hasteFilter feTurbulence', ' #hasteFilter feDisplacementMap'], - baseFrequency: 0, - scale: 1, - easing: 'easeOutSine', + targets: ['#hasteFilter feTurbulence', '#hasteFilter feDisplacementMap'], + baseFrequency: 2, + scale: 10, + numOctaves: 5, + easing: 'easeInCubic', delay: TIMES.TARGET_DELAY_MS, duration: TIMES.TARGET_DURATION_MS, diff --git a/client/src/components/anims/stun.jsx b/client/src/components/anims/stun.jsx index adaf2b8d..ce89b69d 100644 --- a/client/src/components/anims/stun.jsx +++ b/client/src/components/anims/stun.jsx @@ -24,9 +24,6 @@ class Stun extends Component { xmlns="http://www.w3.org/2000/svg" viewBox="-291 -291 582 582"> - diff --git a/client/src/constants.jsx b/client/src/constants.jsx index acce8288..170ec71f 100644 --- a/client/src/constants.jsx +++ b/client/src/constants.jsx @@ -1,7 +1,7 @@ module.exports = { TIMES: { - RESOLUTION_TOTAL_MS: 2000, - // RESOLUTION_TOTAL_MS: 20000, + // RESOLUTION_TOTAL_MS: 2000, + RESOLUTION_TOTAL_MS: 20000, SOURCE_DURATION_MS: 1000, TARGET_DELAY_MS: 500, @@ -13,6 +13,12 @@ module.exports = { DELAY: 150, }, + COLOURS: { + GREEN: '#1FF01F', + RED: '#a52a2a', + BLUE: '#3498db', + }, + INFO: { vbox: { item: 'VBOX',