Alex Printz
Forum Replies Created
-
I’m not sure how to fix yours off the top of my head, but here is my own quadratic easing function:
function easeInOutQuad (t, tMin, tMax, value1, value2){
b = value1;
c = value2-b;
d = tMax-tMin;
t = tMin < tMax ? thisLayer.linear(t,tMin,tMax,0,d) : thisLayer.linear(t,tMin,tMax,d,0);
t /= d/2;
if (t < 1) return c/2*Math.pow(t,2) + b;
t--;
return -c/2 * (t*(t-2) - 1) + b;
}Alex Printz
Mograph Designer -
Alex Printz
February 17, 2020 at 3:19 pm in reply to: Move layers position randomly at random intervalstry adding this before the wiggle:
posterizeTime(1);
Alex Printz
Mograph Designer -
Alex Printz
February 13, 2020 at 8:14 pm in reply to: It’s possible use a linear interpolation expression with the Scale ???try it like this
s = ease(thisComp.layer("layer1").transform.scale[0], 0, 100, 0, 80);
[s,s]Alex Printz
Mograph Designer -
it would be something like this:
L = thisComp.layer("target_layer_with_checkboxes");
i = 1;
output = undefined;
while(i <= L(4).numProperties){
if (L.effect(i)(1).name == "Checkbox" && L.effect(i)(1) == 1){
output = i;
break;
}else i++;
}
outputAlex Printz
Mograph Designer -
toWorld has a 2nd parameter for time that isn’t used as often; if you don’t add anything it defaults to time.
Look below for a 1 frame delay:
L = thisComp.layer("targetLayer");
L.toWorld(L.anchorPoint, time-framesToTime(1));Alex Printz
Mograph Designer -
I think it would be like this:
row = effect("Row")("Slider");
drop = thisComp.layer("CTRL").effect("Drop")("Slider");
thedrop = linear(drop,row-1,row,0,1); //converts row vs drop to 0 to 1
opa = thisComp.layer("Col A Row 1").transform.opacity //reference layers opacityvalueAtTime(linear(thedrop,0,1,opa.key(1).time,opa.key(opa.numKeys).time))
Alex Printz
Mograph Designer -
try this, just point the effect correctly to the proper slider
valueAtTime(linear(thisComp.layer("target layer").effect("Slider")(1),0,1,key(1).time,key(numKeys).time))Alex Printz
Mograph Designer -
Alex Printz
February 5, 2020 at 7:23 pm in reply to: Linking a mask path to a shape path in different layertry this
L = thisComp.layer("circle");
M = thisComp.layer("circle").content("textfeld").content("Path 1").path; // or path!
o = [0,0];p = hasParent ? thisLayer.parent:thisLayer;
mP = M.points();
mT = M.inTangents();
mO = M.outTangents();
P = []; T = []; O = [];
for(i = 0; i < mP.length; i++){
mPi = mP[i] + o;
P[i] = p.fromComp(L.toComp(mPi));
T[i] = p.fromComp(L.toComp(mPi + mT[i])) - P[i];
O[i] = p.fromComp(L.toComp(mPi + mO[i])) - P[i];
}
createPath(P,T,O,M.isClosed())Alex Printz
Mograph Designer -
Alex Printz
February 4, 2020 at 6:22 pm in reply to: if / else expression: Color Picker Changes the Opacity of a Pre Compwhoops, lost a parentheses, also need to add a semicolon after the 100 and before the else for the new javascript engine.
if (thisComp.layer("*PICK COLOR IN THIS LAYER*").effect("COLOR 2")("Color") == hexToRgb("61CFC8")) 100; else 0;
Alex Printz
Mograph Designer -
Alex Printz
February 4, 2020 at 5:09 pm in reply to: if / else expression: Color Picker Changes the Opacity of a Pre CompcolorControl = comp("RHS_02_DaysOfTheWeek_16x9").layer("*PICK COLOR IN THIS LAYER*”);
if (colorControl.effect("COLOR 1")("COLOR") == hexToRgb("61CFC8") 100 else 0;Alex Printz
Mograph Designer