fix browser events in export html
This commit is contained in:
parent
fa72e4b928
commit
01e5a5c7e8
@ -52,6 +52,8 @@ export class HtmlExporter {
|
|||||||
|
|
||||||
const gamelib = new Gamelib(console, new AssetProvider(), document.querySelector('canvas'));
|
const gamelib = new Gamelib(console, new AssetProvider(), document.querySelector('canvas'));
|
||||||
|
|
||||||
|
gamelib.init();
|
||||||
|
|
||||||
window.karlkoder = {
|
window.karlkoder = {
|
||||||
lib() {
|
lib() {
|
||||||
return gamelib.getAdapter();
|
return gamelib.getAdapter();
|
||||||
@ -65,7 +67,8 @@ ${js}
|
|||||||
<body>
|
<body>
|
||||||
<canvas width="480" height="360"></canvas>
|
<canvas width="480" height="360"></canvas>
|
||||||
</body>
|
</body>
|
||||||
</html>`;
|
</html>
|
||||||
|
`.trim();
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ export function minifyJs(code) {
|
|||||||
.map((line) =>
|
.map((line) =>
|
||||||
line
|
line
|
||||||
.replace(/\/\/.+$/, "")
|
.replace(/\/\/.+$/, "")
|
||||||
.replace(/\) \{/, "){")
|
.replace(/\) \{\n/, "){")
|
||||||
.replace(/ = /g, "=")
|
.replace(/ = /g, "=")
|
||||||
.trim()
|
.trim()
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user