1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-01 04:22:28 +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,12 +1,14 @@
let curve;
setup() {
this.curve = Bezier.defaultCubic(this);
setMovable(this.curve.points);
curve = Bezier.defaultCubic(this);
setMovable(curve.points);
}
draw() {
clear();
const curve = this.curve;
curve.drawSkeleton();
const pts = curve.points;
const f = 15;

View File

@@ -1,12 +1,14 @@
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();
const pts = curve.points;
const f = 15;