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 rotation on flxfilterframes demo #349

Merged
merged 3 commits into from Apr 30, 2024

Conversation

ninjamuffin99
Copy link
Member

I believe in FlxFilterFrames.applyToSprite() function, it adds an offset (from this flixel merge/pr HaxeFlixel/flixel#2176)

here we simply just reset the offset to the sprite, so it doesn't adjust the offset incorrectly and constantly increment it

@ninjamuffin99 ninjamuffin99 mentioned this pull request Apr 26, 2024
38 tasks
@Geokureli
Copy link
Member

so it seems the issue is that it adds the offset every frame, but it should only add the offset when the filter wasn't active previously?

@ninjamuffin99
Copy link
Member Author

right, so could be something that's changed within flixel itself!

could also do something like account for it's current offset maybe. I'll leave the flixel side up to you though :)

@Geokureli
Copy link
Member

I'm not entirely sure what the best course of action is here, I think FlxFilterFrames usefulness is highly situational, I don't think I would use it in the way this demo does, where it generates new frames every update, and I think it's mostly a leftover feature from flixel's blitting days. for most of these I would try to use a shader, but even that isn't a perfect solution

I've decided to merge this, and take a look at FlxFilterFrames to see if there's a way to un-apply the current effects before re-applying, but really this class might need a rewrite

@Geokureli Geokureli merged commit d2ffcfe into HaxeFlixel:dev Apr 30, 2024
9 of 12 checks passed
@Geokureli
Copy link
Member

Thanks!

@Geokureli Geokureli added this to the 3.2.0 milestone May 1, 2024
@Geokureli Geokureli added the Bug label May 1, 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.

None yet

2 participants