anchor.diff:              }, 0);
             }
           }
  +
  +        // resize the webGL canvas
  +        var resize_webgl = function() {
  +          var $panel= $(".special-panel");
  +          var h = $panel.height();
  +          var w = $panel.width();
  +
  +          var r = w / 1024;
  +          var width = w + 'px';
  +          var height = Math.ceil(600 * r) + 'px';
  +
  +          var $g = $('#gameContainer');
  +          $g.css({ width: width, height: height });
  +          var $c = $g.find('canvas').get(0);
  +          $c.setAttribute('width', parseInt(width));
  +          $c.setAttribute('height', parseInt(height));
  +        }
  +
  +        // dynamic WebGL canvas resizing
  +        reader.on('resized', function() {
  +          resize_webgl();
  +        })
   
           // Open SU panel in WebGL if SU link is clicked
           var click_handler = function(event) {
  
positive.code: 
          // close panel function
          var close_panel = function() {
            var $panel = $('.special-panel');
            if ($panel.length) {
              $('.special-panel').hide();
  
negative.code:             gameInstance = UnityLoader.instantiate("gameContainer", "<%= "#{@unity_json}" %>", options );
            } else {
              // resize the webGL canvas
              resize_webgl();
            }
  
            // resize EPUB
  