import { Application } from '<%= applicationJS %>';

const canvas = document.getElementById('GameCanvas');
const $p = canvas.parentElement;
const bcr = $p.getBoundingClientRect();
canvas.width = bcr.width;
canvas.height = bcr.height;

function topLevelImport (url) {
    return System.import(url);
}

const application = new Application();

topLevelImport('cc')
.then((engine) => {
    return application.init(engine);
}).then(() => {
    return application.start();
}).catch((err) => {
    console.error(err);
});
