Browse Source

Editor: Published project now listens to window resize.

Mr.doob 10 năm trước cách đây
mục cha
commit
0eb4905fb6
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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>',