You are on page 1of 9

qui as expressões seus lindos!

 
Qualquer coisa só me avisar que eu corrijo:
@gabrielfelix.me
Gabriel Felix• Motion Designer (@gabrielfelix.me) • Instagram photos and videos

01. LoopOut

loopOut("cycle")
loopOut("pingpong")
loopOut("offset")

02. LoopIn

loopIn("cycle")
loopIn("pingpong")
loopIn("offset")

03. Wiggle

wiggle(2,50)

w = wiggle(2,50);
[w[0],value[1]]

w = wiggle(2,50);
[w[1],value[0]]

04. Posterize Wiggle

f = 5;
a = 10;
posterizeTime(f);
wiggle(f, a);

fps=5; //frequency
amount=25; //amplitude
wiggle(fps,amount,octaves = 1, amp_mult = 0.5,(Math.round(time*fps))/fps);

05. Smooth Wiggle

wiggle(1,200,1,1,time)

06. Loop Wiggle

freq = 1;
amp = 110;
loopTime = 5;
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)
07. Maintain Scale

s = [];
ps = parent.transform.scale.value;
for (i = 0; i < ps.length; i++){
s[i] = value[i]*100/ps[i];
}
s

08. This Comp Name

thisComp.name

09. Overshoot

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);


amp = 3;
freq = 2.0;
decay = 3.0;

value + (v/100)*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);}else{value;}

amp = .1; // Amplitude


freq = 2.0; // Frequency
decay = 6.0; // Decay

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 && t < 1){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}
10. Bounce

e = .7;
g = 5000;
nMax = 9;
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;
  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*delta/2);
  }else{
    value
  }
}else
  value

11. Fade

transition = 10;       
if (marker.numKeys<2){
tSecs = transition / ( 1 / thisComp.frameDuration); 
linear(time, inPoint, inPoint + tSecs, 0, 100)
 - linear(time, outPoint - tSecs, outPoint, 0, 100)
}else{
linear(time, inPoint, marker.key(1).time, 0, 100) 
- linear(time, marker.key(2).time, outPoint, 0, 100)
}
12. Blink

blinkSpeed=15;
n= Math.sin(time*blinkSpeed);
if(n<0) 0 else 100;

13. Infinite Scale

s=Math.exp((time-inPoint)*2);
[s,s]+value;

14. Type

cursor = "|";
blinkTime = 1;

charMod = 1; 
num = effect("Slider Control")("Slider");
toggle = effect("Checkbox Control")("Checkbox");

if (toggle == 1) {
t = ((time - inPoint) / blinkTime) % 1;
if (num.numKeys > 2) {n = 0} else {n = 1}
ux = Math.abs(num.speedAtTime(time + thisComp.frameDuration*n));
blink = Math.round(ux + t);
if (blink == 0) {
cursor = " ";
}
} else {
cursor = " ";
}

if (charMod == 0) {
textAnim = num * text.sourceText.length / 100;
} else {
textAnim = num;
}

text.sourceText.substr(0, textAnim) + cursor

15. Loop Rotation

X = 2;
amp = 100;
Math.sin(time * X ) * amp ;

16. Delay

delay = .5;
try{
parent.fromWorld(toWorld(anchorPoint,time-delay));
}catch(err){
value;
}

17. Path Loop

try{
timeStart = thisProperty.key(1).time;
duration = thisProperty.key(thisProperty.numKeys).time-timeStart;
pingPong =true; //change to true value if you want to loop animationn back & forth 
quant=Math.floor((time-timeStart)/duration);
  if(quant<0) quant = 0
  if(quant%2 == 1 && pingPong == true){   t = 2*timeStart+ (quant+1)*duration - time;
}
else{
  t = time-quant*duration;
}
}
catch(err){
  t = time;
}
thisProperty.valueAtTime(t)
18. Elastic

// some defaults
var p = 0.6; // period for elastic
var a = 140; // amplitude for elastic
var s = 1.70158; // overshoot amount for "back"

