points-on-curve
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -102,4 +102,6 @@ // distance between 2 points | ||
else { | ||
// add the 2 end points | ||
outPoints.push(s, e); | ||
if (!outPoints.length) { | ||
outPoints.push(s); | ||
} | ||
outPoints.push(e); | ||
} | ||
@@ -106,0 +108,0 @@ return outPoints; |
{ | ||
"name": "points-on-curve", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Estimate points on a bezier curve or a set of connexted bezier curves", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
# points-on-curve | ||
This package calculate the points on a curve with a certain tolerance. It can also simplify the shape to use fewer points. | ||
This can really usefule when estimating lines/polygons for curves in WebGL or for Hit/Cosllision detections. | ||
This can really be useful when estimating lines/polygons for curves in WebGL or for Hit/Collision detections. | ||
@@ -14,3 +14,3 @@ ## Install | ||
The code is distributed as an ES6 module. | ||
The package is distributed as an ES6 module. | ||
@@ -17,0 +17,0 @@ ## API |
@@ -113,4 +113,6 @@ export type Point = [number, number]; | ||
} else { | ||
// add the 2 end points | ||
outPoints.push(s, e); | ||
if (!outPoints.length) { | ||
outPoints.push(s); | ||
} | ||
outPoints.push(e); | ||
} | ||
@@ -117,0 +119,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18077
393