From 84ee8ee99744a40175c4849cacb86f0945bf7062 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 5 Aug 2024 13:32:33 -0500 Subject: [PATCH] fix: initialization --- app/ecs/components/sprite.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/ecs/components/sprite.js b/app/ecs/components/sprite.js index 8acb70e..387ce25 100644 --- a/app/ecs/components/sprite.js +++ b/app/ecs/components/sprite.js @@ -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;