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
35
sites/dev/docs/reference/api/point/rotate/readme.mdx
Normal file
35
sites/dev/docs/reference/api/point/rotate/readme.mdx
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
title: Point.rotate()
|
||||
---
|
||||
|
||||
The `Point.rotate()` method returns a new `Point` that has been rotated by
|
||||
`angle` degrees around the point (`center`) that you pass it.
|
||||
|
||||
Just like the result of the [`Point.angle()`](/reference/api/point/angle/)
|
||||
method, an angle of 0° points right, and the angle increases counterclockwise.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
Point point.rotate(float angle, Point center)
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="An example of the Point.rotate() method">
|
||||
```js
|
||||
({ Point, points, Path, paths, Snippet, snippets, part }) => {
|
||||
|
||||
points.sun = new Point(40, 40)
|
||||
points.moon = new Point(70, 40)
|
||||
let step = 360 / 36
|
||||
for (let i = 1; i < 37; i++) {
|
||||
let angle = step * i
|
||||
points[`moon${i}`] = points.moon.rotate(angle, points.sun)
|
||||
paths[`moon${i}`] = new Path().move(points.sun).line(points[`moon${i}`])
|
||||
}
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
Loading…
Add table
Add a link
Reference in a new issue