`SpriteComp#width` and `SpriteComp#height` always return 0
lajbel opened this issue · 1 comments
lajbel commented
Version
v3000.0.0-beta.2
What browsers are you seeing the problem on?
Opera GX
What happened?
obj.width
and obj.height
returns zero, even if it's inside a onLoad()
.
What's the expected behaviour?
Get the respect width or height of the sprite.
Minimum reproducible code
kaboom({ logMax: 5 });
loadBean();
const bean = add([
sprite("bean"),
]);
debug.log(bean.width); // 0
onLoad(() => {
debug.log(bean.width); // 0
});