diff --git a/index.html b/index.html
index 5015c0f..04cfb39 100644
--- a/index.html
+++ b/index.html
@@ -129,7 +129,7 @@ lib.startGameLoop(loop);
![]()
-
test
+
diff --git a/src/gamelib.js b/src/gamelib.js
index 1d01b3e..3f49570 100644
--- a/src/gamelib.js
+++ b/src/gamelib.js
@@ -37,7 +37,11 @@ export class Gamelib {
const now = Date.now();
const deltaT = (now - before) / 1000;
before = now;
- loopFunction(deltaT);
+ try {
+ loopFunction(deltaT);
+ } catch (error) {
+ this.console.log(error);
+ }
}, 16);
if (this.codeStopper.isStopped()) {
diff --git a/src/sprite_editor.js b/src/sprite_editor.js
index 4392f2d..971e332 100644
--- a/src/sprite_editor.js
+++ b/src/sprite_editor.js
@@ -59,7 +59,7 @@ export class SpriteEditor {
this.preview.image.src = `data:${sprite.mime};base64,${sprite.bytes.toBase64()}`;
const sanitizedName = sprite.name.replace(/" +
+ this.preview.snippet.innerHTML = "lib.drawSprite(
" +
" x, y,
" +
" width, height,
" +
` "${sanitizedName}"
` +
diff --git a/style.css b/style.css
index 71b710b..233fa43 100644
--- a/style.css
+++ b/style.css
@@ -50,14 +50,13 @@ section canvas {
}
section {
- border-bottom-left-radius: 0.5rem;
- border-bottom-right-radius: 0.5rem;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
- overflow-y: hidden;
}
section > :last-child {
flex: 1;
+ border-bottom-left-radius: 0.5rem;
+ border-bottom-right-radius: 0.5rem;
}
div#buttons {