compute parameters when cubic values change Diffs= f21ebc98c compute parameters when cubic values change (#6207) Co-authored-by: hernan <hernan@rive.app>
diff --git a/.rive_head b/.rive_head index 6ade423..c9622a7 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -5e33d8c962c55236d7de4275cd3ab4b040d9065f +f21ebc98ccb32677eae36f23f89391f93767ca51
diff --git a/include/rive/animation/cubic_value_interpolator.hpp b/include/rive/animation/cubic_value_interpolator.hpp index a7aafc1..bbd724b 100644 --- a/include/rive/animation/cubic_value_interpolator.hpp +++ b/include/rive/animation/cubic_value_interpolator.hpp
@@ -19,6 +19,7 @@ CubicValueInterpolator(); float transformValue(float valueFrom, float valueTo, float factor) override; float transform(float factor) const override; + StatusCode onAddedDirty(CoreContext* context) override; }; } // namespace rive
diff --git a/src/animation/cubic_value_interpolator.cpp b/src/animation/cubic_value_interpolator.cpp index 8f78112..ed4f607 100644 --- a/src/animation/cubic_value_interpolator.cpp +++ b/src/animation/cubic_value_interpolator.cpp
@@ -35,4 +35,10 @@ { assert(false); return factor; +} + +StatusCode CubicValueInterpolator::onAddedDirty(CoreContext* context) +{ + computeParameters(); + return Super::onAddedDirty(context); } \ No newline at end of file