mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-28 18:49:57 +02:00
.
This commit is contained in:
@@ -28,17 +28,20 @@ module.exports = {
|
||||
return {x:wp*t/tf, y:p.x};
|
||||
});
|
||||
api.drawLine({x:0,y:0}, {x:0,y:h}, offset);
|
||||
api.drawAxes(pad, "t",0,1, "x",0,w, offset);
|
||||
api.drawAxes(pad, "t",0,1, "x",0,w-pad, offset);
|
||||
offset.x += pad;
|
||||
offset.y += pad;
|
||||
api.drawCurve(new api.Bezier(x_pts), offset);
|
||||
|
||||
offset.x += w-pad;
|
||||
offset.y -= pad;
|
||||
var y_pts = JSON.parse(JSON.stringify(pts)).map((p,t) => {
|
||||
return {x:wp*t/tf, y:p.y};
|
||||
});
|
||||
api.drawLine({x:0,y:0}, {x:0,y:h}, offset);
|
||||
api.drawAxes(pad, "t",0,1, "y",0,w, offset);
|
||||
api.drawAxes(pad, "t",0,1, "y",0,w-pad, offset);
|
||||
offset.x += pad;
|
||||
offset.y += pad;
|
||||
api.drawCurve(new api.Bezier(y_pts), offset);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user