-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Spritsheet to texture is reversed #6017
Comments
Frames are never reversed. Yet again the spritesheet in the codepen is invalid. The image is 249 x 497. You cannot divide this by 31 pixels evenly, so it won't be split into frames as you expect it. Use a properly sized spritesheet and it will display the correct frame. |
Ok my bad again ! I changed the image for one in a tutorial that is definitely the good size 32x32, and the problem is still there. |
I reproduced this, I think, with the WEBGL renderer only: |
Yes you're right, when I switch to CANVAS the problem disappear |
… flag a Render Texture as being used as the source for Sprite Game Object textures. You can also toggle the new boolean property `isSpriteTexture` as well. Doing this ensures that images drawn to the Render Texture are correctly inverted for rendering in WebGL. Not doing so can cause inverted frames. If you use this method, you must use it before drawing anything to the Render Texture. Fix #6057 #6017
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the |
Version
Description
When creating a texture from a spritesheet, then drawing the sprite, the frame order is reversed.
For example, if a spritesheet has 8 drawings of each 32x32 pixels, when drawing the sprite from the created texture, frame 0 will display the drawing number 8.
Example Test Code
https://codepen.io/Hetarnam/pen/zYPEPVB
Additional Information
Following of issue #6008 that has been closed without answer about the main concern, so I changed the sprite to a correct one on the pen and the issue is still there.
The text was updated successfully, but these errors were encountered: