Jump to content
Search Community

Anastasiya33

Business
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Anastasiya33

  1. The idea is to create a class, which can be used by many creative developers in order to test their work. So it`s not me who will be creating timelines with animations.

     

    So if a person has more than 1 timeline, (the idea was) this person do not need to pass all of the timelines to my class, but there will be globalTimeline, who will 'collect' all of them at once.

  2. I see, thank you!

     

    Let me just explain my intentions. I am working on a tool - Controller, that will help creative developers to test their work with animation. I am developing a class, to which people can pass their timeline, but what if developer uses multiple timelines in one creative? In this case I added globalTimeline. So just to sum up, if a developer has 1 timeline, this timeline is passed to a class, but if there are multiple ones, there is no need to pass any, because the default timeline is globalTimeline.

     

    Could you please suggest how to work with such kind of situations?

  3. Hello everyone,

     

    I have a problem with (I believe so) progress().

    I have timeline and I am making controls for interaction with it. Among controls I have input type range. I would to make it possible to control timeline with this input (range).

     

    So I have this code:

     

        updateRange = (timeline) => {
    
            timeline.eventCallback("onUpdate", function () {
    
                let range = document.getElementById('range');
    
                range.value = timeline.progress();
    
    
    
                range.addEventListener("input", function () { handleUserInteraction() });
    
                function handleUserInteraction() {
    
                        timeline.pause();
    
                        timeline.progress(range.value);
    
                }
    
            });
    
        }

     

    While timeline is running from 0 to 1 (progress), this code works perfectly. But after progress of the timeline is 1, I can’t control the timeline.

     

    If you have thoughts, please let me know.

     

     

     

    UPDATE

    I found reason. You could find code below.

    It works perfectly with regular timeline. But what if I would like to use globalTimeline? When I change to globalTimeline it's not working - can't change progress() after it is == 1.

     

×
×
  • Create New...