resize to viewport
This commit is contained in:
parent
cceb5afae8
commit
5bed8aa933
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
*.xdc
|
||||
.nes
|
||||
.DS_Store
|
||||
*.nes
|
||||
*.swp
|
||||
.DS_Store
|
||||
|
|
32
index.html
32
index.html
|
@ -1,29 +1,14 @@
|
|||
<!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>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Super Mario Bros. (World)</title>
|
||||
<script src="webxdc.js"></script>
|
||||
<script src="jsnes.min.js"></script>
|
||||
<script src="nes-embed.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="margin: 0;">
|
||||
<!--
|
||||
<input id="input" type="text"/>
|
||||
<a href="" onclick="sendMsg(); return false;">Send</a>
|
||||
<p id="output"></p>
|
||||
|
@ -39,6 +24,11 @@
|
|||
|
||||
window.webxdc.setUpdateListener(receiveUpdate, 0);
|
||||
</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>
|
||||
</html>
|
||||
-->
|
0
jsnes.js → jsnes.min.js
vendored
0
jsnes.js → jsnes.min.js
vendored
Loading…
Reference in a new issue