docs/example-app/script/index.js
function startControlsTimeOut () {

      clearTimeout(controlsTimeout);

      if (controlsElement.style.display === "block") {
        controlsTimeout = setTimeout(function () {
          toggleControls();
        }, 5000);
      } else {
        toggleControls();
      }
    }
function startControlsTimeOut () {

      clearTimeout(controlsTimeout);

      if (controlsElement.style.display === "block") {
        controlsTimeout = setTimeout(function () {
          toggleControls();
        }, 5000);
      } else {
        toggleControls();
      }
    }
function startControlsTimeOut ( ) { clearTimeout ( controlsTimeout ) ; if ( controlsElement . style . display === "block" ) { controlsTimeout = setTimeout ( function ( ) { toggleControls ( ) ; } , 5000 ) ; } else { toggleControls ( ) ; } }
Timeout feature for controls
Timeout feature for controls