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 / 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 / EnhancedYouTubeEmbed.html
Created Mar 24, 2019
Enhanced YouTube Embed Code - Animoplex
View EnhancedYouTubeEmbed.html
<!-- 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 / 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 / Loops.jsx
Created Mar 6, 2019
Loop Expressions
View Loops.jsx
// Loop Expressions
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
// loopOut evaluates from the first keyframe towards the layer outPoint
// loopIn can be substituted to evaluate from layer inPoint towards last keyframe
View LinearCounterbalance.jsx
// Linear Counterbalance
s = thisComp.layer("Control").effect("Slider Control")("Slider");
a = transform.position;
b = thisComp.layer("Null").toWorld([0,0,0]);
linear(s, 0, 100, a, b)
// Adjust a Slider Control (from 0 to 100) to balance between two values (a and b)
@animoplex
animoplex / LinearEase.jsx
Last active Mar 14, 2019
Linear & Ease Expressions
View LinearEase.jsx
// Linear & Ease Expressions
linear(time, outPoint - 2, outPoint, 100, 0)
ease(transform.opacity, 0, 100, 25, 75)
// Linear fade from 100 to 0 for the last 2 seconds of a layer’s duration
// Ease from 25 to 75 as the Opacity input animates from 0 to 100
View ValueAtTime.jsx
// Value At Time
thisComp.layer(index - 1).transform.scale.valueAtTime(time - 2)
// Output Scale of layer above, delayed in time by 2 seconds
@animoplex
animoplex / Value.jsx
Created Mar 6, 2019
Value Expression
View Value.jsx
// Value Expression
value / 2
// Current property value divided by 2
View PosterizeTime.jsx
// Posterize Time
posterizeTime(12); value
// Interpolates property at 12 fps regardless of composition frame rate
@animoplex
animoplex / Time.jsx
Created Mar 5, 2019
Time Expression
View Time.jsx
// Time Expression
time * 10
// Output increases by 10 every second
You can’t perform that action at this time.