1
0
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:
Pomax
2020-09-19 12:29:43 -07:00
parent 7bf5a223bf
commit 7c530fee56
31 changed files with 420 additions and 103 deletions

View File

@@ -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);
}