Web, Commodore, Windows version, Linux standalone, Windows Screensaver complete.
This commit is contained in:
parent
47730936de
commit
9257f21598
19 changed files with 794 additions and 18 deletions
16
web/vectorgons-boot.js
Normal file
16
web/vectorgons-boot.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Emscripten Module config, in an external file so it loads under a strict CSP
|
||||
// (script-src 'self') without needing 'unsafe-inline'. Must load BEFORE
|
||||
// vectorgons.js. The canvas (id="canvas") must already exist in the DOM.
|
||||
var Module = {
|
||||
canvas: (function () {
|
||||
var c = document.getElementById('canvas');
|
||||
c.addEventListener('click', function () { c.focus(); });
|
||||
// Don't let arrow keys / space scroll the page while playing.
|
||||
c.addEventListener('keydown', function (e) {
|
||||
if ([32, 37, 38, 39, 40].indexOf(e.keyCode) >= 0) e.preventDefault();
|
||||
});
|
||||
return c;
|
||||
})(),
|
||||
print: function (t) { console.log(t); },
|
||||
printErr: function (t) { console.error(t); }
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue