Skip to content

Instantly share code, notes, and snippets.

View animoplex's full-sized avatar
🎯
Animating!

Animoplex animoplex

🎯
Animating!
View GitHub Profile
@animoplex
animoplex / LayerNameSubstring.jsx
Last active April 11, 2018 20:53
Output Layer Name As Substring - After Effects Expression by Animoplex
// Output Layer Name As Substring - Created by Animoplex: www.animoplex.com
// Output Last Character
lst = name.substr(name.length-1, name.length);
// Output First Character
lst = name.substr(0, 1);
// Output All Except First Two Characters
lst = name.substr(2, name.length);
@animoplex
animoplex / DistanceBasedOpacityFade.jsx
Last active April 11, 2018 21:03
Distance Based Opacity Fade - After Effects Expression by Animoplex
// Distance Based Opacity Fade
// Original: https://helpx.adobe.com/after-effects/using/expression-examples.html
// Full Tutorial: https://www.youtube.com/watch?v=I-Acdl_l9G0&t=14s
startFade = 500;
endFade = 3000;
try {
C = thisComp.activeCamera.toWorld([0,0,0]);
} catch(err) {
w = thisComp.width * thisComp.pixelAspect;
@animoplex
animoplex / PixelLengthCalculator.jsx
Last active April 12, 2018 16:59
Pixel Length Calculator - After Effects Expression by Animoplex
// Pixel Length Calculator - Created by Animoplex: www.animoplex.com
// Calculates the length (in pixels) of two positions or points in 2D or 3D space.
// USE FOR: Any property that needs a dynamic length calculated.
// Variation A
// Apply to camera's Focus Distance property
length(pointOfInterest, position)
// Variation B
@animoplex
animoplex / ValueExpression.jsx
Created September 4, 2018 01:47
Value Expression - After Effects Expression by Animoplex
// Value Expression - Created by Animoplex: www.animoplex.com
// A basic value expression for use on a property in After Effects.
// Full Tutorial: https://www.youtube.com/watch?v=6TKEcTHdGK8
// Value Example
value / 2
// Value At Time Example
valueAtTime(2)
@animoplex
animoplex / RandomExpressions.jsx
Created September 4, 2018 02:27
Random Expressions - After Effects Expression by Animoplex
// Random Expressions - Created by Animoplex: www.animoplex.com
// Generate random numbers between 0 and 1 with random, seedRandom, and gaussRandom methods.
// Full Tutorial: https://www.youtube.com/watch?v=MITA3ygqvQY
// Random Examples
random() // Returns a random number between 0 and 1 on every frame
random(5) // Returns a random number between 0 and 5 on every frame
random(-5, 5) // Returns a random number between -5 and 5 on every frame
// gaussRandom Examples
@animoplex
animoplex / JavaScriptOperatorExamples.jsx
Created December 25, 2018 01:48
JavaScript Operator Examples - After Effects Expression by Animoplex
// JavaScript Operator Examples - Created by Animoplex: www.animoplex.com
// The different operators in JavaScript and their outputs.
// Full Tutorial: https://www.youtube.com/watch?v=ppCF7jS1nAs&t=18s
1 < 2 // true
1 > 2 // false
1 <= 2 // true
1 >= 2 // false
1 == 2 // false
1 != 2 // true
@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 / Wiggle.jsx
Last active March 5, 2019 06:53
Wiggle Expression
// Wiggle Expression
wiggle(2, 20)
// Frequency: 2, Amplitude: 20
@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