Added easing event and fixed currentLag#22
Added easing event and fixed currentLag#22sashahilton00 wants to merge 2 commits intoSTRML:masterfrom
Conversation
Added an easing event (was running tests and was useful to have), and a new configuration method, consecutiveLags(int), which allows one to configure the number of lag spikes required before the onLag() function is triggered. Additionally, a change to line #186 was made, as the currentLag was being set to NaN as a result of currentlag being set to a number multiplied by 0 (initial currentLag) in previous iterations. Calculations can now occur properly.
|
@sashahilton00 Do you recall how |
|
It's been a while, and I don't remember exactly why it was returning NaN as opposed to 0. I just did a quick search through my drive to find what project was using this, and after looking through, there is a line in there which is |
|
Hmm. If Line 39 in 181b58f (0.1 < NaN) === false). But I can't see how that would happen.
|
|
To be honest, neither am I. I mostly stopped using node a year or so ago, and can't recall the cause of this particular issue. If one were being rigid, I guess you could track down the origin of the NaN through inserting extreme values and testing, but another part of me says that given the or condition, it shouldn't lead to any unexpected behaviour, and should just act as a fallback where the previous statement should be zero anyway if it is being hit. |
Added an easing event (was running tests and was useful to have), and a new configuration method, consecutiveLags(int), which allows one to configure the number of lag spikes required before the onLag() function is triggered.
Additionally, a change to line #186 was made, as the currentLag was being set to NaN as a result of currentlag being set to a number multiplied by 0 (initial currentLag) in previous iterations. Calculations can now occur properly.