From f88a2e327b722bf24c5183ab9da70c1969132c50 Mon Sep 17 00:00:00 2001 From: "Toerd@480" Date: Thu, 24 Oct 2019 13:58:32 +0200 Subject: [PATCH] Added variation in font size --- inc/js/main.js | 1 + inc/js/text.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/js/main.js b/inc/js/main.js index d080e8b..ee5c415 100644 --- a/inc/js/main.js +++ b/inc/js/main.js @@ -62,6 +62,7 @@ function initialize() { } } +// this scroll is NOT smooth function doSlide(elem, dist) { console.log(dist); let hM = elem.scrollHeight; diff --git a/inc/js/text.js b/inc/js/text.js index 0d6e05c..3c22a0a 100644 --- a/inc/js/text.js +++ b/inc/js/text.js @@ -57,7 +57,7 @@ async function flyingText(canvas) { // add the stuff that should be animated (transition in class) curr.style.transform = `translate(${x}px, ${y}px)`; - curr.style.fontSize = `2.8vw`; + curr.style.fontSize = `${Math.random() + Math.random() + 1.0}vw`; // wait to remove it (async) setTimeout(() => {