1
0
Fork 0

Added Path.shiftFractionAlong()

This commit is contained in:
Joost De Cock 2018-08-08 16:41:50 +02:00
parent 4c6c80e0ac
commit 34a17071c2

View file

@ -296,6 +296,11 @@ Path.prototype.shiftAlong = function(distance) {
throw "Ran out of curve to shift along";
};
/** Returns a point that lies at fraction along this */
Path.prototype.shiftFractionAlong = function(fraction) {
return this.shiftAlong(this.length() * fraction);
};
/** Returns a point that lies at distance along bezier */
function shiftAlongBezier(distance, bezier) {
let steps = 100;