litecanvas 0.92.1 → 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 CHANGED
@@ -32,7 +32,7 @@
32
32
  };
33
33
 
34
34
  // src/version.js
35
- var version = "0.92.1";
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 {OffscreenCanvas|HTMLImageElement|HTMLCanvasElement} source
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
@@ -413,7 +413,7 @@
413
413
  *
414
414
  * @param {number} x
415
415
  * @param {number} y
416
- * @param {OffscreenCanvas|HTMLImageElement|HTMLCanvasElement} source
416
+ * @param {CanvasImageSource} source
417
417
  */
418
418
  image(x, y, source) {
419
419
  _ctx.drawImage(source, ~~x, ~~y);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litecanvas",
3
- "version": "0.92.1",
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>",
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 {OffscreenCanvas|HTMLImageElement|HTMLCanvasElement} source
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.1'
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
  *