Skip to content

Instantly share code, notes, and snippets.

View animoplex's full-sized avatar
🎯
Animating!

Animoplex animoplex

🎯
Animating!
View GitHub Profile
@animoplex
animoplex / AlternatingOutputs.jsx
Created February 28, 2019 15:03
Alternating Outputs - After Effects Expression by Animoplex
// Alternating Outputs - Created by Animoplex: www.animoplex.com
// Output changes between "Off" and "On" (or any output of your choice) every 10 frames
f = 10; // frame interval
int = framesToTime(f);
num = Math.floor( time / int );
if (( num % 2 ) == 0 ) {
"Off" // default output
} else {
"On" // alternate output
@animoplex
animoplex / ZOffsetUsingRadius.jsx
Created February 28, 2019 15:15
Z Offset Using Radius - After Effects Expression by Animoplex
// Z Offset Using Radius - Created by Animoplex: www.animoplex.com
// First line is the source of the offset, apply to position value on a grid of shapes
tar = thisComp.layer("TARGET").toWorld([0,0,0]);
rad = 100; // radius
mov = 500; // pixels of movement
dis = length(tar, toWorld([0,0,0]));
end = [value[0], value[1], value[2] + mov];
ease(dis, 0, rad, end, value)
@animoplex
animoplex / Wiggle.jsx
Last active March 5, 2019 06:53
Wiggle Expression
// Wiggle Expression
wiggle(2, 20)
// Frequency: 2, Amplitude: 20
@animoplex
animoplex / SteadicamWiggle.jsx
Last active March 5, 2019 06:51
Steadicam Wiggle Expression
// Steadicam Wiggle
wiggle(1, 10, 2, 0.25)
// Frequency: 1, Amplitude: 10, Octaves: 2, Intensity: 0.25
@animoplex
animoplex / Time.jsx
Created March 5, 2019 15:39
Time Expression
// Time Expression
time * 10
// Output increases by 10 every second
@animoplex
animoplex / PosterizeTime.jsx
Created March 5, 2019 15:42
Posterize Time
// Posterize Time
posterizeTime(12); value
// Interpolates property at 12 fps regardless of composition frame rate
@animoplex
animoplex / Value.jsx
Created March 6, 2019 02:27
Value Expression
// Value Expression
value / 2
// Current property value divided by 2
@animoplex
animoplex / ValueAtTime.jsx
Created March 6, 2019 02:42
Value At Time
// Value At Time
thisComp.layer(index - 1).transform.scale.valueAtTime(time - 2)
// Output Scale of layer above, delayed in time by 2 seconds
@animoplex
animoplex / LinearEase.jsx
Last active March 14, 2019 01:09
Linear & Ease Expressions
// Linear & Ease Expressions
linear(time, outPoint - 2, outPoint, 100, 0)
ease(transform.opacity, 0, 100, 25, 75)
// Linear fade from 100 to 0 for the last 2 seconds of a layer’s duration
// Ease from 25 to 75 as the Opacity input animates from 0 to 100
@animoplex
animoplex / LinearCounterbalance.jsx
Created March 6, 2019 05:09
Linear Counterbalance
// Linear Counterbalance
s = thisComp.layer("Control").effect("Slider Control")("Slider");
a = transform.position;
b = thisComp.layer("Null").toWorld([0,0,0]);
linear(s, 0, 100, a, b)
// Adjust a Slider Control (from 0 to 100) to balance between two values (a and b)