MCPcopy Create free account
hub / github.com/Milkyroad/SCiPNET / typeWriter

Function typeWriter

public/src/js/military.js:303–314  ·  view source on GitHub ↗
(id, txt, callback)

Source from the content-addressed store, hash-verified

301 })
302
303 function typeWriter(id, txt, callback) {
304 if (i < txt.length) {
305 let text = txt.charAt(i);
306 document.getElementById(id).innerHTML += text === "\n" ? "<br/>" : text;
307 i++;
308 setTimeout(function () {
309 typeWriter(id, txt, callback)
310 }, speed);
311 } else {
312 callback()
313 }
314 }
315}
316
317function animateValue(id, start, end, duration) {

Callers 1

typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected