resize to viewport
This commit is contained in:
parent
cceb5afae8
commit
5bed8aa933
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
*.xdc
|
*.xdc
|
||||||
.nes
|
*.nes
|
||||||
|
*.swp
|
||||||
.DS_Store
|
.DS_Store
|
32
index.html
32
index.html
|
@ -1,29 +1,14 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<title>NES Emulator</title>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="jsnes.js"></script>
|
|
||||||
<script type="text/javascript" src="nes-embed.js"></script>
|
|
||||||
<script>window.onload = function(){nes_load_url("nes-canvas", "mario.nes");}</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div style="margin: auto; width: 75%;">
|
|
||||||
<canvas id="nes-canvas" width="256" height="240" style="width: 100%"/>
|
|
||||||
</div>
|
|
||||||
<p>DPad: Arrow keys<br/>Start: Return, Select: Tab<br/>A Button: A, B Button: S</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- <!DOCTYPE html>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
|
<title>Super Mario Bros. (World)</title>
|
||||||
<script src="webxdc.js"></script>
|
<script src="webxdc.js"></script>
|
||||||
|
<script src="jsnes.min.js"></script>
|
||||||
|
<script src="nes-embed.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="margin: 0;">
|
||||||
|
<!--
|
||||||
<input id="input" type="text"/>
|
<input id="input" type="text"/>
|
||||||
<a href="" onclick="sendMsg(); return false;">Send</a>
|
<a href="" onclick="sendMsg(); return false;">Send</a>
|
||||||
<p id="output"></p>
|
<p id="output"></p>
|
||||||
|
@ -39,6 +24,11 @@
|
||||||
|
|
||||||
window.webxdc.setUpdateListener(receiveUpdate, 0);
|
window.webxdc.setUpdateListener(receiveUpdate, 0);
|
||||||
</script>
|
</script>
|
||||||
|
-->
|
||||||
|
<canvas id="nes-canvas" width="256" height="240" style="width: 100vw; height: 100vh; margin: 0; object-fit: contain;"/>
|
||||||
|
<p>DPad: Arrow keys<br/>Start: Return, Select: Tab<br/>A Button: A, B Button: S</p>
|
||||||
|
<script>
|
||||||
|
nes_load_url("nes-canvas", "Super Mario Bros. (World).nes");
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
-->
|
|
0
jsnes.js → jsnes.min.js
vendored
0
jsnes.js → jsnes.min.js
vendored
Loading…
Reference in a new issue