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.
@@ -860,10 +860,10 @@ var WrappedImage = class {
860
860
  return this.animated ? this.width : this.height;
861
861
  }
862
862
  get frameCount() {
863
- return this.height / this.width;
863
+ return this.height / this.frameHeight;
864
864
  }
865
865
  getFrameY(frame) {
866
- return this.height / this.frameCount * Math.max(0, Math.min(this.frameCount, frame));
866
+ return this.frameHeight * Math.max(0, Math.min(this.frameCount - 1, frame));
867
867
  }
868
868
  getSectionData(sx, sy, sw, sh) {
869
869
  return this.dta.data.getImageData(sx, sy, sw, sh);
@@ -873,7 +873,7 @@ var WrappedImage = class {
873
873
  }
874
874
  getFrameSectionData(frame) {
875
875
  const y = this.getFrameY(frame);
876
- return this.getSectionData(0, y, this.width, this.width + y);
876
+ return this.getSectionData(0, y, this.frameWidth, this.frameHeight);
877
877
  }
878
878
  };
879
879