mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Define PathIterator#getPoint(), #getTangent(), #getNormal() and #getCurvature().
This commit is contained in:
parent
67d30f0042
commit
52dd24097f
1 changed files with 8 additions and 1 deletions
|
@ -151,4 +151,11 @@ var PathIterator = Base.extend({
|
|||
ctx.bezierCurveTo.apply(ctx, curve.slice(2));
|
||||
}
|
||||
}
|
||||
});
|
||||
}, Base.each(['getPoint', 'getTangent', 'getNormal', 'getCurvature'],
|
||||
function(name, index) {
|
||||
this[name] = function(offset) {
|
||||
return this.evaluate(offset, index);
|
||||
};
|
||||
}, {})
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue