mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Mono-curves: No need to filter out curves with no length any more.
This commit is contained in:
parent
b1037f89f1
commit
8513144ae1
1 changed files with 28 additions and 32 deletions
|
@ -635,12 +635,9 @@ statics: /** @lends Curve */{
|
|||
* only containing its values are returned.
|
||||
*/
|
||||
getMonoCurves: function(v, dir) {
|
||||
var curves = [];
|
||||
// #getLength() is a rather expensive operation, therefore we test two
|
||||
// cheap preconditions first.
|
||||
if (v[0] !== v[6] || v[1] === v[7] || Curve.getLength(v) !== 0) {
|
||||
var curves = [],
|
||||
// Determine the ordinate index in the curve values array.
|
||||
var io = dir ? 0 : 1,
|
||||
io = dir ? 0 : 1,
|
||||
o0 = v[io],
|
||||
o1 = v[io + 2],
|
||||
o2 = v[io + 4],
|
||||
|
@ -673,7 +670,6 @@ statics: /** @lends Curve */{
|
|||
curves.push(parts[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return curves;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue