This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Value At Time | |
thisComp.layer(index - 1).transform.scale.valueAtTime(time - 2) | |
// Output Scale of layer above, delayed in time by 2 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Linear & Ease Expression - Created by Animoplex: www.animoplex.com | |
// Basic linear and ease expressions for use on a property in After Effects. | |
// Full Tutorial: https://www.youtube.com/watch?v=TFXgX0IiamQ | |
// Linear Example | |
linear(time - inPoint, 0, 100) | |
// Ease Example | |
ease(time - 5, 100, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Speed & Velocity - Created by Animoplex: www.animoplex.com | |
// A couple of examples of speed and velocity formatting. | |
// Full Tutorial: https://www.youtube.com/watch?v=47OWQmcez9M | |
// Speed | |
transform.position.speed | |
// Velocity | |
transform.position.velocity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change Property FPS - Created by Animoplex: www.animoplex.com | |
// 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: https://www.youtube.com/watch?v=YLapbNyYxLs&t=257s | |
fps = 15; | |
posterizeTime(fps); | |
valueAtTime(time); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fixed Dashes Around Circle Stroke - Created by Animoplex: www.animoplex.com | |
// Apply this to a Ellipse shape layer's Stroke Dash property. | |
// Full Tutorial: https://www.youtube.com/watch?v=I-Acdl_l9G0&t=562s | |
src = effect("Slider Control")("Slider"); | |
rad = content("Ellipse").content("Ellipse Path").size[0] / 2; | |
gap = content("Ellipse").content("Stroke").dash.gap; | |
seg = src <= 0 ? 1 : src; | |
2 * Math.PI * rad / seg - gap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Try Catch - Created by Animoplex: www.animoplex.com | |
// 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: https://www.youtube.com/watch?v=SG3NyHmfc0s&t=475s | |
try { | |
thisComp.layer(index + 1).value; | |
} catch(err) { | |
1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source Text Expressions - Created by Animoplex: www.animoplex.com | |
// A few basic ways to manipulate and combine source text with other elements. | |
// Full Tutorial: https://www.youtube.com/watch?v=_XeV8NEtwjg | |
// Text Reference Example | |
comp("Template").layer("Title").text.sourceText | |
// Source Text + Values + Strings | |
"(" + text.sourceText + ")" |