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

Fix transition bug with persistent images #412

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

NeeEoo
Copy link
Contributor

@NeeEoo NeeEoo commented Dec 14, 2023

Also optimized the fade transition, by scaling the 0 angle version

Copy link
Member

@Geokureli Geokureli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you test this with FlxSprite.defaultAntialiasing = true, if it looks bad then you will need to set sprite.antialiasing = false;


if (dirX == 0 && dirY == 0)
{
// no direction
sprite.makeGraphic(Std.int(region.width), Std.int(region.height), _data.color);
sprite.makeGraphic(1, 1, _data.color, false, bitmapKey);
sprite.scale.set(Std.int(region.width), Std.int(region.height));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this look weird when FlxSprite.defaultAntialiasing is false?

@NeeEoo
Copy link
Contributor Author

NeeEoo commented Dec 14, 2023

Should probably be better to be safe, with having it set antialiasing to false, because it might change on different platforms like between windows, mac, linux, html, flash, and i cant really test that

@NeeEoo
Copy link
Contributor Author

NeeEoo commented Dec 14, 2023

Not sure if i should add sprite.antialiasing = true; in the diagonal wipe, since that one has no 1px wide scaling

I also placed the no antialiasing to affect the other wipes, since they are also optimized with 1px and scaled

@Geokureli Geokureli merged commit 9e0ac43 into HaxeFlixel:dev Dec 14, 2023
15 checks passed
@Geokureli
Copy link
Member

Thanks!

@Geokureli Geokureli added this to the 3.2.2 milestone Jan 4, 2024
@Geokureli Geokureli added the Bug label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants