HaxeFlixel / flixel-demos

Collection of demos for HaxeFlixel
https://haxeflixel.com/demos
425 stars 290 forks source link

Updated FlxBlur demo to no longer be Flash-only #283

Closed p-brighenti closed 3 years ago

p-brighenti commented 3 years ago

Changed this demo's implementation to no longer be Flash only as the previous implementation produced no effect when it ran on non-flash targets. Pressing the space key while running the previous implementation on a, let's say, HTML 5 build had no visible changes on the game screen.

Do let me know if you need me to change anything in this PR, like having a camera specifically for the effect in addition to the main camera.

If this PR gets approved, will it be enough to update the demo on the website as well (after a new build)? Or will I need to open another PR in the website's repo for that?

Geokureli commented 3 years ago

If this PR gets approved, will it be enough to update the demo on the website as well (after a new build)? Or will I need to open another PR in the website's repo for that?

You'll need to update this file, too: https://github.com/HaxeFlixel/haxeflixel.com/blob/master/src/documents/demos/FlxBlur.html.md here's an example: https://github.com/HaxeFlixel/haxeflixel.com/blob/dev/src/documents/demos/BSPMapGen.html.md

Can the same changes be made to FlxBloom? they seem to have been made together

Geokureli commented 3 years ago

Got a chance to try this change, you forgot to import openfl.filters.BlurFilter so this doesn't compile, and if that is the filter you meant to use, it's not the same filter effect as the flash version

new Html5 version:

Screen Shot 2021-09-13 at 9 26 22 PM

Old Flash version:

Screen Shot 2021-09-13 at 9 29 21 PM

We already have demos showcasing the gaussian blur filter, and FlxTrailArea. I see no reason to update this as it's showcasing some old flash specific feature we had

Gama11 commented 3 years ago

Agree with @Geokureli, doesn't really make sense to update it to a much different-looking effect.

p-brighenti commented 3 years ago

Ah my bad, I didn't know it was a different effect. I'm guessing I accidentally removed the import while cleaning up the code. Thanks for the review.