1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-22 16:23:12 +02:00

table sliders + FF scroll fix

This commit is contained in:
Pomax
2020-09-13 14:52:18 -07:00
parent c0a1207d67
commit 9952c2831e
19 changed files with 91 additions and 56 deletions

View File

@@ -1,6 +1,7 @@
let curve;
setup() {
setPanelCount(3);
curve = Bezier.defaultCubic(this);
setMovable(curve.points);
setSlider(`.slide-control`, `position`, 0.5);
@@ -16,16 +17,15 @@ draw() {
this.drawBasics(p);
translate(this.width/3, 0);
nextPanel();
setStroke(`black`);
line(0, 0, 0, this.height);
this.drawSegment(c1, p, `first`);
translate(this.width/3, 0);
nextPanel();
setStroke(`black`);
line(0, 0, 0, this.height);
this.drawSegment(c2, p, `second`);
}
@@ -47,9 +47,9 @@ drawSegment(c, p, halfLabel) {
setStroke(`lightblue`);
curve.drawCurve(`lightblue`);
curve.drawSkeleton(`lightblue`);
curve.drawStruts(this.struts);
c.drawCurve();
c.drawSkeleton(`black`);
c.points.forEach(p => circle(p.x, p.y, 3));
noFill();
setStroke(`red`);
circle(p.x, p.y, 3);