Commit a0e7e624a5e81ce0dcd3a91ea4c783ffc2b75be3
1 parent
020ecc65
Exists in
master
Fix window size
Showing
3 changed files
with
5 additions
and
7 deletions
Show diff stats
app/main.js
1 | -(function () { | |
2 | - var $player = document.getElementById('player'); | |
1 | +document.addEventListener("DOMContentLoaded", function(event) { | |
2 | + var $player = document.getElementById('canvas'); | |
3 | 3 | |
4 | 4 | $player.width = window.innerWidth; |
5 | - $player.height = window.innerHeight; | |
6 | -})(); | |
7 | 5 | \ No newline at end of file |
6 | + $player.height = window.innerHeight; | |
7 | +}); | |
8 | 8 | \ No newline at end of file | ... | ... |
app/window.html
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <body class="template"> |
13 | 13 | <p class="header"><span>Unity WebGL Player | </span>VLibrasTest</p> |
14 | 14 | <div class="template-wrap clear"> |
15 | - <canvas id="player" class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas> | |
15 | + <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas> | |
16 | 16 | </div> |
17 | 17 | <p class="footer">« created with <a href="http://unity3d.com/" title="Go to unity3d.com">Unity</a> »</p> |
18 | 18 | <script src="connect.js"></script> | ... | ... |