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