Closed kirhgoff closed 6 years ago
Hey thanks for the PR!
Is there a reason you need getViewport if we already have getWidth/getHeight?
Frankly speaking, no, I used only getWidth and getHeight. But I thought someone could want to use quad's viewport instead of accessing json data. Anyway let me know if you want it to get removed, I dont need it myself.
I feel like frame.quad is easy enough to get to and unless there's a compelling reason to expose Quad's functions I'd rather not.
Yeah, go ahead and take getViewport out and I'm happy to merge it in 👍 Thanks again.
You got it!
Perfect thanks!
👍
For collision detection I need width and height of a sprite I just loaded. Of course I can hardcode them and store in separate variables, but why should I do it if it is already in the metadata? Added some simple functions to get quad viewport and width/height of a frame.
Was thinking should I add some asserts, but all the checks are already done in init method, so I think it is already checked, why to bother again.
Please let me know if any changes required. Thanks for the awesome library!