Skip to content

Instantly share code, notes, and snippets.

View animoplex's full-sized avatar
🎯
Animating!

Animoplex animoplex

🎯
Animating!
View GitHub Profile
@animoplex
animoplex / PseudoEffectXML.xml
Last active May 16, 2025 07:58
Pseudo Effect Via XML - After Effects Example XML by Animoplex
// Pseudo Effect Via XML - Example File
// Full Tutorial: https://www.youtube.com/watch?v=pHwBOFZgKcs&t=296s
// Edit the PresetEffects.xml for your version of After Effects to add Pseudo Effects.
// XML File Location on Windows:
// Program Files > Adobe > After Effects (Version) > Support Files
// XML File Location on OSX:
// Apps > After Effects > Right-click After Effects.app > “Show Contents” > Contents > Resources
@animoplex
animoplex / LoopWithMarkers.jsx
Created March 7, 2019 21:23
Loop Animation With Markers - After Effects Expression by Animoplex
// Loop Animation With Markers - Created by Animoplex: www.animoplex.com
// Repeat a property's keyframed animation, resetting the loop at the start of every layer marker
// Based loosely on Marker Sync Expression: http://www.motionscript.com/design-guide/marker-sync.html
n = 0;
if (marker.numKeys > 0) {
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) {
n--;
} // get previous marker index
@animoplex
animoplex / CursorWhileTyping.jsx
Last active May 7, 2025 19:30
Cursor While Typing - After Effects Expression by Animoplex
// Cursor While Typing - Created by Animoplex: www.animoplex.com
// Creates a pipe "|" symbol on a text layer while it types.
// NOTE: Add a Slider Control and Checkbox Control to your text layer and apply this to the "SourceText" parameter.
// NOTE: Keyframe the Slider Control from 0 to 100 to reveal the text being typed, the Checkbox toggles the cursor.
// Full Tutorial: https://www.youtube.com/watch?v=I-Acdl_l9G0&t=294s
src = effect("Slider Control")("Slider");
tog = effect("Checkbox Control")("Checkbox");
blink = Math.round(time % 1);
pipe = " ";
@animoplex
animoplex / InertialBounce.jsx
Last active April 8, 2025 07:29
Inertial Bounce - After Effects Expression by Animoplex
// Inertial Bounce - Created by Animoplex: www.animoplex.com
// Original Version: http://www.graymachine.com/top-5-effects-expressions/
// 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: https://www.youtube.com/watch?v=653lxeVIyoo
amp = 5.0; freq = 2.0; decay = 4.0;
n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
@animoplex
animoplex / LayerNameSubstring.jsx
Last active February 13, 2025 10:31
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 / AutoFadeOpacity.jsx
Last active September 5, 2024 07:21
Auto Fade Opacity - After Effects Expression by Animoplex
// Auto Fade Opacity - Created by Animoplex: www.animoplex.com
// Automatically fades a layer in and out based on the inPoint and outPoint of the layer.
// Full Tutorial: https://www.youtube.com/watch?v=BOPfs49VfLE&t=188s
fade = 1; // fade duration in seconds
fadeIn = (time - inPoint) / fade;
fadeOut = (outPoint - time) / fade;
if (time < inPoint + fade) {
ease(fadeIn, 0, 1) * value;
} else if (time > outPoint - fade) {
@animoplex
animoplex / LoopExpression.jsx
Created September 4, 2018 01:57
Loop Expression - After Effects Expression by Animoplex
// Loop Expression - Created by Animoplex: www.animoplex.com
// Basic loop expressions for use on a property in After Effects.
// Full Tutorial: https://www.youtube.com/watch?v=XRrs9pvWGuY
// Loop Examples
loopOut("cycle", 0) // Repeat from start to finish. Default loop mode.
loopOut("pingpong", 2) // Loops last three keyframes back and forth.
loopOut("offset", 0) // Repeats animation using last keyframe as new start point.
loopOut("continue") // Does not loop, but continues onwards with current velocity.
@animoplex
animoplex / SimpleTriggerFade.jsx
Created December 22, 2018 00:59
Simple Trigger Fade - After Effects Expression by Animoplex
// Simple Trigger Fade - Created by Animoplex: www.animoplex.com
// Repeat a fade animation multiple times using markers to trigger the animation.
// Full Tutorial: https://www.youtube.com/watch?v=B_3XS2-VWOM
fadeFrames = 30; m = 0; t = time;
if (marker.numKeys > 0) {
m = marker.nearestKey(time).index;
tag = marker.key(m).comment;
if (tag == "In") { t = marker.key(m).time - time }
else if (tag == "Out") { t = time - marker.key(m).time }
@animoplex
animoplex / MarkerSyncExpression.jsx
Last active August 24, 2023 19:54
Marker Sync - After Effects Expression by Animoplex
// Marker Sync Expression
// Modified expression based on Dan Ebbert's Marker Sync Expression
// Original Version: http://www.motionscript.com/design-guide/marker-sync.html
// Full Tutorial: https://www.youtube.com/watch?v=B_3XS2-VWOM&t=698s
src = comp(name).layer("Markers");
n = 0;
if (marker.numKeys > 0) {
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) {
@animoplex
animoplex / MathMethods.jsx
Created April 16, 2018 16:02
JavaScript Math Methods - After Effects Expression by Animoplex
// JavaScript Math Methods - Created by Animoplex: www.animoplex.com
// List of math methods for After Effects expressions and what they output.
// Note: You must capitalize the M in Math for these methods to work properly.
Math.abs(-2) // Returns 2
Math.ceil(1.01) // Returns 2
Math.floor(1.99) // Returns 1
Math.min(1, 2, 3) // Returns 1
Math.max(1, 2, 3) // Returns 3
Math.round(1.49) // Returns 1