Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generateValues in milliseconds dont work #364

Closed
pmella16 opened this issue Dec 26, 2022 · 0 comments · Fixed by #365
Closed

generateValues in milliseconds dont work #364

pmella16 opened this issue Dec 26, 2022 · 0 comments · Fixed by #365

Comments

@pmella16
Copy link

hi, when i try to use the generateValues in millisecond it doesn't work correctly it only fires once, i replaced the component ValueGeneratorComponent for the version 2.10.9 and works fine

  void update(double dt) {
    super.update(dt);
    if (!_isRunning) return;

    _currentValue += dt * _maxInMilliSeconds;
    if (_currentValue >= duration.inMilliseconds) {
      finish();
    } else {
      double value = curve.transform(_currentValue / duration.inMilliseconds);
      double realValue = begin + (_displacement * value);
      onChange?.call(realValue);
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant