litecanvas 0.92.0 → 0.92.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.dev.js +2 -2
- package/dist/dist.js +1 -1
- package/package.json +5 -23
- package/src/index.js +1 -1
- package/src/version.js +1 -1
- package/types/global.d.ts +1 -5
- package/types/types.d.ts +1 -5
package/dist/dist.dev.js
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
// src/version.js
|
|
35
|
-
var version = "0.92.
|
|
35
|
+
var version = "0.92.2";
|
|
36
36
|
|
|
37
37
|
// src/index.js
|
|
38
38
|
function litecanvas(settings = {}) {
|
|
@@ -620,7 +620,7 @@
|
|
|
620
620
|
*
|
|
621
621
|
* @param {number} x
|
|
622
622
|
* @param {number} y
|
|
623
|
-
* @param {
|
|
623
|
+
* @param {CanvasImageSource} source
|
|
624
624
|
*/
|
|
625
625
|
image(x, y, source) {
|
|
626
626
|
DEV: assert(isNumber(x), "[litecanvas] image() 1st param must be a number");
|
package/dist/dist.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "litecanvas",
|
|
3
|
-
"version": "0.92.
|
|
3
|
+
"version": "0.92.2",
|
|
4
4
|
"description": "Lightweight HTML5 canvas 2D game engine suitable for small projects and creative coding. Inspired by PICO-8 and P5/Processing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Luiz Bills <luizbills@pm.me>",
|
|
@@ -17,29 +17,12 @@
|
|
|
17
17
|
"main": "./src/index.js",
|
|
18
18
|
"module": "./src/index.js",
|
|
19
19
|
"types": "./types/index.d.ts",
|
|
20
|
-
"exports": {
|
|
21
|
-
".": {
|
|
22
|
-
"import": {
|
|
23
|
-
"types": "./types/index.d.ts",
|
|
24
|
-
"default": "./src/index.js"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"./global": "./src/index.js"
|
|
28
|
-
},
|
|
29
|
-
"typesVersions": {
|
|
30
|
-
"*": {
|
|
31
|
-
"./global": [
|
|
32
|
-
"./types/global.d.ts"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
20
|
"keywords": [
|
|
37
|
-
"
|
|
21
|
+
"game engine",
|
|
22
|
+
"game development",
|
|
38
23
|
"2d",
|
|
39
|
-
"
|
|
24
|
+
"canvas",
|
|
40
25
|
"gamedev",
|
|
41
|
-
"game engine",
|
|
42
|
-
"javascript",
|
|
43
26
|
"js13k",
|
|
44
27
|
"creative-coding",
|
|
45
28
|
"pico-8",
|
|
@@ -70,10 +53,9 @@
|
|
|
70
53
|
"test:watch": "ava --watch",
|
|
71
54
|
"dev": "esbuild src/web.js --bundle --watch --outfile=dist/dist.dev.js --servedir=.",
|
|
72
55
|
"build": "npm run genversion && node script/build.js && size-limit",
|
|
73
|
-
"gzip-size": "gzip -c dist/dist.min.js | wc -c | xargs printf \" Gzip size: %s bytes\n\"",
|
|
74
56
|
"format": "prettier -w src/* samples/* types/* script/* types/*",
|
|
75
57
|
"check-types": "npx ts types/*",
|
|
76
|
-
"genversion": "genversion --es6
|
|
58
|
+
"genversion": "genversion --es6 src/version.js"
|
|
77
59
|
},
|
|
78
60
|
"files": [
|
|
79
61
|
"dist",
|
package/src/index.js
CHANGED
|
@@ -718,7 +718,7 @@ export default function litecanvas(settings = {}) {
|
|
|
718
718
|
*
|
|
719
719
|
* @param {number} x
|
|
720
720
|
* @param {number} y
|
|
721
|
-
* @param {
|
|
721
|
+
* @param {CanvasImageSource} source
|
|
722
722
|
*/
|
|
723
723
|
image(x, y, source) {
|
|
724
724
|
DEV: assert(isNumber(x), '[litecanvas] image() 1st param must be a number')
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '0.92.
|
|
2
|
+
export const version = '0.92.2'
|
package/types/global.d.ts
CHANGED
|
@@ -364,11 +364,7 @@ declare global {
|
|
|
364
364
|
* @param y
|
|
365
365
|
* @param source
|
|
366
366
|
*/
|
|
367
|
-
function image(
|
|
368
|
-
x: number,
|
|
369
|
-
y: number,
|
|
370
|
-
source: OffscreenCanvas | HTMLImageElement | HTMLCanvasElement
|
|
371
|
-
): void
|
|
367
|
+
function image(x: number, y: number, source: CanvasImageSource): void
|
|
372
368
|
/**
|
|
373
369
|
* Draw in an OffscreenCanvas and returns its image.
|
|
374
370
|
*
|
package/types/types.d.ts
CHANGED
|
@@ -358,11 +358,7 @@ type LitecanvasInstance = {
|
|
|
358
358
|
* @param y
|
|
359
359
|
* @param source
|
|
360
360
|
*/
|
|
361
|
-
image(
|
|
362
|
-
x: number,
|
|
363
|
-
y: number,
|
|
364
|
-
source: OffscreenCanvas | HTMLImageElement | HTMLCanvasElement
|
|
365
|
-
): void
|
|
361
|
+
image(x: number, y: number, source: CanvasImageSource): void
|
|
366
362
|
/**
|
|
367
363
|
* Draw in an OffscreenCanvas and returns its image.
|
|
368
364
|
*
|