1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-17 22:11:38 +02:00

figured out how to reuse sketches with data-attribute parameters

This commit is contained in:
Pomax
2020-08-26 21:56:58 -07:00
93 changed files with 5805 additions and 24390 deletions

View File

@@ -1,16 +1,13 @@
let curve;
setup() {
this.curve = Bezier.defaultQuadratic(this);
setMovable(this.curve.points);
curve = Bezier.defaultQuadratic(this);
setMovable(curve.points);
}
draw() {
clear();
const curve = this.curve;
curve.drawSkeleton();
curve.drawCurve();
curve.drawPoints();
}
onMouseMove() {
redraw();
}