Value.
"value" can be used with "time" like this.
Witch mean you can keyframe on top of the motion the rest of the expression do.
FX like this:
time*200+value
title = thisComp.layer("Text Layer") ; // Layer
indW = 10; // Spacing width
indH = 10; // Spacing height
rect = title.sourceRectAtTime(time,false);
x = rect.width+indW;
y = rect.height+indH;
[x,y]
The expression creates a typing animation with a blinking cursor.
Applies to the Source Text parameter of the text layer.
Speed = 10; // Speed typing Blink = 2; // The speed of blinking cursor CursorType = "|" // Type of the cursor. This is usually a vertical line "|" or the bottom dash "_" F = Math.round(time*Blink % 1); L = text.sourceText.length; T = (time - thisLayer.inPoint)*Speed; if(F ==1 | (T0) ){Fl=CursorType;}else{Fl="";} substr(0,T) + Fl
freq = 1; // Frequency amp = 110; // Amplitude loopTime = 3; // Cycle time (in seconds) t = time % loopTime; wiggle1 = wiggle(freq, amp, 1, 0.5, t); wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime); linear(t, 0, loopTime, wiggle1, wiggle2)
e = .3; // Bouncing g = 1; // Gravity nMax = 10; // Maximum bounces n = 0; if (numKeys > 0){ n = nearestKey(time).index; if (key(n).time > time) n--; } if (n > 0){ t = time - key(n).time; v = -velocityAtTime(key(n).time - .001)*e; vl = length(v); if (value instanceof Array){ vu = (vl > 0) ? normalize(v) : [0,0,0]; }else{ vu = (v < 0) ? -1 : 1; } tCur = 0; segDur = 2*vl/(g*1000); tNext = segDur; nb = 1; // number of bounces while (tNext < t && nb <= nMax){ vl *= e; segDur *= e; tCur = tNext; tNext += segDur; nb++ } if(nb <= nMax){ delta = t - tCur; value + vu*delta*(vl - (g*1000)*delta/2); }else{ value } }else value
amp = .04;// The higher the value, the greater the amplitude freq = 2;// The higher the value, the higher the frequency decay = 5;// The higher the value, the smaller the delay n = 0; if (numKeys > 0){ n = nearestKey(time).index; if (key(n).time > time){ n--; } } if (n == 0){ t = 0; }else{ t = time - key(n).time; } if (n > 0){ v = velocityAtTime(key(n).time - thisComp.frameDuration/10); value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t); }else{ value; }
//Put Expression in Orintation L = thisComp.layer("Camera 1"); u = fromWorldVec(L.toWorldVec([1,0,0])); v = fromWorldVec(L.toWorldVec([0,1,0])); w = normalize(fromWorldVec(L.toWorldVec([0,0,1])));sinb = clamp(w[0],-1,1);b = Math.asin(sinb);cosb = Math.cos(b); if (Math.abs(cosb) > .0005){ c = -Math.atan2(v[0],u[0]); a = -Math.atan2(w[1],w[2]); }else{ a = (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]);
c = 0; }[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]// by Dan Ebberts on creativecow Sep 8, 2012 at 2:54:19 am
//found on :http://www.mographwiki.net/After_Effects_expressions_library
Apply this expression to the opacity attribute and it'll disappear whenever it's flipped away from the camera. You need to have an active camera in your composition for this one to work.
a = toWorldVec([0,0,1]); b = thisComp.activeCamera.position - toWorld(anchorPoint); c = dot(a,b)/length(b); if (c > 0) 0 else value
example (3 axes) - Steady speed Z axe: a=value; b=value; c=value; [a[0],b[1],c[2]+(time*160)]
example (2 axes) - Steady speed y axe: a=value; b=value; [a[0],b[1]+(time*160)]