getTopOffset = function getTopOffset(el) {
            var topOffset = 0;

            while (el && !isNaN(el.offsetTop)) {
              topOffset += el.offsetTop - el.scrollTop;
              el = el.offsetParent;
            }

            return topOffset;
          }
Set/reset container sizes and WebGL viewport sizes
*