fix: initialization

This commit is contained in:
cha0s 2024-08-05 13:32:33 -05:00
parent d9f5869a37
commit 84ee8ee997

View File

@ -73,6 +73,7 @@ export default class Sprite extends Component {
}
initialize(values, defaults) {
let {
animation = defaults.animation,
anchorX = defaults.anchorX,
anchorY = defaults.anchorY,
frame = defaults.frame,
@ -83,6 +84,7 @@ export default class Sprite extends Component {
this.$$scale = {x: scaleX, y: scaleY};
super.initialize(values, defaults);
this.frame = frame;
this.animation = animation;
}
get lightness() {
return this.$$lightness;