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
Incomplete camera's FadeIn effect #3833
Comments
cannot reproduce in WEBGL or CANVAS: @Imilo do you have the screenshots by any chance? |
@samid737 , I've created screenshots for you. I'm on Linux if that matters. On the attached image I show Phaser versions 3.10 and 3.12. In v3.12 colors became a little better, but are still darker. Here are 2 images for each version:
Color's Hex representation below each image is a color of dark green section. But visually you can see that other colors became a little darker too. Hex colors I've got from Gimp. On Firefox this selected color becomes even darker - #709689. If we imagine that there is a loop inside FadeIn where colors become brighter on each iteration - I would guess that the last iteration is being skipped. |
Even if the last iteration was skipped, it still shouldn't matter, because the Fade effect works by calling Basically, as long as those booleans are set, it doesn't draw the rectangle anyway, even if it never quite reached the full alpha value it was meant to. Which means that, for some reason, perhaps You could also edit |
In Phaser I've added to the
And in my code I've replaced
with:
Then added to the
Before fade effect of course there is nothing printed, but after that there is:
That means that |
^ which means The question is: what is it about the way you've set things up that causes this? As there's no reason the complete method would never be called, but for some reason in your case that's happening. |
I actually happened to run into this problem as well when calling fadeIn in the scene create method. I will make a fiddle later today to try and reproduce it, and once I have some time I'll investigate this further. |
@photonstorm I logged it out and effectComplete is actually called. It sets Due to these flags the update method is no longer called after the completion of the effect, but postRenderWebGL/Canvas still is called by the camera. This is probably done for keeping the contents of the camera faded out after the fadeOut effect finished. The alpha value sticks to some small decimal number close to 0 for I think an appropriate fix would be to set
I'll shoot you a pull request to fix this. Edit: forgot to add a link reproducing this: Run it a couple of times, use the chrome color picker built in to the web dev tools to see the difference in color outside and inside of the "box". |
Phaser versions: 3.10 and 3.12
OS: linux
Tested on Chromium and Firefox
Hello,
I've tried to use camera's Fade effect and it seems something is not finishing. For example, I open this labs demo: https://labs.phaser.io/edit.html?src=src\games\firstgame\part10.js. Then add this to the end of
create()
function:I've noticed that after the end camera stays a little dark, like not fully transparent. I've compared 2 screenshots, before and after the fade effects. At the moment I'm forced to call
camera.resetFX()
to make colors brighter again.Please check why after fade out/in effects camera is not fully transparent like before.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: