oxysoft Posted August 24, 2014 Share Posted August 24, 2014 Much to my surprise, I could not find the answer to this question anywhere. Is it possible to fade the whole screen to black (with a tween if possible) without the use of a custom filter? And if I do need to use a fragment shader, will I be able to tween it like any other variable? Thanks Link to comment Share on other sites More sharing options...
Sebi Posted August 24, 2014 Share Posted August 24, 2014 You could just add a black sprite to the stage, scale it to your games width/height and tween the alpha value. oxysoft 1 Link to comment Share on other sites More sharing options...
valueerror Posted August 24, 2014 Share Posted August 24, 2014 thats how i did it.. works great.. the black sprite itself does not need to be big.. just scale it.. Link to comment Share on other sites More sharing options...
Thigydaze Posted August 27, 2014 Share Posted August 27, 2014 I tweened the alpha on the world instance for my game. Gives you a hook in to do something else once complete. Link to comment Share on other sites More sharing options...
jjwallace Posted May 24, 2016 Share Posted May 24, 2016 Fade from black when you start state (oncreate) this.camera.flash('#000000'); Fade to black from state: startGame: function (pointer) { this.music.stop(); this.camera.fade('#000000'); this.camera.onFadeComplete.add(this.fadeComplete,this); }, fadeComplete: function () { this.state.start('Game'); } Make sure you have the latest version of phaser. drhayes, Juls, rhennig and 7 others 10 Link to comment Share on other sites More sharing options...
Recommended Posts