Forum Replies Created

  • Thank you very much Jason!
    Actually I just spent all afternoon rewriting the entire expression (combining the two)
    and at the end it worked! (i’m very surprised!)
    But thanks anyway for your advice, i’ll have a look in case of any other evenience!

    If anyone could ever need it, it’s this:

    yScale = 100;
    xScaleZero = 0;
    xScaleMask = thisComp.layer("SCALE LINES").transform.scale[0];
    min = [xScaleZero,yScale];
    max = [xScaleMask,yScale];
    t1 = key(1).time;
    t2 = key(2).time;

    // Ease and Wizz 2.0 : outQuint : All keyframes
    // Ian Haigh (https://ianhaigh.com/easeandwizz/)
    // Last built: 2009-01-08T11:11:54+11:00
    // some defaults

    var p = 0.8; // period for elastic
    var a = 50; // amplitude for elastic
    var s = 1.70158; // overshoot amount for "back"
    function outQuint(t, b, c, d, a, p) {
    return c*((t=t/d-1)*t*t*t*t + 1) + b;
    }

    function easeAndWizz() {

    var dim = 2;
    t = time - t1;
    d = t2 - t1;
    sX = 0;
    eX = xScaleMask - 0;
    sY = 100;
    eY = 100 - 100;

    if (time < t1) {
    return min;
    }
    if (time > t2) {
    return max;
    } else {
    val1 = outQuint(t, sX, eX, d, a, p, s);
    switch (dim) {
    case 1:
    return val1;
    break;
    case 2:
    val2 = outQuint(t, sY, eY, d, a, p, s);
    return [val1, val2];
    break;
    default:
    return null;
    }
    }
    }
    (easeAndWizz() || value);

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy