Jump to content
Search Community

Zediah

Members
  • Posts

    2
  • Joined

  • Last visited

Zediah's Achievements

1

Reputation

  1. You make a very good point about bounce and elastic, I honestly hadn't thought about that and am not sure how I would deal with it. I'm trying to build a generic enter/leave animation library for my react components. I wanted to build a solution that doesn't need to know much about the other animation such that you could easily use different enter/leave durations/eases/etc. The problem is that given that it could be a different ease or duration, passing around the progress of the previous one would not be correct. As you say, 50% of 100 is different to 50% of 200 - but I want it to be able to get the progress at '50' as appropriate for the current timeline (e.g. at '50' in a 100 timeline, it's 50%, at '50' in a 200 timeline, its 25%). I think I see what you're getting at with the modifiers plugin, it looks quite interesting. I've seen that lerp function a few times while trying to search for answers on this forum for this question. I will be sure to investigate it - thanks! I'm also thinking of reverse engineering the eases and swapping the equations around so that they find P, instead of accepting P... but this still doesn't help me for bounce or elastic. I just wanted to say as well, thanks a lot for the reply. I greatly appreciate the help.
  2. Hi guys, long time user, first time poster. I've got a problem where I want to be able to determine the progress % of a tween/timeline based on a a known 'current' value ( as well as knowing the start and end values). Everything I can see is about finding the other way around, i.e. finding the values given a current progress value. An example tween: start: width: 0px end: width: 140px ease: Circ.easeIn current value: width: 38px progress at current: ? My exact example is where I've had one timeline stop before it finishes, keeping its' changes - I want to do the equivalant of a 'reverse' on this timeline, but I can't guarentee it'll always be the same timeline - so I can't just call reverse(). I want to know the progress so I can start the timeline at this 'current' value with any ease defined at the correct position. I promise I've scourged the internet/these forums to try find an answer but have had no luck, perhaps my google-fu is not strong enough....Would anyone know how to do this? At the moment I'm considering a binary search to approximate the ratio using Ease.getRatio() and comparing it to the current value. But all the information is there, just not exposed in a way that I can see. Am I missing something? Is there a better way? Thanks
×
×
  • Create New...