1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-28 10:40:52 +02:00
This commit is contained in:
Pomax
2020-08-23 13:33:00 -07:00
parent c6d91e2c41
commit 9349103b48
60 changed files with 5561 additions and 23694 deletions

View File

@@ -25,12 +25,7 @@ setup() {
this.cxy = new Bezier(this, points.map(p => projectXY(p)));
this.cxz = new Bezier(this, points.map(p => projectXZ(p)));
this.cyz = new Bezier(this, points.map(p => projectYZ(p)));
this.t = 0;
setSlider(`.slide-control`, v => this.setPosition(v));
}
setPosition(v) {
this.t = v;
setSlider(`.slide-control`, `position`, 0);
}
draw() {
@@ -49,7 +44,7 @@ draw() {
line(curve.points[2].x, curve.points[2].y, curve.points[3].x, curve.points[3].y);
curve.points.forEach(p => circle(p.x, p.y, 2));
this.drawPoint(this.t);
this.drawPoint(this.position);
this.drawCubeFront();
}