Zoom Triggers

Creates an automated zoom function based on keyframes.

Syntax

getAutoZoom = createZoomer(keyframes, smoothing = 10)

Parameters

keyframes

A Keyframe array that defines the zoom levels at specific times.

smoothing

A number defining the smooth amount at the beginning and end of interpolation.

Examples

Zooms in interpolating from seconds 2 to 3.

getAutoZoom = createZoomer([
  [0, 0],
  [[2,0], 0],
  [[3,0], 4]
])

Zooms out interpolating from seconds 2 to 3 without smoothing.

getAutoZoom = createZoomer([
  [0, 3],
  [[2,0], 3],
  [[3,0], 1]
], 0)