1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-29 17:49:08 +02:00
This commit is contained in:
Pomax
2020-08-09 17:16:50 -07:00
committed by GitHub
parent fc30421eae
commit c97b1b635e
43 changed files with 812 additions and 465 deletions

View File

@@ -1,17 +1,3 @@
/**
* A shape subpath
*/
class Segment {
constructor(type, factor) {
this.type = type;
this.factor = factor;
this.points = [];
}
add(p) {
this.points.push(p);
}
}
/**
* A complex shape, represented as a collection of paths
* that can be either polygon, Catmull-Rom curves, or
@@ -40,4 +26,18 @@ Shape.POLYGON = `Polygon`;
Shape.CURVE = `CatmullRom`;
Shape.BEZIER = `Bezier`;
/**
* A shape subpath
*/
class Segment {
constructor(type, factor) {
this.type = type;
this.factor = factor;
this.points = [];
}
add(p) {
this.points.push(p);
}
}
export { Shape, Segment };