You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #4, I added a call to this._step() inside updateConfig(). That's needed to ensure that the default values in updateConfig() are current before the spring is reset. However, it's also the only place that _step() gets called synchronously.
This introduces the possibility that changes to the spring config could stop the spring before it even starts. For instance
Previously, the config wasn't evaluated until the next frame, so this would cause a transition from 1 to 0. However, now that it can be evaluated synchronously, when both fromValue and toValue are 0, which would stop the spring before fromValue: 1 is evaluated.
I'm not sure if this is a desirable behavior or not, but since it's a change, I thought I would at least document it. If it causes problems in the future, I'll address it.
One potential solution: add a flag to _evaluateSpring to suppress notifications. When called during updateConfig, notifications would be suppressed, which would prevent onUpdate, onStop, and stop() from being called.
The text was updated successfully, but these errors were encountered:
In #4, I added a call to
this._step()
insideupdateConfig()
. That's needed to ensure that the default values inupdateConfig()
are current before the spring is reset. However, it's also the only place that_step()
gets called synchronously.This introduces the possibility that changes to the spring config could stop the spring before it even starts. For instance
Previously, the config wasn't evaluated until the next frame, so this would cause a transition from 1 to 0. However, now that it can be evaluated synchronously, when both
fromValue
andtoValue
are 0, which would stop the spring beforefromValue: 1
is evaluated.I'm not sure if this is a desirable behavior or not, but since it's a change, I thought I would at least document it. If it causes problems in the future, I'll address it.
One potential solution: add a flag to
_evaluateSpring
to suppress notifications. When called duringupdateConfig
, notifications would be suppressed, which would preventonUpdate
,onStop
, andstop()
from being called.The text was updated successfully, but these errors were encountered: