The SlideShow class can be used to display image files as a slide show. The component sets up a scene and displays an image sequence with user defined transitions.
slides is either a string specifying the image files (the string may contain wildcards) or a list of Slide objects where each object represents one or more images.
Example:
# File: slides.py
SlideShow(
slides = [
Slide("image01.jpg", XFade(1.0) ),
Slide("image02.jpg", XFade(1.0, 0.3) ),
Slide("image03.jpg", XCube(2.0) ),
Slide("presentation/slides*.png", XFade(0.5) )
]
)
The slide show is started with the viewer tool like this:
viewer.py slides.py -f50 -F
In this case, the frame rate is increased to 50 frames per second (to get smoother transitions) and the display is set to full screen.
When the slide show is running you can jump to the next slide by pressing a mouse button, the Enter key or the PageDown key. In case you move the camera, you can reset it with the q key.
The Slide class represents one or more image files and contains one transition that is used for all files.
filepattern specifies the image files to load and may include wildcards to select more than one file.
transition is a transition class that determines the transition that is applied after each image in this slide object.
The XFade transition implements a smooth cross fade between two images.
duration is the length of the transition in seconds.
If zmove is greater than 0, the old image will be moved towards the camera during the transition which makes it scale up when viewed with a perspective camera.