mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-09-01 20:33:34 +02:00
fixing some errors to make the build pass
This commit is contained in:
@@ -16,21 +16,26 @@ module.exports = {
|
||||
api.drawSkeleton(curve);
|
||||
api.drawCurve(curve);
|
||||
|
||||
var tf = curve.order + 1,
|
||||
var tf = curve.order,
|
||||
pad = 20,
|
||||
pts = curve.points,
|
||||
w = api.getPanelWidth(),
|
||||
wp = w - 2 * pad,
|
||||
h = api.getPanelHeight(),
|
||||
offset = { x: w, y: 0 };
|
||||
|
||||
var x_pts = JSON.parse(JSON.stringify(pts)).map((p,t) => { return {x:w*t/tf, y:p.x}; });
|
||||
var x_pts = JSON.parse(JSON.stringify(pts)).map((p,t) => {
|
||||
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);
|
||||
offset.x += pad;
|
||||
api.drawCurve(new api.Bezier(x_pts), offset);
|
||||
|
||||
offset.x += w-pad;
|
||||
var y_pts = JSON.parse(JSON.stringify(pts)).map((p,t) => { return {x:w*t/tf, y:p.y}; });
|
||||
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);
|
||||
offset.x += pad;
|
||||
|
@@ -1,3 +1,3 @@
|
||||
var handler = require("./handler.js");
|
||||
var generateBase = require("../../generate-base");
|
||||
module.exports = generateBase("graduatedoffset", handler);
|
||||
module.exports = generateBase("inflections", handler);
|
||||
|
Reference in New Issue
Block a user