construction: Ported to v0.29
This commit is contained in:
parent
dee09139bf
commit
3f65251532
108 changed files with 1962 additions and 1940 deletions
27
packages/examples/src/utils_linesintersect.js
Normal file
27
packages/examples/src/utils_linesintersect.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
export default part => {
|
||||
let {
|
||||
debug,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
utils
|
||||
} = part.shorthand();
|
||||
|
||||
points.A = new Point(10, 10);
|
||||
points.B = new Point(50, 40);
|
||||
points.C = new Point(15, 30);
|
||||
points.D = new Point(60, 15);
|
||||
|
||||
paths.AB = new Path().move(points.A).line(points.B);
|
||||
paths.CD = new Path().move(points.C).line(points.D);
|
||||
|
||||
snippets.X = new Snippet(
|
||||
"x",
|
||||
utils.linesIntersect(points.A, points.B, points.C, points.D)
|
||||
);
|
||||
|
||||
return part;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue