minerender 2.1.0-alpha.11 → 2.1.0-alpha.12

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.
@@ -705,10 +705,10 @@ var WrappedImage = class {
705
705
  return this.animated ? this.width : this.height;
706
706
  }
707
707
  get frameCount() {
708
- return this.height / this.width;
708
+ return this.height / this.frameHeight;
709
709
  }
710
710
  getFrameY(frame) {
711
- return this.height / this.frameCount * Math.max(0, Math.min(this.frameCount, frame));
711
+ return this.frameHeight * Math.max(0, Math.min(this.frameCount - 1, frame));
712
712
  }
713
713
  getSectionData(sx, sy, sw, sh) {
714
714
  return this.dta.data.getImageData(sx, sy, sw, sh);
@@ -718,7 +718,7 @@ var WrappedImage = class {
718
718
  }
719
719
  getFrameSectionData(frame) {
720
720
  const y = this.getFrameY(frame);
721
- return this.getSectionData(0, y, this.width, this.width + y);
721
+ return this.getSectionData(0, y, this.frameWidth, this.frameHeight);
722
722
  }
723
723
  };
724
724