Browse Source

Editor: Published project now listens to window resize.

Mr.doob 10 years ago
parent
commit
0eb4905fb6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      editor/js/Menubar.File.js

+ 4 - 0
editor/js/Menubar.File.js

@@ -217,6 +217,10 @@ Menubar.File = function ( editor ) {
 			'',
 			'				document.body.appendChild( player.dom );',
 			'',
+			'				window.addEventListener( \'resize\', function () {',
+			'					player.setSize( window.innerWidth, window.innerHeight );',
+			'				} );',
+			'',
 			'			} );',
 			'',
 			'		</script>',