javascript - Playing animation to a specific time -


i creating backend animating progress bar.

// default easing. tweenlite.defaultease = power0.easenone;  // timeline. var tl = new timelinelite({     onupdate : function()     {         console.log(progress.progress);     } });  // initial state. var progress = { progress : 0 };  // finalized state. tl.to(progress, 1, { progress : 100 });  // length of animation. tl.totalduration(15);  // play. tl.play(); 

this works expected, there way animate current playhead specific one? tl.playto(0.5) , afterwards tl.playto(0.2) revert 20%.

i aware of seek, progress , optional variable play methods, let me specify starting position, not end position.

how achieve such behavior?

if understand question correctly, here propose.

you can animate progress property of timelinelite. like:

tweenlite.to(tl, 1, {progress: .5, ease: linear.easenone});.

also, have seen tweento() , tweenfromto available in timelinemax , know using timelinelite still wondering if aware of them.

does help?


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -