Repository navigation
Conversation
Replace the sample table + Newton-Raphson + bisection search with the closed-form solver of bezier-easing 3.2: exact (~1e-14 instead of up to ~1e-3), no backward jump on steep curves such as (1, 0, 0, 1). x outside [0, 1] now saturates to 0 / 1 instead of going through the old search, which returned arbitrary values there.
🦋 Changeset detectedLatest commit: abebcc2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe Bézier easing function replaces its sampled-table and iterative solver with a cubic solver. It clamps inputs at the endpoints and evaluates the y polynomial for interior inputs. A patch changeset records the update. ChangesBézier easing evaluation
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The Bézier evaluation change appears ready to merge after normal checks; no material issue remains identified. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hi, this is @gre, I'm the author of bezier-easing, which is also embedded in this project (
packages/plugin-bezier/src/bezier-utils.ts). The library was recently improved with better performance and more reliability, and I wanted to backport the benefits here.This brings its 3.2 solver (closed-form, no sample table) to
evaluate:(1, 0, 0, 1),evaluate(0.4996)returned 0.348 instead of 0.431, and the value went backwards around the middle.Includes a patch changeset for
@leva-ui/plugin-bezier. Compared against bezier-easing 3.2 on ~7.6M values: bit-identical. prettier is clean, and tsc reports no new errors.Summary by CodeRabbit