mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-09-28 00:59:00 +02:00
graphics-api docs
This commit is contained in:
@@ -7,7 +7,7 @@ class Shape {
|
||||
constructor(type, factor, points = []) {
|
||||
this.first = false;
|
||||
this.segments = [];
|
||||
this.addSegment(type, factor);
|
||||
this.newSegment(type, factor);
|
||||
points.forEach((p) => this.vertex(p));
|
||||
}
|
||||
merge(other) {
|
||||
@@ -22,7 +22,7 @@ class Shape {
|
||||
copy.segments = this.segments.map((s) => s.copy());
|
||||
return copy;
|
||||
}
|
||||
addSegment(type, factor) {
|
||||
newSegment(type, factor) {
|
||||
this.currentSegment = new Segment(type, factor);
|
||||
this.segments.push(this.currentSegment);
|
||||
}
|
||||
|
Reference in New Issue
Block a user