-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
30 lines (27 loc) · 820 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
System.register(["./application.js"], function (_export, _context) {
"use strict";
var Application, canvas, $p, bcr, application;
function topLevelImport(url) {
return System["import"](url);
}
return {
setters: [function (_applicationJs) {
Application = _applicationJs.Application;
}],
execute: function () {
canvas = document.getElementById('GameCanvas');
$p = canvas.parentElement;
bcr = $p.getBoundingClientRect();
canvas.width = bcr.width;
canvas.height = bcr.height;
application = new Application();
topLevelImport('cc').then(function (engine) {
return application.init(engine);
}).then(function () {
return application.start();
})["catch"](function (err) {
console.error(err);
});
}
};
});