Forum Replies Created

  • Thanks Kevin, that works pretty well. I used that idea coupled with Dan Ebberts’ genius scripting below:
    freq = 1;
    amp = 110;
    loopTime = 3;
    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)

    I scripted the frequency, amplitude and loopTime to sliders so I could control them across dozens of layers for a random but seamless loop. Thanks everyone!

  • Ah yes that would work for most particle effects but I need the same particles to each return to their original position as if they are flying in elaborate looped circles. I’m basically simulating fireflies dancing around the screen but they should return to their initial position to complete the loop without having them die off and be replaced by new particles. Is there a script to give random smooth motion around the comp and then return to their original spot, using a seed to ensure each layer is on a different trajectory?

  • Adam Fram

    October 30, 2015 at 5:30 pm in reply to: 5 Minute Countdown

    Perfect. Thanks Dan, you rock!


    Adam Fram
    adamfram.com

  • Adam Fram

    October 29, 2015 at 10:16 pm in reply to: 5 Minute Countdown

    Dan,

    The countdown/up script on your website is super helpful and very customizable so thank you for that genius piece of code.

    I noticed that the counter seems to round in the wrong direction when counting. Here’s an example of it counting down: 59.02, 59.01, 58.00, 58.99, 58.98
    Is there a simple code solution related to the padding that I can use for this?

    Thanks!

    -Adam Fram
    adamfram.com

    rate = -1;
    clockStart = 600.00;

    function padZero(n){
    if (n < 10) return "0" + n else return "" + n
    }

    clockTime = clockStart + rate*(time - inPoint);

    if (clockTime < 0){
    sign = "-";
    clockTime = -clockTime;
    }else{
    sign = "";
    }

    t = Math.floor(clockTime);
    hr = Math.floor(t/3600);
    min = Math.floor((t%3600)/60);
    sec = Math.floor(t%60);
    ms = clockTime.toFixed(2).substr(-2);
    padZero(min) + ":" + padZero(sec) + "." + ms

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