Skip to content

Commit c753cec

Browse files
committed
update engine
1 parent 86a1c21 commit c753cec

File tree

4 files changed

+333
-333
lines changed

4 files changed

+333
-333
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"author": "Luiz Bills",
1818
"license": "MIT",
1919
"devDependencies": {
20-
"esbuild": "^0.25.10"
20+
"esbuild": "^0.25.12"
2121
},
2222
"dependencies": {
23-
"@babel/standalone": "^7.28.4",
23+
"@babel/standalone": "^7.28.5",
2424
"@codemirror/lang-javascript": "^6.2.4",
2525
"@codemirror/theme-one-dark": "^6.1.3",
2626
"@litecanvas/plugin-asset-loader": "latest",

public/js/app.js

Lines changed: 320 additions & 320 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/litecanvas.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
var assert = (condition, message = "Assertion failed") => {
2828
if (!condition) throw new Error(message);
2929
};
30-
var version = "0.100.0";
30+
var version = "0.100.1";
3131
function litecanvas(settings = {}) {
3232
const root = window, math = Math, TWO_PI = math.PI * 2, raf = requestAnimationFrame, _browserEventListeners = [], on = (elem, evt, callback) => {
3333
elem.addEventListener(evt, callback, false);
@@ -625,10 +625,10 @@
625625
* @param {number} y
626626
* @param {CanvasImageSource} source
627627
*/
628-
image(x, y, source) {
628+
image(x, y, source2) {
629629
DEV: assert(isNumber(x), "[litecanvas] image() 1st param must be a number");
630630
DEV: assert(isNumber(y), "[litecanvas] image() 2nd param must be a number");
631-
_ctx.drawImage(source, ~~x, ~~y);
631+
_ctx.drawImage(source2, ~~x, ~~y);
632632
},
633633
/**
634634
* Draw a sprite pxiel by pixel represented by a string. Each pixel must be a base 36 number (0-9 or a-z) or a dot.
@@ -1099,13 +1099,6 @@
10991099
instance[k] = math[k];
11001100
}
11011101
function init() {
1102-
const source = settings.loop ? settings.loop : root;
1103-
for (const event of _coreEvents.split(",")) {
1104-
DEV: if (root === source && source[event]) {
1105-
console.info(`[litecanvas] using window.${event}()`);
1106-
}
1107-
if (source[event]) instance.listen(event, source[event]);
1108-
}
11091102
if (settings.autoscale) {
11101103
on(root, "resize", resizeCanvas);
11111104
}
@@ -1441,6 +1434,13 @@
14411434
DEV: console.info(`[litecanvas] version ${version} started`);
14421435
DEV: console.debug(`[litecanvas] litecanvas() options =`, settings);
14431436
setupCanvas();
1437+
const source = settings.loop ? settings.loop : root;
1438+
for (const event of _coreEvents.split(",")) {
1439+
DEV: if (root === source && source[event]) {
1440+
console.info(`[litecanvas] using window.${event}()`);
1441+
}
1442+
if (source[event]) instance.listen(event, source[event]);
1443+
}
14441444
if ("loading" === document.readyState) {
14451445
on(root, "DOMContentLoaded", () => raf(init));
14461446
} else {

public/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const cacheName = "luizbills.litecanvas-editor-v1";
2-
const version = "2025.9.26.2";
2+
const version = "2025.11.6.0";
33

44
const precacheResources = [
55
"/",

0 commit comments

Comments
 (0)