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:
time * 40
t * 40
Variables
lettakes a snapshot when the binding runs. Use it for values you want to keep.mutcreates a variable you can reassign.sigcreates 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 useletandmutin those expressions. See Bindings and reactivity.
speed = 40;
speed = 20;
time * speed
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.
wiggle(5, 20)
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
value + Math.sin(time * 4) * 20
value + sin(t * 4) * 20
Remapping values
lerp with a clamped progress value replaces linear. This moves from
0 to 100 over two seconds:
linear(time, 0, 2, 0, 100)
lerp(0, 100, clamp(t / 2s, 0, 1))
Conditions
time < 1 ? 0 : 100
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.