You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproducable problem: If you got a scene (scene1), that implements light: Enable lights in the scene1: this.lights.enable().setAmbientColor(0xffffff); use a light in the scene1: this.lights.addLight( x, y ).setColor(0xff5f0a).setIntensity(1);
And then switch to a second scene via: this.scene.start('scene2')
The light is successfully cleared from the array of lights in the Manager.
But a "ghostimage" remains in the new, started scene2 if: Scene2
scene2 has lights enabled.
But scene2 got no own lights.
result: you see the lights from scene1 in scene2
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
JasonHK
pushed a commit
to JasonHK/phaser
that referenced
this issue
Jun 4, 2019
…a flag if the Scene doesn't contain any lights. All of the Game Objects now check this flag and don't even bother adding themselves to the batch if there are no lights in the Scene, as they'd never render anyway. This also avoids the ghost-image problem if you swap Scenes to a new Scene with the Light Manager enabled, but no actual lights defined. Fixphaserjs#3707
Reproducable problem: If you got a scene (scene1), that implements light:
Enable lights in the scene1:
this.lights.enable().setAmbientColor(0xffffff);
use a light in the scene1:
this.lights.addLight( x, y ).setColor(0xff5f0a).setIntensity(1);
And then switch to a second scene via:
this.scene.start('scene2')
The light is successfully cleared from the array of lights in the Manager.
But a "ghostimage" remains in the new, started scene2 if:
Scene2
result: you see the lights from scene1 in scene2
The text was updated successfully, but these errors were encountered: