Skip to content

Instantly share code, notes, and snippets.

🎯
Animating!

Animoplex animoplex

🎯
Animating!
Block or report user

Report or block animoplex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@animoplex
animoplex / LoopWithMarkers.jsx
Created Mar 7, 2019
Loop Animation With Markers - After Effects Expression by Animoplex
View LoopWithMarkers.jsx
// 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 / PseudoEffectXML.xml
Last active Jul 23, 2019
Pseudo Effect Via XML - After Effects Example XML by Animoplex
View PseudoEffectXML.xml
// 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 / AfterEffectsStringMethods.jsx
Last active Jul 16, 2019
After Effects String Methods - After Effects Expression by Animoplex
View AfterEffectsStringMethods.jsx
// After Effects String Methods - Created by Animoplex: www.animoplex.com
// List of compatible string methods in After Effects expressions and what they do.
// Full Tutorial: https://www.youtube.com/watch?v=l7Xd8mkqWfc&t=268s
// Outputs 2 characters, starting after the first character.
myString.substr(1, 2)
// Outputs everything after the first character, through the second character.
myString.substring()
@animoplex
animoplex / InertialBounce.jsx
Last active Jul 12, 2019
Inertial Bounce - After Effects Expression by Animoplex
View InertialBounce.jsx
// 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 / MarkerSyncExpression.jsx
Last active Jun 24, 2019
Marker Sync - After Effects Expression by Animoplex
View MarkerSyncExpression.jsx
// 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 / PlayPauseCountdown.jsx
Created Apr 28, 2019
Play / Pause Realtime Countdown - After Effects Expression by Animoplex
View PlayPauseCountdown.jsx
// Play / Pause Realtime Countdown - Created by Animoplex: www.animoplex.com
// Counts down a clock in realtime with the ability to play and pause the countdown with a checkbox
// NOTE: Expression will gradually slow down over duration of comp due to the while loop mechanic
src = effect("Checkbox Control")("Checkbox"); // play/pause control
dur = thisComp.frameDuration; // length of 1 frame
count = 300; // 5 minutes in seconds
t = 0;
function addZero(n) { // adds a zero to the end of numbers 0-9
@animoplex
animoplex / SubstringExamples.jsx
Created Sep 5, 2018
Substring Examples - After Effects Expression by Animoplex
View SubstringExamples.jsx
// Substring Expressions - Created by Animoplex: www.animoplex.com
// Some advanced examples of substrings and text formatting combinations.
// Full Tutorial: https://www.youtube.com/watch?v=oz352OsNgnI
// Substring Examples
name.substr(0, 2) // Output everything between 0 and 2
name.substr(2, name.length) // Output everything between 2 and the last character
name.substr(name.length - 1, 1) // Output the last character
// Bonus Substring Example
@animoplex
animoplex / RegularExpressions.jsx
Created Sep 5, 2018
Regular Expressions - After Effects Expression by Animoplex
View RegularExpressions.jsx
// Regular Expressions - Created by Animoplex: www.animoplex.com
// Complex methods of searching and replacing text dynamically.
// Full Tutorial: https://www.youtube.com/watch?v=oz352OsNgnI
// Check out http://regexr.com/
// RegEx Examples
text.sourceText.replace(/one/gi,"1").replace(/two/gi,"2") // Replace "one" with "1" and "two" with "2"
text.sourceText.replace(/-/gi,"#") // Replace "-" with "#"
// Note: The /gi flags instruct the engine to search globally for text (g) and to be case insensitive (i)
@animoplex
animoplex / AfterEffectsNumberMethods.jsx
Created Dec 22, 2018
After Effects Number Methods - After Effects Expression by Animoplex
View AfterEffectsNumberMethods.jsx
// After Effects Number Methods - Created by Animoplex: www.animoplex.com
// List of compatible number methods in After Effects expressions and what they do.
// Full Tutorial: https://www.youtube.com/watch?v=l7Xd8mkqWfc&t=268s
// Outputs 10 as an integer, converting it from a string.
Number("10")
// Outputs 1 as an integer, the first valid number in the string. It ignores the second integer
parseInt("Layer 1 Copy 2")
@animoplex
animoplex / ZOffsetUsingRadius.jsx
Created Feb 28, 2019
Z Offset Using Radius - After Effects Expression by Animoplex
View ZOffsetUsingRadius.jsx
// 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)
You can’t perform that action at this time.