1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-25 17:42:46 +02:00
This commit is contained in:
Pomax
2020-08-30 23:06:34 -07:00
parent e6608d65af
commit 7cdc4217f5
24 changed files with 369 additions and 379 deletions

View File

@@ -142,8 +142,10 @@ class GraphicsAPI extends BaseAPI {
/**
* Multi-panel graphics: set up (0,0) to the next panel's start
*/
nextPanel(c) {
nextPanel(color = `black`) {
this.translate(this.panelWidth, 0);
this.setStroke(color);
this.line(0, 0, 0, this.height);
}
/**

View File

@@ -118,7 +118,7 @@ class Bezier extends Original {
return p;
}
drawStruts(t, color = `black`) {
drawStruts(t, color = `black`, showpoints = true) {
const p = t.forEach ? t : this.getStrutPoints(t);
const api = this.api;
@@ -134,7 +134,7 @@ class Bezier extends Original {
for (let i = 0; i < n; i++) {
let pt = p[s + i];
api.vertex(pt.x, pt.y);
api.circle(pt.x, pt.y, 5);
if (showpoints) api.circle(pt.x, pt.y, 5);
}
api.end();
s += n;