Jump to content
Search Community

anishjana_

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by anishjana_

  1. On 1/20/2017 at 7:55 PM, Carl said:

    You can also use call() if you need to pass in parameters to the function you are calling.

    
    tl.call(myFunction, ["param1", "param2"]);

    Check out the docs. Lots of good info: https://greensock.com/docs/#/HTML5/All/TimelineLite/call/

    Is there way to add delay before call? Am looping through an array to call a function via timeline  and playing it after loop ends.

     

    Tried delay parameter but not working;

     outlines.forEach(element => {
            tl.delay(1).call(animatePath, [canvaselement0.01], duration)
            duration = duration + 0.2
        });
  2. 21 hours ago, ZachSaucier said:

    What do you mean by this? Are you saying that the textAnimation function is called before a period of time equal to totalDuration? If so, please create a minimal demo of that situation because it should not be happening.

    To get the real time call, I consoled the current date in ms inside textanimation function and found out difference between the consecutive calls. the difference is less than the duration that has been set (for eg : textanimation called at 4.8 instead of 5th sec). Interestingly, on further investigation by consoling the time line , the difference between 4.8 and 5 was found in a parameter known as _ztime. 

    Ofcourse web browsers or system cannot gaurantee any perfect timing, but wanted to know if any offset is being set while calling functions inside timeline
     

    Will try creating a codepen in a day or two

  3. I dont have a codepen to show or reproduce what my large scale app does but I am using fabric.js to create animations on canvas and have multiple slides to convert it to a slideshow or video.
     

    All i can share is a small snippet of where i call the functions at certain time i.e particular card.duration (which can take decimals as well). But the next function is called before the designated absolute duration. All I want to know if timeline accepts millisecs and makes gauranteed call at that particular time!

     

     

    totalDuration = 0;
    for (let i = 0i < cardLinkedList.lengthi++) {
            const card = cardLinkedList[i];
            timeline.call(
              textAnimation,
              [canvascardtransitionlogo],
              totalDuration
            );
            totalDuration += card.duration;
          }
     
    timeline.play();

     

×
×
  • Create New...