diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less
index e197781e..e52249d0 100644
--- a/client/assets/styles/menu.less
+++ b/client/assets/styles/menu.less
@@ -174,59 +174,3 @@ section {
}
}
-.demo {
- margin-top: 1em;
-
- display: block;
-
- button {
- pointer-events: none;
- }
-
- section {
- margin-bottom: 0.5em;
-
- div:first-child {
- padding-right: 1em;
- }
- }
-
- .construct-section {
- .construct-list {
- height: 25em;
- grid-area: unset;
-
- .instance-construct {
- // border: 0;
- }
- }
- }
-
- .colour-info {
- grid-area: vinfo;
- display: flex;
- align-items: center;
-
- div {
- display: flex;
- }
-
- svg {
- flex: 1;
- height: 1em;
- }
- }
-
- .game-demo {
- .game {
- height: 25em;
- display: flex;
- flex-flow: column;
-
- .game-construct {
- flex: 1;
- }
- }
- }
-}
-
diff --git a/client/src/actions.jsx b/client/src/actions.jsx
index e99bba62..311d444b 100644
--- a/client/src/actions.jsx
+++ b/client/src/actions.jsx
@@ -7,8 +7,6 @@ export const setAnimSource = value => ({ type: 'SET_ANIM_SOURCE', value });
export const setAnimTarget = value => ({ type: 'SET_ANIM_TARGET', value });
export const setResolution = value => ({ type: 'SET_RESOLUTION', value });
-export const setDemo = value => ({ type: 'SET_DEMO', value });
-
export const setChatShow = value => ({ type: 'SET_CHAT_SHOW', value });
export const setChatWheel = value => ({ type: 'SET_CHAT_WHEEL', value });
export const setInstanceChat = value => ({ type: 'SET_INSTANCE_CHAT', value });
diff --git a/client/src/components/anims/slay.jsx b/client/src/components/anims/slay.jsx
index 079c2058..a136d5a2 100644
--- a/client/src/components/anims/slay.jsx
+++ b/client/src/components/anims/slay.jsx
@@ -1,34 +1,17 @@
const preact = require('preact');
const { Component } = require('preact');
const anime = require('animejs').default;
+const times = require('lodash/times');
const { TIMES } = require('../../constants');
-function projectile(x, y, radius, colour) {
- return (
-
- );
-}
-
-function sword(colour) {
- return (
-
- );
-}
+const GREEN = '#1FF01F';
+const RED = '#a52a2a';
class Slay extends Component {
constructor() {
super();
this.animations = [];
- this.colour = '#a52a2a';
- const points = new Array(30).fill(0);
- this.charges = points.map(() => projectile(150, 420, 7, '#1FF01F'));
}
render() {
@@ -39,13 +22,16 @@ class Slay extends Component {
id="slay"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 300 300">
-
-
-
-
-
- {sword(this.colour)}
- {this.charges}
+ {times(10, () => (
+
+ ))}
);
}
@@ -67,58 +53,31 @@ class Slay extends Component {
rotate,
});
- anime.set('#slay', {
- translateY: -1 * (window.innerHeight) * 0.35,
- translateX: 0,
- });
-
- anime.set('#slayFilter feDisplacementMap', {
- scale: 0,
- });
-
- anime.set('#sword', {
- fill: this.colour,
- opacity: 1,
- });
+ anime.set('#slay ellipse',{
+ fill: RED,
+ })
this.animations.push(anime({
targets: '#slay',
opacity: [
{ value: 1, duration: TIMES.TARGET_DURATION_MS * 0.2 },
- { value: 0, delay: TIMES.TARGET_DURATION_MS * 0.6, duration: TIMES.TARGET_DURATION_MS * 0.2 },
],
- translateY: 0,
- translateX: 0,
- loop: false,
easing: 'easeInQuad',
}));
this.animations.push(anime({
- targets: ['#slayFilter feTurbulence', '#slayFilter feDisplacementMap'],
- baseFrequency: 10,
- scale: 100,
- delay: TIMES.TARGET_DURATION_MS * 0.6,
+ targets: ['#slay ellipse'],
+ cx: 150,
+ cy: 325,
+ delay: TIMES.TARGET_DURATION_MS * 0.2,
duration: TIMES.TARGET_DURATION_MS * 0.3,
- easing: 'easeInQuad',
+ easing: 'easeOutQuad',
+ direction: 'alternate',
}));
- this.animations.push(anime({
- targets: '#sword',
- opacity: 0,
- delay: TIMES.TARGET_DURATION_MS * 0.9,
- }));
-
- const projectiles = document.querySelectorAll('#slay circle');
- projectiles.forEach(proj => {
- this.animations.push(anime({
- targets: proj,
- cx: Math.random() * 250 + 25,
- cy: Math.random() * 200 - 100,
- delay: TIMES.TARGET_DURATION_MS * 0.7,
- duration: TIMES.TARGET_DURATION_MS * 0.3,
- easing: 'easeInQuad',
- }));
- });
+ setTimeout(() => anime.set('#slay ellipse',{
+ fill: GREEN,
+ }), TIMES.TARGET_DURATION_MS * 0.5);
}
componentWillUnmount() {
diff --git a/client/src/components/demo.jsx b/client/src/components/demo.jsx
deleted file mode 100644
index e6bee9eb..00000000
--- a/client/src/components/demo.jsx
+++ /dev/null
@@ -1,190 +0,0 @@
-const { connect } = require('preact-redux');
-const preact = require('preact');
-
-// const actions = require('../actions');
-const shapes = require('./shapes');
-
-const { ConstructAvatar } = require('./construct');
-// const { ConstructAnimation } = require('./animations');
-
-const addState = connect(
- function receiveState(state) {
- const {
- account,
- itemInfo,
- demo,
- } = state;
-
- return {
- account,
- itemInfo,
- demo,
- };
- }
-
-/* function receiveDispatch(dispatch) {
- function setAnimTarget(anim) {
- dispatch(actions.setAnimTarget(anim));
- }
-
- return { setAnimTarget };
- } */
-);
-
-
-function Demo(args) {
- const {
- demo,
- itemInfo,
- account,
-
- // setAnimTarget,
- } = args;
-
- if (!demo || !itemInfo.items.length || account) return false;
-
- const { combiner, items, equipping, equipped, players, combo } = demo;
-
- const vboxDemo = () => {
- function stashBtn(i, j) {
- if (!i) return ;
- const highlighted = combiner.indexOf(j) > -1;
- const classes = `${highlighted ? 'highlight' : ''}`;
-
- if (shapes[i]) {
- return ;
- }
-
- return ;
- }
-
- function combinerBtn() {
- let text = '';
-
- if (combiner.length < 3) {
- for (let i = 0; i < 3; i++) {
- if (combiner.length > i) {
- text += '■ ';
- } else {
- text += '▫ ';
- }
- }
- } else {
- text = 'combine';
- }
-
- return (
-
- );
- }
-
- function stashElement() {
- return (
-
-
-
- VBOX PHASE {shapes.Red()} {shapes.Green()} {shapes.Blue()}
-
-
- Combine colours with base skills and specialisations to build an array of powerful variants.
-
-
-
-
-
- {items.map((i, j) => stashBtn(i, j))}
-
- {combinerBtn()}
-
-
- );
- }
-
- return (
-
- {stashElement()}
-
- );
- };
-
- const vboxConstructs = () => {
- const btnClass = equipping
- ? 'equipping empty gray'
- : 'empty gray';
-
- const constructEl = c => (
-
-
{c.name}
-
-
- {equipped
- ?
- :
- }
-
-
-
-
-
-
-
-
- );
-
- return (
-
-
-
CONSTRUCTS
-
Constructs are the units you control. They are reset every game and their initial appearance is randomly generated.
-
Skills and Specs you create in the VBOX Phase are equipped to your constructs to create a build.
-
-
- {constructEl(players[0].constructs[0])}
-
-
- );
- };
-
- const gameDemo = () => {
- return (
-
-
-
COMBAT PHASE
-
Battle your opponent using dynamic team builds from the VBOX phase.
-
The skills crafted can be used to damage the opponent or support your team.
-
Simultaneous turn based combat: each team picks targets for their skills during this phase.
-
The damage dealt by skills, cast order and construct life depend on your decisions in the VBOX phase.
-
-
-
- );
- };
-
- return (
-
- {gameDemo()}
- {vboxDemo()}
- {vboxConstructs()}
-
- );
-}
-
-module.exports = addState(Demo);
diff --git a/client/src/components/welcome.jsx b/client/src/components/welcome.jsx
index 2a1bfa67..3cb0824d 100644
--- a/client/src/components/welcome.jsx
+++ b/client/src/components/welcome.jsx
@@ -5,7 +5,6 @@ const Login = require('./welcome.login');
const Register = require('./welcome.register');
const Help = require('./welcome.help');
// const About = require('./welcome.about');
-const Demo = require('./demo');
function Welcome() {
const page = this.state.page || 'register';
@@ -33,9 +32,7 @@ function Welcome() {
);
- const main = (['login', 'register', 'help'].includes(page))
- ?
- : ;
+ const main = ;
return (