Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Getter for sprite's pos and size in the atlas #1

Closed
flamendless opened this issue Oct 15, 2021 · 1 comment
Closed

Comments

@flamendless
Copy link

Something like:

local x, y, w, h = atlas:get_quad("duck")
@EngineerSmith
Copy link
Owner

I was going to add this function, but then I figured it would waste a few table calls for just doing atlas.quads["duck"]:getViewport() instead. Thanks for the suggestion, I'll throw it in for the sake of making it user friendly, while those who want to save those few cycles can inline it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants