chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus setup. It's part of my efforts to simplify FreeSewing's setup so we can focus on our core value proposition.
This commit is contained in:
parent
497633d1d3
commit
ab3204f9f1
692 changed files with 11037 additions and 20674 deletions
46
sites/dev/docs/reference/api/utils/curveedge/readme.mdx
Normal file
46
sites/dev/docs/reference/api/utils/curveedge/readme.mdx
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: utils.curveEdge()
|
||||
---
|
||||
|
||||
The `utils.curveEdge()` function finds the edge of a cubic Bézier curve,
|
||||
given the curve, the edge to find ("top", "bottom", "left", or "right"),
|
||||
and the number of steps to divide the curve into while walking it.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
Point utils.curveEdge(
|
||||
Bezier curve,
|
||||
string edge,
|
||||
int steps = 500)
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="A Utils.curveEdge() example">
|
||||
```js
|
||||
({ Point, points, Path, paths, Snippet, snippets, utils, Bezier, part }) => {
|
||||
|
||||
points.A = new Point(20, 10)
|
||||
points.Acp = new Point(310, 40)
|
||||
points.Bcp = new Point(-210, 40)
|
||||
points.B = new Point(100, 70)
|
||||
|
||||
paths.pathA = new Path()
|
||||
.move(points.A)
|
||||
.curve(points.Acp, points.Bcp, points.B)
|
||||
|
||||
const curveA = new Bezier(
|
||||
{ x: points.A.x, y: points.A.y },
|
||||
{ x: points.Acp.x, y: points.Acp.y },
|
||||
{ x: points.Bcp.x, y: points.Bcp.y },
|
||||
{ x: points.B.x, y: points.B.y }
|
||||
)
|
||||
|
||||
points.edge = utils.curveEdge(curveA, "left")
|
||||
snippets.edge = new Snippet("notch", points.edge)
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
Loading…
Add table
Add a link
Reference in a new issue