Closed gorvinsky closed 5 years ago
You are correct if resolveAsset
can parse the height
and width
properties. https://github.com/MiLeung/rn-sprite-sheet/blob/master/src/SpriteSheet.js#L44
So you have a working example using source = { uri: 'someurl', width: 100, height: 100 };
?
@MiLeung I've been using it yes.
Nice, can you please update the README and create a PR for this?
Nice, can you please update the README and create a PR for this?
Done.
Thank you!
Thank you!
@MiLeung Sorry, I just recall that the proptypes of source is currently set to PropTypes.number.isRequired
. You may want to change it to PropTypes.any.isRequired
for it to work properly.
In the documentations, it is stated that { uri } will not work as a source. However, it's not entirely true. It will work if you provide its dimentions as well. Refer below for more info.
This will not work:
This will work:
Do correct me if I'm wrong.