From After Effects

After Effects expressions use JavaScript or ExtendScript. Shrimply expressions use Ebi. The examples below translate common patterns.

value is the property before the expression. t is the exact clip time. When an expression needs a plain number, Ebi uses its value in seconds. See Property Expressions for the available inputs and functions.

Continuous motion

This rotates by 40 degrees per second:

After Effects
time * 40
Shrimply
t * 40

Variables

  • let takes a snapshot when the binding runs. Use it for values you want to keep.
  • mut creates a variable you can reassign.
  • sig creates a live formula in an Ebi scene. When a value it depends on changes, the signal uses the new value. Property expressions already run at each sample, so use let and mut in those expressions. See Bindings and reactivity.
After Effects
speed = 40;
speed = 20;
time * speed
Shrimply
let initial_speed = 40
mut speed = initial_speed
speed = 20
t * speed

Wiggle and shake

wiggle(frequency, amount) varies around the current value. Multiply the time in seconds by the frequency. Scale the shake result by the amount and add it to the current value.

After Effects
wiggle(5, 20)
Shrimply
value + shake(t * 5) * 20

For a 2D property, give each axis its own seed:

[
  x + shake(t * 5, 0) * 20,
  y + shake(t * 5, 1) * 20
]

Oscillation

After Effects
value + Math.sin(time * 4) * 20
Shrimply
value + sin(t * 4) * 20

Remapping values

lerp with a clamped progress value replaces linear. This moves from 0 to 100 over two seconds:

After Effects
linear(time, 0, 2, 0, 100)
Shrimply
lerp(0, 100, clamp(t / 2s, 0, 1))

Conditions

After Effects
time < 1 ? 0 : 100
Shrimply
t < 1 ? 0 : 100

What Shrimply does not have

There is no thisComp, thisLayer, or link to another property. Expressions cannot read keyframes, so loopIn(), loopOut(), and valueAtTime() have nothing to call.

To loop a clip, open Playback → Repeat in the inspector and set Strategy to Repeat or Ping Pong.