Skip to content
Merged

v0.94 #209

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "litecanvas",
"version": "0.93.2",
"version": "0.94.0",
"description": "Lightweight HTML5 canvas 2D game engine suitable for small projects and creative coding. Inspired by PICO-8 and P5/Processing.",
"license": "MIT",
"author": "Luiz Bills <luizbills@pm.me>",
Expand Down
7 changes: 2 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ export default function litecanvas(settings = {}) {
*/
function drawFrame(now) {
if (!settings.animate) {
return instance.emit('draw')
return instance.emit('draw', _ctx)
}
// request the next frame
// only when the engine loop are not paused (_rafid >= 1)
Expand All @@ -1550,7 +1550,7 @@ export default function litecanvas(settings = {}) {
}

if (updated) {
instance.emit('draw')
instance.emit('draw', _ctx)
}
}

Expand Down Expand Up @@ -1638,9 +1638,6 @@ export default function litecanvas(settings = {}) {
// note: not triggered before the "init" event
instance.emit('resized', _scale)

// paint a temporary background
instance.cls(0)

// force redraw when the canvas is not animated
if (!settings.animate) {
raf(drawFrame)
Expand Down
2 changes: 1 addition & 1 deletion src/version.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.