@drincs/pixi-vn 0.4.1 → 0.4.3

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/index.mjs CHANGED
@@ -587,12 +587,9 @@ function setMemorySprite(element, memory) {
587
587
 
588
588
  // src/classes/canvas/CanvasImage.ts
589
589
  var CanvasImage = class _CanvasImage extends CanvasSprite {
590
- constructor(options) {
591
- super(options);
590
+ constructor() {
591
+ super(...arguments);
592
592
  this.imageLink = "";
593
- if (options && typeof options === "object" && "textureImage" in options && options.textureImage) {
594
- this.imageLink = options.textureImage;
595
- }
596
593
  }
597
594
  get memory() {
598
595
  return __spreadProps(__spreadValues({}, getMemorySprite(this)), {
@@ -610,11 +607,15 @@ var CanvasImage = class _CanvasImage extends CanvasSprite {
610
607
  return mySprite;
611
608
  }
612
609
  /**
613
- * Load the image in the canvas.
614
- * @returns a promise that resolves when the image is loaded.
610
+ * Load the image from the link and set the texture of the sprite.
611
+ * @param image The link of the image. If it is not set, it will use the imageLink property.
612
+ * @returns A promise that resolves when the image is loaded.
615
613
  */
616
- load() {
614
+ load(image) {
617
615
  return __async(this, null, function* () {
616
+ if (!image) {
617
+ image = this.imageLink;
618
+ }
618
619
  return getTexture(this.imageLink).then((texture) => {
619
620
  if (texture) {
620
621
  this.texture = texture;
@@ -1040,7 +1041,7 @@ function showImageWithDissolveTransition(tag, imageUrl, speed, priority) {
1040
1041
  }
1041
1042
 
1042
1043
  // src/constants.ts
1043
- var PIXIVN_VERSION = "0.4.1";
1044
+ var PIXIVN_VERSION = "0.4.3";
1044
1045
 
1045
1046
  // src/functions/SavesUtility.ts
1046
1047
  function getSaveData() {