Skip to content

Commit 71052d6

Browse files
committed
update engine
1 parent f2bba34 commit 71052d6

File tree

5 files changed

+54
-55
lines changed

5 files changed

+54
-55
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"esbuild": "^0.25.8"
2121
},
2222
"dependencies": {
23-
"@babel/standalone": "^7.28.1",
23+
"@babel/standalone": "^7.28.2",
2424
"@codemirror/lang-javascript": "^6.2.4",
2525
"@codemirror/theme-one-dark": "^6.1.3",
2626
"@litecanvas/plugin-asset-loader": "latest",

public/about.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ <h2><a id="settings">Game Configuration</a></h2>
348348

349349
// If `true`, the pixel art images won't look blurry.
350350
// Also, disables canvas built-in antialias.
351-
settings.pixelart = false
351+
settings.pixelart = true
352352

353353
// exposes all methods and properties (see below)
354354
// in the global scope
@@ -527,7 +527,10 @@ <h2><a id="keyboard">Functions for Keyboard</a></h2>
527527
// Checks if any or which key just got pressed in your keyboard.
528528
// example: iskeypressed('space') // returns true if space bar was pressed
529529
// example: iskeypressed() // returns true for any key
530-
iskeypressed(key: string): boolean</code></pre>
530+
iskeypressed(key: string): boolean
531+
532+
// Returns the last key pressed in your keyboard.
533+
lastkey(): string</code></pre>
531534

532535
<h2><a id="math">Functions for Math</a></h2>
533536

@@ -775,9 +778,7 @@ <h3>Public assets</h3>
775778

776779
<pre><code class="language-typescript" data-copy="size-bg pos-absolute">let sprites;
777780

778-
litecanvas({
779-
pixelart: true
780-
})
781+
litecanvas()
781782

782783
function init() {
783784
// first, load the spritesheet image

public/app.js

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

public/litecanvas.js

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
var assert = (condition, message = "Assertion failed") => {
2828
if (!condition) throw new Error(message);
2929
};
30-
var version = "0.94.1";
30+
var version = "0.95.0";
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);
3434
_browserEventListeners.push(() => elem.removeEventListener(evt, callback, false));
35-
}, beginPath = (c) => c.beginPath(), isNumber = Number.isFinite, zzfx = setupZzFX(root), defaults = {
35+
}, preventDefault = (ev) => ev.preventDefault(), beginPath = (c) => c.beginPath(), isNumber = Number.isFinite, zzfx = setupZzFX(root), defaults = {
3636
width: null,
3737
height: null,
3838
autoscale: true,
39-
pixelart: false,
39+
pixelart: true,
4040
canvas: null,
4141
global: true,
4242
loop: null,
@@ -1099,11 +1099,6 @@
10991099
* @param {{t: number}} tap
11001100
*/
11011101
(tap) => tap && Date.now() - tap.t <= 300
1102-
), preventDefault = (
1103-
/**
1104-
* @param {Event} ev
1105-
*/
1106-
(ev) => ev.preventDefault()
11071102
);
11081103
let _pressingMouse = false;
11091104
on(
@@ -1224,11 +1219,13 @@
12241219
key = key.toLowerCase();
12251220
return !key ? keySet.size > 0 : keySet.has("space" === key ? " " : key);
12261221
};
1222+
let _lastKey = "";
12271223
on(root, "keydown", (event) => {
12281224
const key = event.key.toLowerCase();
12291225
if (!_keysDown.has(key)) {
12301226
_keysDown.add(key);
12311227
_keysPress.add(key);
1228+
_lastKey = key === " " ? "space" : key;
12321229
}
12331230
});
12341231
on(root, "keyup", (event) => {
@@ -1239,9 +1236,6 @@
12391236
instance.def(
12401237
"iskeydown",
12411238
/**
1242-
* Checks if a which key is pressed (down) on the keyboard.
1243-
* Note: use `iskeydown()` to check for any key.
1244-
*
12451239
* @param {string} [key]
12461240
* @returns {boolean}
12471241
*/
@@ -1256,9 +1250,6 @@
12561250
instance.def(
12571251
"iskeypressed",
12581252
/**
1259-
* Checks if a which key just got pressed on the keyboard.
1260-
* Note: use `iskeypressed()` to check for any key.
1261-
*
12621253
* @param {string} [key]
12631254
* @returns {boolean}
12641255
*/
@@ -1270,6 +1261,13 @@
12701261
return keyCheck(_keysPress, key);
12711262
}
12721263
);
1264+
instance.def(
1265+
"lastkey",
1266+
/**
1267+
* @returns {string}
1268+
*/
1269+
() => _lastKey
1270+
);
12731271
}
12741272
_initialized = true;
12751273
instance.emit("init", instance);
@@ -2215,44 +2213,44 @@
22152213
window.pluginFrameRateMeter = E;
22162214
})();
22172215
(() => {
2218-
var k = [[24, 60, 60, 24, 24, , 24], [54, 54, , , , , ,], [54, 54, 127, 54, 127, 54, 54], [12, 62, 3, 30, 48, 31, 12], [, 99, 51, 24, 12, 102, 99], [28, 54, 28, 110, 59, 51, 110], [6, 6, 3, , , , ,], [24, 12, 6, 6, 6, 12, 24], [6, 12, 24, 24, 24, 12, 6], [, 102, 60, 255, 60, 102, ,], [, 12, 12, 63, 12, 12, ,], [, , , , , 12, 12, 6], [, , , 63, , , ,], [, , , , , 12, 12], [96, 48, 24, 12, 6, 3, 1], [62, 99, 115, 123, 111, 103, 62], [12, 14, 12, 12, 12, 12, 63], [30, 51, 48, 28, 6, 51, 63], [30, 51, 48, 28, 48, 51, 30], [56, 60, 54, 51, 127, 48, 120], [63, 3, 31, 48, 48, 51, 30], [28, 6, 3, 31, 51, 51, 30], [63, 51, 48, 24, 12, 12, 12], [30, 51, 51, 30, 51, 51, 30], [30, 51, 51, 62, 48, 24, 14], [, 12, 12, , , 12, 12], [, 12, 12, , , 12, 12, 6], [24, 12, 6, 3, 6, 12, 24], [, , 63, , , 63, ,], [6, 12, 24, 48, 24, 12, 6], [30, 51, 48, 24, 12, , 12], [62, 99, 123, 123, 123, 3, 30], [12, 30, 51, 51, 63, 51, 51], [63, 102, 102, 62, 102, 102, 63], [60, 102, 3, 3, 3, 102, 60], [31, 54, 102, 102, 102, 54, 31], [127, 70, 22, 30, 22, 70, 127], [127, 70, 22, 30, 22, 6, 15], [60, 102, 3, 3, 115, 102, 124], [51, 51, 51, 63, 51, 51, 51], [30, 12, 12, 12, 12, 12, 30], [120, 48, 48, 48, 51, 51, 30], [103, 102, 54, 30, 54, 102, 103], [15, 6, 6, 6, 70, 102, 127], [99, 119, 127, 127, 107, 99, 99], [99, 103, 111, 123, 115, 99, 99], [28, 54, 99, 99, 99, 54, 28], [63, 102, 102, 62, 6, 6, 15], [30, 51, 51, 51, 59, 30, 56], [63, 102, 102, 62, 54, 102, 103], [30, 51, 7, 14, 56, 51, 30], [63, 45, 12, 12, 12, 12, 30], [51, 51, 51, 51, 51, 51, 63], [51, 51, 51, 51, 51, 30, 12], [99, 99, 99, 107, 127, 119, 99], [99, 99, 54, 28, 28, 54, 99], [51, 51, 51, 30, 12, 12, 30], [127, 99, 49, 24, 76, 102, 127], [30, 6, 6, 6, 6, 6, 30], [3, 6, 12, 24, 48, 96, 64], [30, 24, 24, 24, 24, 24, 30], [8, 28, 54, 99, , , ,], [, , , , , , , 255], [12, 12, 24, , , , ,], [, , 30, 48, 62, 51, 110], [7, 6, 6, 62, 102, 102, 59], [, , 30, 51, 3, 51, 30], [56, 48, 48, 62, 51, 51, 110], [, , 30, 51, 63, 3, 30], [28, 54, 6, 15, 6, 6, 15], [, , 110, 51, 51, 62, 48, 31], [7, 6, 54, 110, 102, 102, 103], [12, , 14, 12, 12, 12, 30], [48, , 48, 48, 48, 51, 51, 30], [7, 6, 102, 54, 30, 54, 103], [14, 12, 12, 12, 12, 12, 30], [, , 51, 127, 127, 107, 99], [, , 31, 51, 51, 51, 51], [, , 30, 51, 51, 51, 30], [, , 59, 102, 102, 62, 6, 15], [, , 110, 51, 51, 62, 48, 120], [, , 59, 110, 102, 6, 15], [, , 62, 3, 30, 48, 31], [8, 12, 62, 12, 12, 44, 24], [, , 51, 51, 51, 51, 110], [, , 51, 51, 51, 30, 12], [, , 99, 107, 127, 127, 54], [, , 99, 54, 28, 54, 99], [, , 51, 51, 51, 62, 48, 31], [, , 63, 25, 12, 38, 63], [56, 12, 12, 7, 12, 12, 56], [24, 24, 24, , 24, 24, 24], [7, 12, 12, 56, 12, 12, 7], [110, 59, , , , , ,]], w = { id: "basic", chars: k, first: 33, w: 8, h: 8 };
2219-
var D = [[2, 2, 2, , 2], [5, 5], [5, 7, 5, 7, 5], [6, 3, 6, 7, 2], [5, 4, 2, 1, 5], [6, 3, 6, 5, 6], [2, 2, , , ,], [2, 1, 1, 1, 2], [2, 4, 4, 4, 2], [5, 2, 5], [, 2, 7, 2], [, , , , 2, 1], [, , 7], [, , , , 1], [4, 4, 2, 1, 1], [7, 5, 5, 5, 7], [3, 2, 2, 2, 7], [7, 4, 7, 1, 7], [7, 4, 7, 4, 7], [5, 5, 7, 4, 4], [7, 1, 7, 4, 7], [7, 1, 7, 5, 7], [7, 4, 4, 4, 4], [7, 5, 7, 5, 7], [7, 5, 7, 4, 7], [, , 2, , 2], [, , 2, , 2, 1], [4, 2, 1, 2, 4], [, 7, , 7], [1, 2, 4, 2, 1], [7, 4, 6, , 2], [2, 5, 5, 1, 6], [2, 5, 7, 5, 5], [3, 5, 3, 5, 3], [6, 1, 1, 1, 6], [3, 5, 5, 5, 3], [7, 1, 3, 1, 7], [7, 1, 3, 1, 1], [6, 1, 5, 5, 6], [5, 5, 7, 5, 5], [7, 2, 2, 2, 7], [4, 4, 4, 5, 2], [5, 5, 3, 5, 5], [1, 1, 1, 1, 7], [5, 7, 7, 5, 5], [7, 5, 5, 5, 5], [2, 5, 5, 5, 2], [7, 5, 7, 1, 1], [6, 5, 5, 3, 6], [3, 5, 3, 5, 5], [6, 1, 7, 4, 3], [7, 2, 2, 2, 2], [5, 5, 5, 5, 7], [5, 5, 5, 2, 2], [5, 5, 7, 7, 5], [5, 5, 2, 5, 5], [5, 5, 2, 2, 2], [7, 4, 2, 1, 7], [6, 2, 2, 2, 6], [1, 1, 2, 4, 4], [3, 2, 2, 2, 3], [2, 5], [, , , , 7], [1, 2], [, 6, 5, 5, 6], [1, 3, 5, 5, 3], [, 6, 1, 1, 6], [4, 6, 5, 5, 6], [, 2, 5, 3, 6], [4, 2, 7, 2, 2], [, 2, 5, 6, 4, 2], [1, 1, 3, 5, 5], [, 2, , 2, 2], [, 2, , 2, 2, 1], [1, 5, 3, 5, 5], [2, 2, 2, 2, 4], [, 5, 7, 5, 5], [, 3, 5, 5, 5], [, 2, 5, 5, 2], [, 3, 5, 5, 3, 1], [, 6, 5, 5, 6, 4], [, 2, 5, 1, 1], [, 6, 1, 4, 3], [2, 7, 2, 2, 4], [, 5, 5, 5, 6], [, 5, 5, 2, 2], [, 5, 5, 7, 5], [, 5, 2, 2, 5], [, 5, 5, 6, 4, 2], [, 7, 4, 1, 7], [6, 2, 1, 2, 6], [2, 2, 2, 2, 2], [3, 2, 4, 2, 3], [, 3, 6]], g = { id: "mini", chars: D, first: 33, w: 4, h: 6 };
2220-
var y = plugin = (e, { cache: m = true } = {}) => {
2221-
let _ = e.text, A = e.textsize, E = e.textalign, z = e.textfont, C = w, T = g, c = m ? /* @__PURE__ */ new Map() : null, b = 300, a = 1, t = null, d = (x) => {
2222-
a = ~~Math.round(x);
2223-
}, F = () => console.warn("[litecanvas/plugin-pixel-font] textalign() has not yet been implemented for pixel fonts"), v = (x, o, r, s = 3) => {
2224-
let l = t.h || t.w;
2225-
for (let i = 0; i < l; i++) for (let n = 0; n < t.w; n++) (r[i] | 0) & 1 << n && e.rectfill(x + n * a, o + i * a, a, a, s);
2226-
}, I = (x, o, r, s = 3) => {
2227-
if (r += "", !a || !r.length) return;
2228-
let l = a * t.w, i = a * (t.h || t.w);
2229-
for (let n = 0; n < r.length; n++) {
2230-
let u = r[n], S = u.charCodeAt(), f = t.chars[S - t.first];
2231-
if (f) if (m) {
2232-
let p = `${t.id}:${u}:${~~s}:${l}`;
2233-
c.has(p) || c.set(p, e.paint(l, i, () => {
2234-
v(0, 0, f, ~~s);
2216+
var F = [[24, 60, 60, 24, 24, , 24], [54, 54, , , , , ,], [54, 54, 127, 54, 127, 54, 54], [12, 62, 3, 30, 48, 31, 12], [, 99, 51, 24, 12, 102, 99], [28, 54, 28, 110, 59, 51, 110], [6, 6, 3, , , , ,], [24, 12, 6, 6, 6, 12, 24], [6, 12, 24, 24, 24, 12, 6], [, 102, 60, 255, 60, 102, ,], [, 12, 12, 63, 12, 12, ,], [, , , , , 12, 12, 6], [, , , 63, , , ,], [, , , , , 12, 12], [96, 48, 24, 12, 6, 3, 1], [62, 99, 115, 123, 111, 103, 62], [12, 14, 12, 12, 12, 12, 63], [30, 51, 48, 28, 6, 51, 63], [30, 51, 48, 28, 48, 51, 30], [56, 60, 54, 51, 127, 48, 120], [63, 3, 31, 48, 48, 51, 30], [28, 6, 3, 31, 51, 51, 30], [63, 51, 48, 24, 12, 12, 12], [30, 51, 51, 30, 51, 51, 30], [30, 51, 51, 62, 48, 24, 14], [, 12, 12, , , 12, 12], [, 12, 12, , , 12, 12, 6], [24, 12, 6, 3, 6, 12, 24], [, , 63, , , 63, ,], [6, 12, 24, 48, 24, 12, 6], [30, 51, 48, 24, 12, , 12], [62, 99, 123, 123, 123, 3, 30], [12, 30, 51, 51, 63, 51, 51], [63, 102, 102, 62, 102, 102, 63], [60, 102, 3, 3, 3, 102, 60], [31, 54, 102, 102, 102, 54, 31], [127, 70, 22, 30, 22, 70, 127], [127, 70, 22, 30, 22, 6, 15], [60, 102, 3, 3, 115, 102, 124], [51, 51, 51, 63, 51, 51, 51], [30, 12, 12, 12, 12, 12, 30], [120, 48, 48, 48, 51, 51, 30], [103, 102, 54, 30, 54, 102, 103], [15, 6, 6, 6, 70, 102, 127], [99, 119, 127, 127, 107, 99, 99], [99, 103, 111, 123, 115, 99, 99], [28, 54, 99, 99, 99, 54, 28], [63, 102, 102, 62, 6, 6, 15], [30, 51, 51, 51, 59, 30, 56], [63, 102, 102, 62, 54, 102, 103], [30, 51, 7, 14, 56, 51, 30], [63, 45, 12, 12, 12, 12, 30], [51, 51, 51, 51, 51, 51, 63], [51, 51, 51, 51, 51, 30, 12], [99, 99, 99, 107, 127, 119, 99], [99, 99, 54, 28, 28, 54, 99], [51, 51, 51, 30, 12, 12, 30], [127, 99, 49, 24, 76, 102, 127], [30, 6, 6, 6, 6, 6, 30], [3, 6, 12, 24, 48, 96, 64], [30, 24, 24, 24, 24, 24, 30], [8, 28, 54, 99, , , ,], [, , , , , , , 255], [12, 12, 24, , , , ,], [, , 30, 48, 62, 51, 110], [7, 6, 6, 62, 102, 102, 59], [, , 30, 51, 3, 51, 30], [56, 48, 48, 62, 51, 51, 110], [, , 30, 51, 63, 3, 30], [28, 54, 6, 15, 6, 6, 15], [, , 110, 51, 51, 62, 48, 31], [7, 6, 54, 110, 102, 102, 103], [12, , 14, 12, 12, 12, 30], [48, , 48, 48, 48, 51, 51, 30], [7, 6, 102, 54, 30, 54, 103], [14, 12, 12, 12, 12, 12, 30], [, , 51, 127, 127, 107, 99], [, , 31, 51, 51, 51, 51], [, , 30, 51, 51, 51, 30], [, , 59, 102, 102, 62, 6, 15], [, , 110, 51, 51, 62, 48, 120], [, , 59, 110, 102, 6, 15], [, , 62, 3, 30, 48, 31], [8, 12, 62, 12, 12, 44, 24], [, , 51, 51, 51, 51, 110], [, , 51, 51, 51, 30, 12], [, , 99, 107, 127, 127, 54], [, , 99, 54, 28, 54, 99], [, , 51, 51, 51, 62, 48, 31], [, , 63, 25, 12, 38, 63], [56, 12, 12, 7, 12, 12, 56], [24, 24, 24, , 24, 24, 24], [7, 12, 12, 56, 12, 12, 7], [110, 59, , , , , ,]], g = { id: "basic", chars: F, first: 33, w: 8, h: 8 };
2217+
var I = [[2, 2, 2, , 2], [5, 5], [5, 7, 5, 7, 5], [6, 3, 6, 7, 2], [5, 4, 2, 1, 5], [6, 3, 6, 5, 6], [2, 2, , , ,], [2, 1, 1, 1, 2], [2, 4, 4, 4, 2], [5, 2, 5], [, 2, 7, 2], [, , , , 2, 1], [, , 7], [, , , , 1], [4, 4, 2, 1, 1], [7, 5, 5, 5, 7], [3, 2, 2, 2, 7], [7, 4, 7, 1, 7], [7, 4, 7, 4, 7], [5, 5, 7, 4, 4], [7, 1, 7, 4, 7], [7, 1, 7, 5, 7], [7, 4, 4, 4, 4], [7, 5, 7, 5, 7], [7, 5, 7, 4, 7], [, , 2, , 2], [, , 2, , 2, 1], [4, 2, 1, 2, 4], [, 7, , 7], [1, 2, 4, 2, 1], [7, 4, 6, , 2], [2, 5, 5, 1, 6], [2, 5, 7, 5, 5], [3, 5, 3, 5, 3], [6, 1, 1, 1, 6], [3, 5, 5, 5, 3], [7, 1, 3, 1, 7], [7, 1, 3, 1, 1], [6, 1, 5, 5, 6], [5, 5, 7, 5, 5], [7, 2, 2, 2, 7], [4, 4, 4, 5, 2], [5, 5, 3, 5, 5], [1, 1, 1, 1, 7], [5, 7, 7, 5, 5], [7, 5, 5, 5, 5], [2, 5, 5, 5, 2], [7, 5, 7, 1, 1], [6, 5, 5, 3, 6], [3, 5, 3, 5, 5], [6, 1, 7, 4, 3], [7, 2, 2, 2, 2], [5, 5, 5, 5, 7], [5, 5, 5, 2, 2], [5, 5, 7, 7, 5], [5, 5, 2, 5, 5], [5, 5, 2, 2, 2], [7, 4, 2, 1, 7], [6, 2, 2, 2, 6], [1, 1, 2, 4, 4], [3, 2, 2, 2, 3], [2, 5], [, , , , 7], [1, 2], [, 6, 5, 5, 6], [1, 3, 5, 5, 3], [, 6, 1, 1, 6], [4, 6, 5, 5, 6], [, 2, 5, 3, 6], [4, 2, 7, 2, 2], [, 2, 5, 6, 4, 2], [1, 1, 3, 5, 5], [, 2, , 2, 2], [, 2, , 2, 2, 1], [1, 5, 3, 5, 5], [2, 2, 2, 2, 4], [, 5, 7, 5, 5], [, 3, 5, 5, 5], [, 2, 5, 5, 2], [, 3, 5, 5, 3, 1], [, 6, 5, 5, 6, 4], [, 2, 5, 1, 1], [, 6, 1, 4, 3], [2, 7, 2, 2, 4], [, 5, 5, 5, 6], [, 5, 5, 2, 2], [, 5, 5, 7, 5], [, 5, 2, 2, 5], [, 5, 5, 6, 4, 2], [, 7, 4, 1, 7], [6, 2, 1, 2, 6], [2, 2, 2, 2, 2], [3, 2, 4, 2, 3], [, 3, 6]], y = { id: "mini", chars: I, first: 33, w: 4, h: 6 };
2218+
var N = plugin = (e, { cache: u = true } = {}) => {
2219+
let w = e.text, _ = e.textsize, k = e.textalign, z = e.textfont, A = g, E = y, l = u ? /* @__PURE__ */ new Map() : null, C = 300, s = 1, a = null, f = (t) => {
2220+
s = ~~Math.round(t);
2221+
}, T = () => console.warn("[litecanvas/plugin-pixel-font] textalign() has not yet been implemented for pixel fonts"), d = (t, c, r, n = 3) => {
2222+
let i = a.h || a.w;
2223+
for (let o = 0; o < i; o++) for (let x = 0; x < a.w; x++) (r[o] | 0) & 1 << x && e.rectfill(t + x * s, c + o * s, s, s, n);
2224+
}, S = (t, c, r, n = 3) => {
2225+
if (r += "", !s || !r.length) return;
2226+
let i = s * a.w, o = s * (a.h || a.w);
2227+
for (let x = 0; x < r.length; x++) {
2228+
let m = r[x], v = m.charCodeAt(), p = a.chars[v - a.first];
2229+
if (p) if (u) {
2230+
let b = `${a.id}:${m}:${~~n}:${i}`;
2231+
l.has(b) || l.set(b, e.paint(i, o, () => {
2232+
d(0, 0, p, ~~n);
22352233
}));
2236-
let h = c.get(p);
2237-
h._ = e.T + b, e.image(x, o, h);
2238-
} else v(x, o, f, s);
2239-
x += l;
2234+
let h = l.get(b);
2235+
h._ = e.T + C, e.image(t, c, h);
2236+
} else d(t, c, p, n);
2237+
t += i;
22402238
}
22412239
};
2242-
if (m) {
2243-
let x = setInterval(() => {
2244-
let o = performance.now();
2245-
for (let [r, s] of c) e.T > s._ && c.delete(r);
2246-
}, 1e3 * (b / 5));
2240+
if (u) {
2241+
let c = setInterval(() => {
2242+
let r = performance.now();
2243+
for (let [n, i] of l) e.T > i._ && l.delete(n);
2244+
}, 6e4);
22472245
e.listen("quit", () => {
2248-
clearInterval(x), c.clear();
2246+
clearInterval(c), l.clear();
22492247
});
22502248
}
2251-
return { PIXEL_FONT_BASIC: C, PIXEL_FONT_MINI: T, textfont: (x) => {
2252-
typeof x == "object" ? (e.def("text", I), e.def("textsize", d), e.def("textalign", F), t = x, d(a || 1)) : (e.def("text", _), e.def("textsize", A), e.def("textalign", E), z(x));
2249+
return { PIXEL_FONT_BASIC: A, PIXEL_FONT_MINI: E, textfont: (t) => {
2250+
typeof t == "object" ? (e.def("text", S), e.def("textsize", f), e.def("textalign", T), a = t, f(s || 1)) : (e.def("text", w), e.def("textsize", _), e.def("textalign", k), z(t));
22532251
} };
22542252
};
2255-
window.pluginPixelFont = y;
2253+
window.pluginPixelFont = N;
22562254
})();
22572255
})();
22582256
/*! @litecanvas/utils by Luiz Bills | MIT Licensed */

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.7.23.3";
2+
const version = "2025.7.25.0";
33

44
const precacheResources = [
55
"/",

0 commit comments

Comments
 (0)