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.
- package/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +3 -3
- package/dist/browser/index.mjs.map +1 -1
- package/dist/bundle.js +3 -3
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +3 -3
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -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.
|
|
863
|
+
return this.height / this.frameHeight;
|
|
864
864
|
}
|
|
865
865
|
getFrameY(frame) {
|
|
866
|
-
return this.
|
|
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.
|
|
876
|
+
return this.getSectionData(0, y, this.frameWidth, this.frameHeight);
|
|
877
877
|
}
|
|
878
878
|
};
|
|
879
879
|
|