Skip to main content
This guide shows how to size a slide, choose a reveal effect for each element, and add a camera push. Use it when you write or change the scenes of a page.

Before you start

You need a page that includes decktalk-runtime.js, such as the scaffold’s deck/index.html. Your first deck shows how to add a scene to it.

Size the slide

Size every element in CSS pixels, on a frame of 1920 by 1080.
deck/index.html
The runtime draws each slide inside the stage element, #dt-stage. The stage element is 1920 by 1080 CSS pixels. The runtime scales it to fit the window and centers it. So a size in your CSS is a size on the video frame.
[video] width and height change only the browser window and the encoded frame. A frame with another aspect ratio letterboxes the stage element, and the slides do not reflow.
A page can supply its own <div id="dt-stage">, and the runtime uses it. The scaffold’s deck/lesson.html does this to build one figure under all of its slides. Put one idea on each slide. A slide with more than three or four reveals is hard to follow. If a slide is busy, split it into two steps.

Choose a reveal effect

Set data-fx on an element to choose the animation it plays when it appears.
deck/index.html
An element with no data-fx uses rise. The table shows what each reveal effect does and where it works well. Set data-dur in seconds to change the length of an effect. Keep effects short, so each reveal is visible on its word and not still moving on the next word. To show math, add data-tex.

Add a camera push

Set camera: "push" on a scene to zoom the stage element slowly from 100% to 103%.
deck/index.html
The push lasts the whole scene, and at least 4 s. Freeze mode shows no push. Scene fields gives the exact length. Use a push on one scene at most, such as the open. A push under every scene makes the whole video move. decktalk verify removes the push from each probe’s margin with the control share. Its onset rule ignores the slow growth of the push. The push still raises each probe’s changed share.

Next