mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -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) {
|
||||
var intersections = path1.getIntersections(path2);
|
||||
if (intersections.length) {
|
||||
for (var j = 0; j < intersections.length; j++) {
|
||||
new Path.Circle({
|
||||
center: intersections[j].point,
|
||||
radius: 5,
|
||||
fillColor: '#009dec'
|
||||
}).removeOnMove();
|
||||
}
|
||||
for (var i = 0; i < intersections.length; i++) {
|
||||
new Path.Circle({
|
||||
center: intersections[i].point,
|
||||
radius: 5,
|
||||
fillColor: '#009dec'
|
||||
}).removeOnMove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue