Displaying 1 to 6 from 6 results

svg-path-contours - gets a discrete list of points from svg

  •    Javascript

Approximates an SVG path into a discrete list of 2D contours (polylines). This is useful for collision detection, intersection, triangulation & WebGL rendering, etc. It does not attempt to clean or optimize the discretized points.See demo/index.js for exmaple.

smoothstep - the smoothstep() function

  •    Javascript

Bare-bones smoothstep function (cubic Hermite interpolation), returning a value in the range 0.0 to 1.0. Performs smoothstep from min to max using the given value, by clamping and then using cubic Hermite interpolation.




cubic-hermite-spline - Cubic Hermite spline interpolation

  •    Javascript

Cubic Hermite spline interpolation of points / tangents in any dimension with optional derivative computation. The interpolator can also take a knot-like vector as an optional parameter, which may be useful to enforce time at control points when used for position / velocity interpolation. Computes the interpolation at t for the provided set of points and tangents, and optional knots.

cubic2quad - Aproximates cubic bezier curves with quadratic ones.

  •    Javascript

Aproximates cubic Bezier curves with quadratic ones. This package was done to create TTF fonts (those support quadratic curves only). Generated curves have the same tangents angles at the ends. That's important to keep result visually smooth.