This commit is contained in:
2025-12-21 10:38:43 -06:00
parent 5cca719ef5
commit 8b9bee0011

View File

@@ -33,13 +33,13 @@ log.console("Loading lenna.png...")
var img_blob = io.slurp("lenna.png")
if (!img_blob) {
log.console("Error: Could not load lenna.png")
$_.stop()
$stop()
}
var img = png.decode(img_blob)
if (!img) {
log.console("Error: Could not decode lenna.png")
$_.stop()
$stop()
}
log.console("Image loaded: " + text(img.width) + "x" + text(img.height))
@@ -76,7 +76,7 @@ var last_time = time.number()
function frame() {
if (!running) {
log.console("Exiting...")
$_.stop()
$stop()
return
}
@@ -120,7 +120,7 @@ function frame() {
renderer.present()
// Schedule next frame
$_.delay(frame, 1/60)
$delay(frame, 1/60)
}
log.console("Starting render loop... Press ESC to exit, WASD to move")