Snyk has created this PR to upgrade curve-interpolator from 3.0.1 to 3.1.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 7 versions ahead of your current version.
The recommended version was released 21 days ago, on 2023-02-21.
A complete re-write of the library for a better developer experience, improved performance and of course, some new features.
New features:
get curvature at any point or time along the curve
get nearest position on curve from a given point
get normal and tangent at any point or time
convenience functions added to get position or time at knot points
convenience functions added for mapping between position (u) and time (t)
convenience functions added for mapping between length and normalized length/position (u)
convenience functions added for iterating over a range of the curve (map, reduce and forEach)
numerical integral method now used as default for calculating length and mapping between time and position (if arcDivisions option = 0 or not provided)
improved performance and accuracy
Some existing functions are still available, but marked as deprecated and put into the legacy folder in the source code. These will be removed from the library shortly.
As this is a rewrite of the library from the ground up, there are a a few breaking changes to be aware of:
CurveInterpolator.getT is now named CurveInterpolator.getTimeFromPosition
CurveInterpolator.lookup is now named CurveInterpolator.getIntersects
CurveInterpolator.lookupPositions is now named CurveInterpolator.getIntersectsAsPositions
If you used any of the old core functions, like getPointAtT , getTangentAtT etc. you should now instantiate and use the CurveInterpolator class. The reason for this is to allow caching of coefficients and other pre-calculated values. The CurveInterpolator has functions such as CurveInterpolator.getPointAtTime and CurveInterpolator.getTangentAtTime etc. that serves the same purpose.
Please report an issue if you find a bug, have issues migrating to the new version or just have questions. Hope you find this library useful!
a6078eb Added function for getting the nearest position on curve from a point ref issue #13
922db5c bumped version to v3.1.0-beta.3 and re-generated docs
3f574d4 Curvature function now returns a direction and tangent vector. Refactored and added a reset function that may be used in order to invalidate cache if deliberatly mutating input points.
Snyk has created this PR to upgrade curve-interpolator from 3.0.1 to 3.1.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: curve-interpolator
A complete re-write of the library for a better developer experience, improved performance and of course, some new features.
New features:
Some existing functions are still available, but marked as deprecated and put into the legacy folder in the source code. These will be removed from the library shortly.
As this is a rewrite of the library from the ground up, there are a a few breaking changes to be aware of:
If you used any of the old core functions, like getPointAtT , getTangentAtT etc. you should now instantiate and use the CurveInterpolator class. The reason for this is to allow caching of coefficients and other pre-calculated values. The CurveInterpolator has functions such as CurveInterpolator.getPointAtTime and CurveInterpolator.getTangentAtTime etc. that serves the same purpose.
Please report an issue if you find a bug, have issues migrating to the new version or just have questions. Hope you find this library useful!
Take a look at the new demo at ObservableHQ: https://observablehq.com/@ kjerandp/curve-interpolator-demo
Fixed issue where calculating arc lengths would fail when input points contained adjacent duplicates
Commit messages
Package name: curve-interpolator
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs