Skip to content

Release v2.0.2

Compare
Choose a tag to compare
@kjerandp kjerandp released this 16 Mar 19:38
· 52 commits to master since this release
  • Support for closed curves
  • Support for n-dimensions
  • Lookup values or positions along curve from any axis
  • Legacy support through CurveInterpolator2D class

This release has breaking changes. To migrate from v1 you can swap the CurveInterpolator class with the CurveInterpolator2D class, which allow you to use the same interface as before.

Breaking changes:

  • Removed methods getNormalAt, getAngleAt, x and y from CurveInterpolator class, as they are specific for 2 dimensions. The x and y methods should be replaced with the new lookup method.
  • getNormalAtT and getAngleAtT functions was removed from the core lib, as the is not relevant for higher dimensions and because they are trivial to implement using the getTangentAtT function (see CurveInterpolator2D)
  • The second argument to the CurveInterpolator class now takes an options-object, to set tension, arc divisions and now also if the curve should be closed or not.
  • The BBox interface was changed from an object of x1, x2, y1 and y2 properties to an object of properties min and max, where min and max are vectors containing the min and max values for all dimensions.