fix: bounds
This commit is contained in:
parent
fa817e3072
commit
6997e108c0
|
@ -22,13 +22,14 @@ export default class Sprite extends Component {
|
||||||
super.frame = this.frames ? frame % this.frames : 0;
|
super.frame = this.frames ? frame % this.frames : 0;
|
||||||
}
|
}
|
||||||
get frames() {
|
get frames() {
|
||||||
return this.animation
|
if (
|
||||||
? (
|
!this.animation
|
||||||
this.$$sourceJson.animations
|
|| !this.$$sourceJson.animations
|
||||||
? this.$$sourceJson.animations[this.animation].length
|
|| !(this.animation in this.$$sourceJson.animations)
|
||||||
: 0
|
) {
|
||||||
)
|
return 0;
|
||||||
: 0;
|
}
|
||||||
|
return this.$$sourceJson.animations[this.animation].length;
|
||||||
}
|
}
|
||||||
get scale() {
|
get scale() {
|
||||||
return {x: this.scaleX, y: this.scaleY};
|
return {x: this.scaleX, y: this.scaleY};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user