All examples · Scenes · As Markdown, for AIs

Transition masks

What this example shows

dissolve(0.9, mask) covers the screen in the order a picture's greys say, darkest first, and uncovers it the same way back: the picture is the shape. Five are painted in code with mapPixels, a grey for every pixel; the clock is a PNG file. Each is shown at the bottom, small, as it is: the transition stretches it over the screen and reads it smoothly.

The rooms paint their own masks with no key, so they go when the room stops, and the one a room changed with is kept by the transition until the uncover is over. softness turns the hard edge into a soft one, and ease, which any transition takes, moves it along a curve in the same time. M does the same from a .motion file: its scene event names the transition as data, with its mask, colour and curve.

Click the preview first so it hears the keyboard. 1 to 6 choose the shape, S softens the edge, E changes the curve (straight, sine, bounce, elastic, expo), X goes, M plays the motion.

Starting
Starting
—