-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
fix: BitmapFont's texture frame handling for rotated spritesheet regions #11525
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
Conversation
- Ensure sub-textures created from rotated spritesheets use the correct frame and rotation properties - Prevent stretching the drawing result by modifying the BitmapTextPipe to use the character’s original width and height instead of the frame’s dimension
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. Latest deployment of this branch, based on commit de85252:
|
A: { | ||
id: 65, | ||
page: 0, | ||
x: 248, | ||
y: 74, | ||
width: 29, | ||
height: 35, | ||
xOffset: 1, | ||
yOffset: 6, | ||
xAdvance: 31, | ||
letter: 'A', | ||
kerning: {}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case if anyone is wondering where this value comes from, I obtained it from the original .fnt
file. The value is similar, so we don't need to rotate or modify anything and can simply use the original value even if the font appears rotated in the spritesheet.
<char id="65" index="36" char="A" width="29" height="35" xoffset="1" yoffset="6" xadvance="31" chnl="15" x="248" y="74" page="0"/> |
pixi.js-base • pixi.js-bunny-mark
commit: |
Before this PR: https://pixiplayground.com/#/edit/QvD5KtMV2dpUE3A9MNVHk It seems the unit test need a re-run due to request timeout. Thanks @Zyie for integrating StackBlitz, we can now provide a preview for the fix. |
pushed a couple of tweaks! leveaging your fix - but moving the logic to the groupD8 class! |
Description of change
Pre-Merge Checklist
npm run lint
)npm run test
)Linked