From 93a915646a9dcc1fb997965a907c53713d1ec081 Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 24 Jun 2019 22:34:56 +1000 Subject: [PATCH] anim colour changes --- client/src/components/anims/chaos.jsx | 10 ++++++++-- client/src/components/anims/slay.jsx | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/src/components/anims/chaos.jsx b/client/src/components/anims/chaos.jsx index 8a5c37c3..ae5db9e7 100644 --- a/client/src/components/anims/chaos.jsx +++ b/client/src/components/anims/chaos.jsx @@ -7,7 +7,6 @@ const { randomPoints } = require('../../utils'); const duration = TIMES.START_SKILL; - function projectile(x, y, radius, colour) { return ( { + const colour = Math.random() >= 0.5 ? '#a52a2a' : '#3498db'; + anime.set(proj, { + stroke: colour, + }); + }); + anime.set('.skill-anim', { translateY: -200, translateX: 0, @@ -94,7 +101,6 @@ class AttackCharge extends Component { easing: 'easeInQuad', }); - const projectiles = document.querySelectorAll('#projectile'); projectiles.forEach(proj => anime({ targets: proj, cx: Math.random() * 250 + 25, diff --git a/client/src/components/anims/slay.jsx b/client/src/components/anims/slay.jsx index 9128b342..cd5a440d 100644 --- a/client/src/components/anims/slay.jsx +++ b/client/src/components/anims/slay.jsx @@ -37,7 +37,7 @@ class AttackCharge extends Component { super(); this.team = props.team; // this.colour = props.colour; - this.colour = '#c5a443'; + this.colour = '#a52a2a'; const points = new Array(30).fill(0); this.charges = points.map(() => projectile(150, 420, 7, '#1FF01F')); }