All examples · Scenes · As Markdown, for AIs

Scene transitions

What this example shows

scene.change(name, { transition: fade(0.3) }): one more option on the call that was already there, and without it the change is the hard cut it has always been. Click to walk between two rooms, cycling through the built-ins.

The shader is the easy half. What the engine has to own is that the incoming scene exists without being seen, updated or clicked on until the screen is covered, and that the swap waits for whichever of the cover and the load finishes last. So a transition hides the cut and hides the load, which is what a black screen between two levels was always for.

launch and stop take a transition too. MENU opens a menu on top with an iris, over a room that paused itself first (the scene underneath keeps running unless the game pauses it), and a click on the menu closes it with another.

Starting
Starting
—