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:
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user