Im trying to get the width and height from the texture of a sprite. The properties should be available according to the documentation, and when when doing console.log(texture) they are correct, but when doing console.log(texture.height) it always returns 1. This is the code:
let texture = PIXI.Texture.fromImage(path);
console.log(texture);
console.log(texture.height);
console.log(texture) shows this:
...
_updateID:2
_uvs:t
frame:(...)
height:240
rotate:0
width:240
...
which is the correct width and height, but why can't i get the values?