Skip to content

Instantly share code, notes, and snippets.


Animoplex animoplex

View GitHub Profile
animoplex / CheckboxExpressionLink.jsx
Last active Jun 29, 2020
Checkbox Expression Link - After Effects Expression by Animoplex
View CheckboxExpressionLink.jsx
animoplex / EvaluateTextLayer.jsx
Last active Aug 22, 2022
Evaluate Text Layer - After Effects Expression by Animoplex
View EvaluateTextLayer.jsx
// Evaluate Text Layer - Created by Animoplex:
// Read and execute an expression from a text layer in After Effects.
// Note: Evaluated quotation marks must be straight quotes, not curly quotes.
// Full Tutorial:
eval(thisComp.layer("Text Layer 1").text.sourceText.value);
animoplex / 3Dto2DPosition.jsx
Last active Oct 14, 2021
3D to 2D Position - After Effects Expression by Animoplex
View 3Dto2DPosition.jsx
// 3D to 2D Position - Created by Animoplex:
// Give 2D effects or properties the ability to use 3D positioning in After Effects.
// toComp is a layer space transform method that transforms values from a layer space to a composition space.
// Full Tutorial:
src = thisComp.layer('Layer 1');
animoplex / ChangePropertyFPS.jsx
Last active Jun 29, 2020
Change Property FPS - After Effects Expression by Animoplex
View ChangePropertyFPS.jsx
// Change Property FPS - Created by Animoplex:
// Gives you control of how keyframes per second are interpolated across two or more keyframes.
// Change the fps value on the first line to your desired FPS.
// Full Tutorial:
fps = 15;
animoplex / SampleLumaValue.jsx
Last active Jan 26, 2022
Sample Luminance Value - After Effects Expression by Animoplex
View SampleLumaValue.jsx
// Sample Luminance Value - Created by Animoplex:
// Samples the luma value of a defined area and converts to a specified value within a range.
// Use samplePoint to specify luma location
// Use sampleSize to adjust the sample area
// Last line: 0 - 1 is input, 0 - 100 is output
// Full Tutorial:
target = comp("SOURCE COMP").layer("SOURCE LAYER");
samplePoint= [960,540]; // Sample location
sampleSize= [50,50]; // Sample area (in pixels)
animoplex / TryCatchStatement.jsx
Last active Jun 29, 2020
Try Catch Statement - After Effects Expression by Animoplex
View TryCatchStatement.jsx
// Try Catch - Created by Animoplex:
// Checks to see if a property, effect, layer, comp, or object exists.
// Note: Works like if/then statement, except if the try fails, it does not break the expression.
// Full Tutorial:
try {
thisComp.layer(index + 1).value;
} catch(err) {
animoplex / IfStatements.jsx
Last active Jun 29, 2020
If, Else If, Or, And Statements - After Effects Expression by Animoplex
View IfStatements.jsx
// If, Else If, Or, And Statements - Created by Animoplex:
// Examples of different conditional statements to use in After Effects expressions.
// Full Tutorial:
// If Statement:
if ( a > b ) {
"A Wins!";
// If... Else Statement
animoplex / InertialBounce.jsx
Last active Sep 22, 2022
Inertial Bounce - After Effects Expression by Animoplex
View InertialBounce.jsx
// Inertial Bounce - Created by Animoplex:
// Original Version:
// Modified expression for a smoother bounce effect and easier editing. Use this on any property with two keyframes to get a nice bounce effect that is based on velocity of the value change. Perfect for a scale from 0 to 100 or a speedy rotation that needs some extra life. Adjust amp, freq and decay values to tweak the effect. Amp is intensity, freq is bounces per second, and decay is the speed of decay, slow to fast.
// Full Tutorial:
amp = 5.0; freq = 2.0; decay = 4.0;
n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
animoplex / LayerNameSubstring.jsx
Last active Apr 11, 2018
Output Layer Name As Substring - After Effects Expression by Animoplex
View LayerNameSubstring.jsx
// Output Layer Name As Substring - Created by Animoplex:
// 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 / PixelLengthCalculator.jsx
Last active Apr 12, 2018
Pixel Length Calculator - After Effects Expression by Animoplex
View PixelLengthCalculator.jsx
// Pixel Length Calculator - Created by Animoplex:
// 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