Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Animating!

Animoplex animoplex

🎯
Animating!
View GitHub Profile
@animoplex
animoplex / DelayedOffset.jsx
Last active Jul 25, 2020
Delayed Offset - After Effects Expression by Animoplex
View DelayedOffset.jsx
// Delayed Offset - Created by Animoplex: www.animoplex.com
// Delays an animation based on the layer above and the frames to delay.
// NOTE: Looks for an identical transform property on the layer above.
// NOTE: To change, replace "transform(thisProperty.name)" with your desired effect.
delay = 10; // Frames To Delay
above = thisComp.layer(index - 1).transform(thisProperty.name);
above.valueAtTime(time - framesToTime(delay))
@animoplex
animoplex / InertialBounce.jsx
Last active Jul 23, 2020
Inertial Bounce - After Effects Expression by Animoplex
View InertialBounce.jsx
// Inertial Bounce - Created by Animoplex: www.animoplex.com
// Original Version: http://www.graymachine.com/top-5-effects-expressions/
// Modified expression for a smoother bounce effect and easier editing. Use this on any property with two keyframes to get a nice bounce effect that is based on velocity of the value change. Perfect for a scale from 0 to 100 or a speedy rotation that needs some extra life. Adjust amp, freq and decay values to tweak the effect. Amp is intensity, freq is bounces per second, and decay is the speed of decay, slow to fast.
// Full Tutorial: https://www.youtube.com/watch?v=653lxeVIyoo
amp = 5.0; freq = 2.0; decay = 4.0;
n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
@animoplex
animoplex / CountdownClock.jsx
Last active Jul 3, 2020
Countdown Clock - After Effects Expression by Animoplex
View CountdownClock.jsx
// Countdown Clock
// Original: http://www.motionscript.com/design-guide/up-down-clock.html
rate = -1;
clockStart = 3.00;
sign = "";
function padZero(n) {
if (n < 10) {
return "0" + n
}
@animoplex
animoplex / MarkerSyncExpression.jsx
Last active Jun 29, 2020
Marker Sync - After Effects Expression by Animoplex
View MarkerSyncExpression.jsx
// Marker Sync Expression
// Modified expression based on Dan Ebbert's Marker Sync Expression
// Original Version: http://www.motionscript.com/design-guide/marker-sync.html
// Full Tutorial: https://www.youtube.com/watch?v=B_3XS2-VWOM&t=698s
src = comp(name).layer("Markers");
n = 0;
if (marker.numKeys > 0) {
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) {
@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 / LinearEaseExpression.jsx
Created Sep 4, 2018
Linear & Ease Expression - After Effects Expression by Animoplex
View LinearEaseExpression.jsx
// 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)
@animoplex
animoplex / LinearBlend.jsx
Last active Jun 29, 2020
Linear Blend - After Effects Expression by Animoplex
View LinearBlend.jsx
// 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 / 3Dto2DPosition.jsx
Last active Jun 29, 2020
3D to 2D Position - After Effects Expression by Animoplex
View 3Dto2DPosition.jsx
// 3D to 2D Position - Created by Animoplex: www.animoplex.com
// Give 2D effects or properties the ability to use 3D positioning in After Effects.
// toComp is a layer space transform method that transforms values from a layer space to a composition space.
// Full Tutorial: https://www.youtube.com/watch?v=FVrgLK6Zovw&t=268s
src = thisComp.layer('Layer 1');
src.toComp([0,0,0]);
@animoplex
animoplex / SpeedVelocity.jsx
Last active Jun 29, 2020
Speed & Velocity - After Effects Expression by Animoplex
View SpeedVelocity.jsx
// 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
You can’t perform that action at this time.