mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Simplify PathIntersections example.
This commit is contained in:
parent
06beb0141b
commit
c0392b837c
1 changed files with 6 additions and 8 deletions
|
@ -34,14 +34,12 @@
|
||||||
|
|
||||||
function showIntersections(path1, path2) {
|
function showIntersections(path1, path2) {
|
||||||
var intersections = path1.getIntersections(path2);
|
var intersections = path1.getIntersections(path2);
|
||||||
if (intersections.length) {
|
for (var i = 0; i < intersections.length; i++) {
|
||||||
for (var j = 0; j < intersections.length; j++) {
|
new Path.Circle({
|
||||||
new Path.Circle({
|
center: intersections[i].point,
|
||||||
center: intersections[j].point,
|
radius: 5,
|
||||||
radius: 5,
|
fillColor: '#009dec'
|
||||||
fillColor: '#009dec'
|
}).removeOnMove();
|
||||||
}).removeOnMove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue