mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-09-29 17:49:08 +02:00
control (#261)
This commit is contained in:
@@ -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 };
|
||||
|
Reference in New Issue
Block a user