Last active
June 24, 2019 13:25
-
-
Save daybrush/d278f32ca06e0a64b543093e1d6475af to your computer and use it in GitHub Desktop.
Make a typing effect with Scene.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const text = "Make a typing effect with Scene.js."; | |
const length = text.length; | |
let count = 0; | |
setTimeout(function loop() { | |
element.innerHTML = text.substring(0, count++); | |
if (count >= length) { | |
return; | |
} | |
setTimeout(loop, 200); | |
}, 200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment