This example shows how to animate images using Pan/Zoom (Ken Burns effect) in Narakeet.
Check out the outcome in result.mp4
.
Upload the script
directory to a Narakeet project. The main script file is source.md
.
With an image larger than the video frame, you can control resizing using one of the available size property values, or shorthand values.
The following five size values will produce a slight animation:
zoom
- zoom gradually in, the animation starts at full cover sizepan
- cover the video frame with the image, and then animate slightly moving to the specified positionpanzoom
- combine pan and zoom at the same timezoomout
- zoom gradually out, so that the animation starts zoomed in, and ends at full cover sizepanzoomout
- combine zoom out and panning
With panning, you can control the direction of the pan using the image position
property. Specify one of the edges (top
, left
, bottom
, right
) to move away from the center.
For example, the following scene will animate an image by panning and zooming to the left at the same time
![left panzoom](image.png)
You can combine multiple images in the same scene to produce a seamless animated slideshow.
Check out the Narakeet Available Sizing Options for images for an up-to-date list of all the sizing options.
Images in this example are by R Architecture on Unsplash https://unsplash.com/@rarchitecture_melbourne