Skip to content

Instantly share code, notes, and snippets.

View animoplex's full-sized avatar
🎯
Animating!

Animoplex animoplex

🎯
Animating!
View GitHub Profile
@animoplex
animoplex / ClampValues.jsx
Last active January 14, 2023 00:33
Clamp Values - After Effects Expression by Animoplex
// Clamp Values - Created by Animoplex: www.animoplex.com
// Limits a slider or keyframable value with a minimum and maximum value clamp.
// Full Tutorial: https://www.youtube.com/watch?v=MITA3ygqvQY&t=313s
// Variation A: Slider (1 Value)
minVal = 0;
maxVal = 100;
clamp(effect("Size")("Slider"), minVal, maxVal)
@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 / AfterEffectsArrayMethods.jsx
Last active August 22, 2022 11:09
After Effects Array Methods - After Effects Expression by Animoplex
// After Effects Array Methods - Created by Animoplex: www.animoplex.com
// List of compatible array methods in After Effects expressions and what they do.
// Full Tutorial: https://www.youtube.com/watch?v=l7Xd8mkqWfc&t=268s
// Output an array as a string separated with the argument's contents.
myArray.join(", ")
// Outputs a string with elements separated by commas.
myArray.toString()
@animoplex
animoplex / EnhancedYouTubeEmbed.html
Created March 24, 2019 19:26
Enhanced YouTube Embed Code - Animoplex
<!-- Enhanced Youtube Embed Code for Motion Portfolios - Created by Animoplex
Features: Responsive-width player, removes tracking cookies, changes red controls to white, reduces YouTube branding
How to use: Replace the standard YouTube iframe embed code with the code below and add your YouTube video ID -->
<div style="width:100%; max-width:960px;">
<div style="position:relative; height:0; padding-bottom:56.25%;">
<!-- Video size ratio calculation: 1080px / 1920px = 0.5625 (16:9) -->
<iframe
style="position:absolute; width:100%; height:100%;"
src="https://www.youtube-nocookie.com/embed/YOUTUBEVIDEO?autoplay=1&amp;color=white&amp;modestbranding=1&amp;rel=0"
@animoplex
animoplex / PseudoEffectXML.xml
Last active August 22, 2022 11:09
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 / EvaluateTextLayer.jsx
Last active August 22, 2022 11:09
Evaluate Text Layer - After Effects Expression by Animoplex
// Evaluate Text Layer - Created by Animoplex: www.animoplex.com
// Read and execute an expression from a text layer in After Effects.
// Note: Evaluated quotation marks must be straight quotes, not curly quotes.
// Full Tutorial: https://www.youtube.com/watch?v=Wkr_XOpsAFU&t=19s
eval(thisComp.layer("Text Layer 1").text.sourceText.value);
@animoplex
animoplex / LinearBlend.jsx
Last active August 22, 2022 11:08
Linear Blend - After Effects Expression by Animoplex
// 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)
@animoplex
animoplex / AdvancedWiggleExample.jsx
Created December 25, 2018 02:34
Advanced Wiggle Example - After Effects Expression by Animoplex
// 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);
@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 / UniversalExpressionSyntax.jsx
Created December 22, 2018 07:04
Universal Expression Syntax - After Effects Expression by Animoplex
// 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.