function outElastic(t, b, c, d, a, p) {
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
if (!a || a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin
(c/a); return (a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b); } function
easeAndWizz() { var n = 0; if (numKeys > 0) {
n = nearestKey(time).index;
if (key(n).time > time) { n-- }
}

try {
var key1 = key(n);
var key2 = key(n+1);
} catch(e) {
return null;
}

// determine how many dimensions the keyframes need


var dim = 1; // It's gotta have at least ONE dimension
try {
key(1)[1];
dim = 2;
key(1)[2];
dim = 3;
} catch(e) {}

t = time - key1.time;
d = key2.time - key1.time;

sX = key1[0];
eX = key2[0] - key1[0];

if (dim >= 2) {
sY = key1[1];
eY = key2[1] - key1[1];

if (dim >= 3) {
sZ = key1[2];
eZ = key2[2] - key1[2];
}
}

if ((time < key1.time) || (time > key2.time)) {


return value;
} else {
val1 =  outElastic(t, sX, eX, d, a, p, s);
switch (dim) {
case 1:
    return val1;
    break;
case 2:
    val2 = outElastic(t, sY, eY, d, a, p, s);
    return [val1, val2];
    break;
case 3:
    val2 = outElastic(t, sY, eY, d, a, p, s);
    val3 = outElastic(t, sZ, eZ, d, a, p, s);
    return [val1, val2, val3];
    break;
default:
    return null;
}
}
}

(easeAndWizz() || value);

19. Squash and Strech

freq = 2;
amplitude = 40;
decay = 1.0; 
t = time - inPoint;
x = scale[0] + amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
y = (1/x)*10000;
[x,y]

20. Wave

xAmp = 40; //height of undulations (pixels)


xFreq = .3; //undulations per second
xSpeed = 150; //speed of wave (pixels per second)

wl = xSpeed/xFreq; //wavelength (pixels)


phaseOffset = ((position[0]%wl)/wl)*2*Math.PI;
y = xAmp*Math.sin(2*Math.PI*xFreq*time + phaseOffset);
value + [0,y]
21. Grid

columns = 10; //number of columns in grid


tHold= .2; //hold time (must be less than tmin)
tMin = .5; //minimum cycle time (can't be zero)
tMax = 1; //maximum cycle time
gap = this_comp.width/columns;
origin = [gap,gap];
xGrid = columns - 1;
yGrid = Math.floor(this_comp.height/gap) - 1;
start = 0;
end = 0;
j = 1;
while (time >= end){
  j += 1;
  seedRandom(j,true);
  start = end;
  end += random(tMin,tMax);
}
targetX = Math.floor(random(0,xGrid)); 
targetY = Math.floor(random(0,yGrid)); 
seedRandom(j-1,true);
x = random(); //this is a throw-away value
oldX = Math.floor(random(0,xGrid)); 
oldY = Math.floor(random(0,yGrid)); 
if(targetX == oldX && targetY == oldY){
  origin + [oldX,oldY]*gap;
}else if (time - start < tHold){
  origin + [oldX,oldY]*gap;
}else{
  deltaX = Math.abs(targetX - oldX);
  deltaY = Math.abs(targetY - oldY);
  xTime = (end - start - tHold)*(deltaX/(deltaX + deltaY));
  yTime = (end - start - tHold)*(deltaY/(deltaX + deltaY));
  if (time < start + tHold + xTime){
    startPos = origin + [oldX,oldY]*gap;
    targetPos = origin + [targetX,oldY]*gap;
    easeOut((time - start - tHold)/xTime, startPos, targetPos);
  }else{
    startPos = origin + [targetX,oldY]*gap;
    targetPos = origin + [targetX,targetY]*gap
    easeIn((time - start - tHold - xTime)/yTime, startPos, targetPos);
  }
}

22. Exato

Math.floor()
23. Maintain Stroke Width

value / Math.max(length(toComp([0,0]), toComp([0.7071,0.7071])), 0.001)

You might also like