Closed netgfx closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
drei | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 31, 2024 10:25am |
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Why
useSpriteLoader now can support multi-rows/columns single spritesheets that don't come with .json descriptor files. It also detects and returns rows and columns as meta information, this is useful in various scenarios
What
I added a function that can detect rows, columns, frame-width and frame-height from the given
texture.image
and the number of frames of the spritesheet. The solution also heuristically tries to detect empty frames on the spritesheet and exclude them from the total rows and columns count.Checklist
No changes needed on the API, this function works internally.