How to pop scene with transition?

How to pop scene with transition?
0

#1

I can push a scene with transition like this:

cc.director.pushScene(new cc.TransitionFade(1.0, new PausedLayer()));

However when I pop the scene, no transition is applied:

cc.director.popScene();

How can I pop a scene with transition in JavaScript?


#2

That’s currently not possible, but some people implemented it by themselves. Tip) implement popScene with Transition


#3

Personally I wrote my own scene subclass that has a layercolor that fades in and out as the scenes transitions. All my scenes derive from that class. I us the onEnter function to trigger the fade in and I wrote my own replace scene function inside my scene class that handles the fade out. The layercolor also catches any touches so you can’t break things as the scene fades out.