Forum Replies Created

  • Jim Digiovanni

    May 6, 2015 at 7:09 pm in reply to: Ticking Clock

    Jason:

    That is really nice movement! Very realistic! I have never played with the timeToFrames expression before. I am not sure if I understand everything that is happening in that script.

    I am going to repaste your script below, with my comments and maybe you can tell me if I understand what you have done here.

    I am going to just go ahead and say thanks in advance if you read through my comments and my muddled understanding of your elegant script.

    Thanks

    Jim

    var ttf = timeToFrames (t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);

    /* I get that the time to frames is converting each frame to 1 second. I don't understand this part of it / thisComp.frameDuration, isDuration = false); */

    compFrameRate=15; /* Is this a variable? I always add the var in front of my variables to help me recognize them */

    angle=Math.floor(ttf/compFrameRate)*6; /* OK, here with the Math.floor function you are saying 'rotate this object a minimum of 1 frame per second divided by 15fps multiplied by 6 ( to give us the 6 degrees of rotation per second. Is that correct? */

    if (ttf % compFrameRate == 0) {
    angle+=.5;
    } else if (ttf % compFrameRate ==1) {
    angle-=.5;
    }

    /* This section above, the if / else section, I see that is how you are getting the angle +.5 overshoot, I just don't understand how this works. */

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