08 · Expressions

Expressions: Time, Wiggle, Loop

Oliver Aemisegger · 4 min read

Expressions are tiny bits of code on a property. Three of them cover most micro motion.

This section enables you to

  • Add an expression to a property
  • Move layers without keyframes
  • Loop keyframes forever

Time

time is the current time in seconds. Multiply it and the value keeps growing.

  1. 01

    Open the expression

    Alt-click the stopwatch of a property, for example Rotation.

  2. 02

    Type it

    The layer turns 90° per second. Change the number to change the speed.

    time*90

Wiggle

wiggle shakes a value randomly.

  1. 01

    Type it

    On Position: 2 is how often per second, 50 is how far in pixels.

    wiggle(2, 50)

Loop

loopOut repeats your keyframes after the last one.

  1. 01

    Set the keyframes

    Animate the property once, for example a short pulse on Scale.

  2. 02

    Type it

    Alt-click the stopwatch and add the loop.

    loopOut("cycle")
Exercise

Three shapes, three expressions

Same project, new comp in comps > maincomps

Expected result

Shortcuts

ActionMac
Add expression⌥-click stopwatch

More info