src/main/modules/Site.js
function presentRendering(selector, classNames, speed) {
    const text = document.getElementById(selector).childNodes[0];
    const thisLength = text.length;

    const render = (autoMarkText, cp, length) => {
      let c = cp;
      const r = new Rendering(document, {
        className: classNames
      });
      const range = document.createRange();
      range.setStart(autoMarkText, 0);
      range.setEnd(autoMarkText, 1);
      r.renderWithRange(range);
      if (autoMarkText.parentNode.nextSibling) {
        const nextText = autoMarkText.parentNode.nextSibling.childNodes[0];
        setTimeout(() => {
          render(nextText, ++c, length);
        }, speed);
      }
    };

    return render(text, 0, thisLength);
  }
function presentRendering(selector, classNames, speed) {
    const text = document.getElementById(selector).childNodes[0];
    const thisLength = text.length;

    const render = (autoMarkText, cp, length) => {
      let c = cp;
      const r = new Rendering(document, {
        className: classNames
      });
      const range = document.createRange();
      range.setStart(autoMarkText, 0);
      range.setEnd(autoMarkText, 1);
      r.renderWithRange(range);
      if (autoMarkText.parentNode.nextSibling) {
        const nextText = autoMarkText.parentNode.nextSibling.childNodes[0];
        setTimeout(() => {
          render(nextText, ++c, length);
        }, speed);
      }
    };

    return render(text, 0, thisLength);
  }
function presentRendering ( selector , classNames , speed ) { const text = document . getElementById ( selector ) . childNodes [ 0 ] ; const thisLength = text . length ; const render = ( autoMarkText , cp , length ) => { let c = cp ; const r = new Rendering ( document , { className : classNames } ) ; const range = document . createRange ( ) ; range . setStart ( autoMarkText , 0 ) ; range . setEnd ( autoMarkText , 1 ) ; r . renderWithRange ( range ) ; if ( autoMarkText . parentNode . nextSibling ) { const nextText = autoMarkText . parentNode . nextSibling . childNodes [ 0 ] ; setTimeout ( ( ) => { render ( nextText , ++ c , length ) ; } , speed ) ; } } ; return render ( text , 0 , thisLength ) ; }
Creates an animated rendering
Creates an animated rendering