stevesketch
3/20/2018 - 1:05 AM

#AE_transition

flickerFrequency = 25;

op = value;
if(op > 0 && op < 100){
    reverseAmt=100-transform.opacity;
    wiggledAmt=wiggle(flickerFrequency,reverseAmt);
    roundedAmt=Math.round((wiggledAmt/100));
    roundedAmt*100;
}
transition = 1; // time in secs

offset = 20;
endVal = value;


change = Boolean( index % 2 ); 

// get midpoint of layer time
midTime = (inPoint+outPoint)/2;
/// EASING FUNTION
function outExpo(t, d, b, c) {
  return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
  
}
// EASING mapping to percentage
easeVal = outExpo(time-inPoint, transition, 0,100); // in
if (time > midTime) easeVal = outExpo(outPoint-time-0.1, transition, 0,100); //out
// remap the easing to actual values
if (change == true) {
	endVal = linear(easeVal, 0, 100,  value+offset, value);
} else {
	endVal = linear(easeVal, 0, 100,  value-offset, value);
}

endVal;
endS = value[0]; // use current x value
transition = 0.3; // time in secs

// get midpoint of layer time
midTime = (inPoint+outPoint)/2;

function outExpo(t, d, b, c) {
	return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
}
if (time <=  midTime) { // in
easeVal = outExpo(time-inPoint, transition, 0,100); 
// move values
s  = linear(easeVal, 0, 100,  0,  endS);

} else {//out
easeVal = outExpo(outPoint-time-0.1, transition, 0,100); 

s  = linear(easeVal, 0, 100, 0,endS);
}

[s,s];
EaseIn = function(power){return function(t){return Math.pow(t, power)}};
EaseOut = function(power){return function(t){return 1 - Math.abs(Math.pow(t-1, power))}};
EaseInOut = function(power){return function(t){return t <.5 ? EaseIn(power)(t*2)/2 : EaseOut(power)(t*2 - 1)/2+0.5}}

dur=1; power=5; //1=linear, 2=Quad, 3=Cubic, 4=Quart, 5=Quint
startX=value[0]; startY=value[1];
endX= 0; endY= 0;

t=linear(time-inPoint,0,dur,0,1);
Exp=EaseOut(power)(t);
x=startX+(endX-startX)*Exp;
y=startY+(endY-startY)*Exp;
[x,y]
endS = value[0]; // use current x value
startS = 0; // use current x value
transition = 1; // time in secs
power=5; //1=linear, 2=Quad, 3=Cubic, 4=Quart, 5=Quint

// get midpoint of layer time
midTime = (inPoint+outPoint)/2;

EaseIn = function(power){return function(t){return Math.pow(t, power)}};
EaseOut = function(power){return function(t){return 1 - Math.abs(Math.pow(t-1, power))}};
EaseInOut = function(power){return function(t){return t <.5 ? EaseIn(power)(t*2)/2 : EaseOut(power)(t*2 - 1)/2+0.5}}

if (time <=  midTime) { // in
passIn = linear(time-inPoint, 0, transition, 0,1);
Exp = EaseOut(power)(passIn); 
// move values

s=startS+(endS-startS)*Exp;
} else {//out
passOut = linear(outPoint-time-0.1, 0, transition, 0,1);
Exp = EaseOut(power)(passOut); 

s=startS+(endS-startS)*Exp;
}
[s,s];
fadeIn = 0.05; // in secs
fadeOut = 1; // in secs
endLvls = value[0];
levs = 0;
// get midpoint of layer time
midTime = (inPoint+outPoint)/2;

if (time <=  midTime) { // in
levs = linear(time, inPoint, inPoint+fadeIn, -46, endLvls);
} else { // out
levs = linear(time, outPoint, outPoint-fadeOut, endLvls, -45);
}
[levs,levs];
edit = Math.floor(thisComp.layer("EditControl").effect("Edit")("Slider"));
(edit==index)?100:0;