Skip to content

Commit

Permalink
3.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed Dec 14, 2022
1 parent fedcac0 commit c4ad95a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions p5.play.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ p5.prototype.registerMethod('init', function p5PlayInit() {
else this._animation = ani.clone();
}
let ts = this.tileSize;
if (!w && this.ani.w != 1) {
if (!w && (this.ani.w != 1 || this.ani.h != 1)) {
w = this.ani.w / ts;
if (this.shape != 'circle' && this.ani.h > 1) {
if (this.shape != 'circle') {
h = this.ani.h / ts;
}
}
Expand Down Expand Up @@ -4304,7 +4304,8 @@ p5.prototype.registerMethod('init', function p5PlayInit() {
this.animations[name] = ani;
this._animation = ani;

if (this._dimensionsUndefined) {
// only works if the animation was loaded in preload
if (this._dimensionsUndefined && (ani.w != 1 || ani.h != 1)) {
this.w = ani.w;
this.h = ani.h;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"version": "git add -A",
"postversion": "git push"
},
"version": "3.3.8"
"version": "3.3.9"
}

0 comments on commit c4ad95a

Please sign in to comment.