From 428d3a2c78a1293c34dbce93404284c321e8af49 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 18 Sep 2018 18:00:44 +1000 Subject: [PATCH] preact init --- client/index.js | 3 ++- client/{src => lib}/fizzy-noise.js | 0 client/{src => lib}/fizzy-text.js | 5 ++--- client/package.json | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) rename client/{src => lib}/fizzy-noise.js (100%) rename client/{src => lib}/fizzy-text.js (97%) diff --git a/client/index.js b/client/index.js index 91db71b2..c91ba756 100755 --- a/client/index.js +++ b/client/index.js @@ -1,6 +1,7 @@ const { toast } = require('bulma-toast'); +const { h, render } = require('preact'); -const fizzyText = require('./src/fizzy-text'); +const fizzyText = require('./lib/fizzy-text'); fizzyText('cryps'); diff --git a/client/src/fizzy-noise.js b/client/lib/fizzy-noise.js similarity index 100% rename from client/src/fizzy-noise.js rename to client/lib/fizzy-noise.js diff --git a/client/src/fizzy-text.js b/client/lib/fizzy-text.js similarity index 97% rename from client/src/fizzy-text.js rename to client/lib/fizzy-text.js index cc984b08..ac69885c 100644 --- a/client/src/fizzy-text.js +++ b/client/lib/fizzy-text.js @@ -10,9 +10,9 @@ function fizzyText(message) { this.growthSpeed = 0.2; // how fast do particles change size? this.minSize = 1; - this.maxSize = 5.59; // how big can they get? + this.maxSize = 4; // how big can they get? this.noiseStrength = 10; // how turbulent is the flow? - this.speed = 0.8; // how fast do particles move? + this.speed = 0.4; // how fast do particles move? this.displayOutline = false; // should we draw the message as a stroke? this.framesRendered = 0; @@ -192,7 +192,6 @@ function fizzyText(message) { this.r = 0; this.x = Math.random() * width; this.y = Math.random() * height; - // this.y = height + (Math.random() * 2 - 1); return false; } diff --git a/client/package.json b/client/package.json index 93976c2b..6e3a0292 100755 --- a/client/package.json +++ b/client/package.json @@ -17,6 +17,9 @@ "eslint-config-airbnb-base": "^11.1.1", "eslint-plugin-import": "^2.2.0", "jest": "^18.0.0", - "parcel": "^1.9.7" + "parcel": "^1.9.7", + "preact": "^8.3.1", + "preact-redux": "^2.0.3", + "redux": "^4.0.0" } }