mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Activate code that handles self-intersection directly now.
Relates to #765, #761
This commit is contained in:
parent
abf70378fe
commit
78e0bae6aa
1 changed files with 10 additions and 8 deletions
|
@ -76,20 +76,22 @@ PathItem.inject(new function() {
|
|||
_path2.reverse();
|
||||
// Split curves at intersections on both paths. Note that for self
|
||||
// intersection, _path2 will be null and getIntersections() handles it.
|
||||
splitPath(Curve._filterIntersections(
|
||||
_path1._getIntersections(_path2, null, []), true));
|
||||
/*
|
||||
console.time('inter');
|
||||
|
||||
// Without support for self-intersection
|
||||
// splitPath(Curve._filterIntersections(
|
||||
// _path1._getIntersections(_path2, null, []), true));
|
||||
|
||||
// console.time('inter');
|
||||
var locations = _path1._getIntersections(_path2, null, []);
|
||||
console.timeEnd('inter');
|
||||
// console.timeEnd('inter');
|
||||
if (_path2 && false) {
|
||||
console.time('self');
|
||||
// console.time('self');
|
||||
_path1._getIntersections(null, null, locations);
|
||||
_path2._getIntersections(null, null, locations);
|
||||
console.timeEnd('self');
|
||||
// console.timeEnd('self');
|
||||
}
|
||||
splitPath(Curve._filterIntersections(locations, true));
|
||||
*/
|
||||
|
||||
var chain = [],
|
||||
segments = [],
|
||||
// Aggregate of all curves in both operands, monotonic in y
|
||||
|
|
Loading…
Reference in a new issue