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
// 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 } |
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 Blend - Created by Animoplex: www.animoplex.com | |
// Blend between two expressions using a Slider and a linear method. | |
// Full Tutorial: https://www.youtube.com/watch?v=BOPfs49VfLE | |
src = thisComp.layer("Control").effect("Blend")("Slider"); | |
a = transform.position; | |
b = thisComp.layer("Target").toWorld([0,0,0]); | |
linear(src, 0, 100, a, b) |
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
// Parent Attribute - Created by Animoplex: www.animoplex.com | |
// Checking for a parent with hasParent and matching the opacity with the parent attribute. | |
// Full Tutorial: https://www.youtube.com/watch?v=BOPfs49VfLE | |
if (hasParent == true) { | |
parent.transform.opacity | |
} else { | |
value | |
} |
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 Single Dimension - Created by Animoplex: www.animoplex.com | |
// Separate a property's values, change a single value, then combine them back together. | |
offset = thisComp.layer("Control").effect("Offset")("Slider"); | |
x = value[0] + offset; | |
y = value[1]; | |
[x, y] |
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
// Add Lightness - Created by Animoplex: www.animoplex.com | |
// Adds lightness percentage to a color value. | |
// Full Tutorial: https://www.youtube.com/watch?v=QkqiaPZJa1Y | |
// Lightness Example | |
moreLight = effect("Color Brightness")("Slider") / 100; | |
hsl = rgbToHsl(value); | |
assemble = [hsl[0], hsl[1], hsl[2] + moreLight, hsl[3]]; | |
hslToRgb(assemble) |
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
// 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 |
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 + ")" |
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
// 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 |
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
// Trim Decimals with toFixed() - Created by Animoplex: www.animoplex.com | |
// Trim to a specific number of decimal places and add zeros if the value is a whole number. | |
// Full Tutorial: https://www.youtube.com/watch?v=aIxnJBOhdBw | |
// Trim Decimals Example | |
value.toFixed(2) // Outputs a value of, for example, 1 as 1.00 and 1.667 as 1.66 | |
// Text String Trim Decimals Example | |
parseInt(text.sourceText).toFixed(2) // Converts text to string and trims decimals |