This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| // 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") |
This file contains hidden or 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
| // Universal Expression Syntax - Created by Animoplex: www.animoplex.com | |
| // The different types of expression syntax in After Effects and how to make them compatible in any language. | |
| // Full Tutorial: https://www.youtube.com/watch?v=b1MxtywoqHg&t=192s | |
| // Default Compact Expression: | |
| effect("Fill")("Color") | |
| // Basic Universal Expression (Property Index): | |
| // Replace the effect property’s name with the property’s index. | |
| // Give the effect object a custom name to avoid any localization errors. |
This file contains hidden or 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
| // JavaScript Operator Examples - Created by Animoplex: www.animoplex.com | |
| // The different operators in JavaScript and their outputs. | |
| // Full Tutorial: https://www.youtube.com/watch?v=ppCF7jS1nAs&t=18s | |
| 1 < 2 // true | |
| 1 > 2 // false | |
| 1 <= 2 // true | |
| 1 >= 2 // false | |
| 1 == 2 // false | |
| 1 != 2 // true |
This file contains hidden or 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
| // JavaScript For Loop Example - Created by Animoplex: www.animoplex.com | |
| // The JavaScript For Loop and how it can be used in After Effects. | |
| // Full Tutorial: https://www.youtube.com/watch?v=SG3NyHmfc0s&t=91s | |
| myArray = []; | |
| for (i = 0; i < thisComp.numLayers; i++) { | |
| myArray[i] = thisComp.layer(i+1).name; | |
| } | |
| myArray.slice(0, thisComp.numLayers).join("\r") |
This file contains hidden or 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
| // JavaScript While Loop Example - Created by Animoplex: www.animoplex.com | |
| // The JavaScript While Loop and how it can be used in After Effects. | |
| // Full Tutorial: https://www.youtube.com/watch?v=SG3NyHmfc0s&t=225s | |
| src = thisComp.layer("Control").effect("Acceleration")("Slider"); | |
| dur = thisComp.frameDuration; | |
| dist = 0; | |
| t = 0; | |
| while (t < time) { | |
| dist += src.valueAtTime(t) * dur; |
This file contains hidden or 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
| // Advanced Wiggle Example - Created by Animoplex: www.animoplex.com | |
| // The full expression from Lesson 507 which builds an advanced wiggle expression using a pseudo effect. | |
| // Full Tutorial: https://www.youtube.com/watch?v=b4AAkT2Xuio&t=17s | |
| src = effect("Wiggle Control"); | |
| tog = src("Toggle"); | |
| if (tog == true) { | |
| freq = src("Frequency"); | |
| amp = src("Amplitude"); | |
| val = wiggle(freq, amp); |