Closed netgfx closed 3 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 | Jun 20, 2024 2:44pm |
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.
:tada: This PR is included in version 9.107.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Why
useSpriteLoader now has the ability to support trimmed spritesheets as it calculates the largest frame and adds a scale-ratio for the rest, this way the texture can be scaled up and down in order to match its initial size (something that we get for free when dealing with same size frames). This is a big improvement as we can now support trimmed sprites to reduce memory usage.
What
Added an extra property per frame called
scaleRatio
which has a value between 0 and 1 depending on the size of the frame when compared to the largest frame, it will be 1 when dealing with same size frames.Checklist