Skip to content

Commit b9290e5

Browse files
authored
Merge pull request #209 from litecanvas/next
v0.94
2 parents 724cf3e + 8f46437 commit b9290e5

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "litecanvas",
3-
"version": "0.93.2",
3+
"version": "0.94.0",
44
"description": "Lightweight HTML5 canvas 2D game engine suitable for small projects and creative coding. Inspired by PICO-8 and P5/Processing.",
55
"license": "MIT",
66
"author": "Luiz Bills <luizbills@pm.me>",

src/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ export default function litecanvas(settings = {}) {
15261526
*/
15271527
function drawFrame(now) {
15281528
if (!settings.animate) {
1529-
return instance.emit('draw')
1529+
return instance.emit('draw', _ctx)
15301530
}
15311531
// request the next frame
15321532
// only when the engine loop are not paused (_rafid >= 1)
@@ -1550,7 +1550,7 @@ export default function litecanvas(settings = {}) {
15501550
}
15511551

15521552
if (updated) {
1553-
instance.emit('draw')
1553+
instance.emit('draw', _ctx)
15541554
}
15551555
}
15561556

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

1641-
// paint a temporary background
1642-
instance.cls(0)
1643-
16441641
// force redraw when the canvas is not animated
16451642
if (!settings.animate) {
16461643
raf(drawFrame)

src/version.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)