chore(markdown): Linting of dev docs
This commit is contained in:
parent
1d8beedd44
commit
265ad404da
317 changed files with 1281 additions and 1503 deletions
|
@ -8,12 +8,12 @@ about: Shows how to adapt the length of the sleevecap to fit your armhole
|
|||
|
||||
##### See this example in our source code
|
||||
|
||||
- [packages/bent/src/sleeve.js](https://github.com/freesewing/freesewing/blob/develop/packages/bent/src/sleeve.js)
|
||||
- [packages/bent/src/sleeve.js](https://github.com/freesewing/freesewing/blob/develop/packages/bent/src/sleeve.js)
|
||||
|
||||
</Note>
|
||||
|
||||
Fitting the sleevecap to the armhole means that we need to make sure the length
|
||||
of the seams match.
|
||||
of the seams match.\
|
||||
A similar challenge is to fit the collar to the neck opening and so on.
|
||||
|
||||
For all of these situations where you have to create curved seams with matching
|
||||
|
@ -25,15 +25,15 @@ This pattern is rather common, and we will unpack an example from Bent below.
|
|||
|
||||
Before we dive in, here's a few things to keep in mind:
|
||||
|
||||
- In Javascript, you can create a function within your function and call it
|
||||
- Bent extends Brian which sets both the `frontArmholeLength` and `backArmholeLength` values in the store with the length of those seams
|
||||
- We need to match the length of the sleevecap + sleeve cap ease to the length of the front and back armhole
|
||||
- In Javascript, you can create a function within your function and call it
|
||||
- Bent extends Brian which sets both the `frontArmholeLength` and `backArmholeLength` values in the store with the length of those seams
|
||||
- We need to match the length of the sleevecap + sleeve cap ease to the length of the front and back armhole
|
||||
|
||||
Here's how you can handle this in code:
|
||||
|
||||
- We create a method that does teh actual drafting of our sleevecap
|
||||
- We use a `tweak` value to influence the process, we start with a value of `1`
|
||||
- We check the length after every attempt, and adjust the `tweak` value
|
||||
- We create a method that does teh actual drafting of our sleevecap
|
||||
- We use a `tweak` value to influence the process, we start with a value of `1`
|
||||
- We check the length after every attempt, and adjust the `tweak` value
|
||||
|
||||
```js
|
||||
export default function (part) {
|
||||
|
@ -81,7 +81,7 @@ export default function (part) {
|
|||
|
||||
A few things that are important:
|
||||
|
||||
- We check to see how close we are by using `Math.abs(delta)` which gives us the absolute value of our delta
|
||||
- We guard against an endless loop by keeping track of the runs and giving up after 25
|
||||
- We multiply by `0.99` and `1.02` to respectively decrease and increase our `tweak` factor.
|
||||
This assymetric approach avoids that we end up ping-ponging around our target value and never land somewhere in the middle
|
||||
- We check to see how close we are by using `Math.abs(delta)` which gives us the absolute value of our delta
|
||||
- We guard against an endless loop by keeping track of the runs and giving up after 25
|
||||
- We multiply by `0.99` and `1.02` to respectively decrease and increase our `tweak` factor.
|
||||
This assymetric approach avoids that we end up ping-ponging around our target value and never land somewhere in the middle
|
||||
|
|
|
@ -8,7 +8,7 @@ about: Adding seam allowance or hem allowance is easy to do
|
|||
|
||||
##### See this example in our source code
|
||||
|
||||
- [packages/bruce/src/inset.js](https://github.com/freesewing/freesewing/blob/develop/packages/bruce/src/inset.js#L34)
|
||||
- [packages/bruce/src/inset.js](https://github.com/freesewing/freesewing/blob/develop/packages/bruce/src/inset.js#L34)
|
||||
|
||||
</Note>
|
||||
|
||||
|
@ -20,8 +20,8 @@ seam allowance.
|
|||
|
||||
In the example below we have two such paths:
|
||||
|
||||
- `paths.saBase` is the path that will require regular seam allowance
|
||||
- `paths.hemBase` is the path that will require more seam allowance, or hem allowance
|
||||
- `paths.saBase` is the path that will require regular seam allowance
|
||||
- `paths.hemBase` is the path that will require more seam allowance, or hem allowance
|
||||
|
||||
When creating them, we disable rendering, effectively hiding them.
|
||||
Then we string together our real path and our seam allowance based on them:
|
||||
|
|
|
@ -8,18 +8,18 @@ about: Slash and spread is easy enough on paper, here's how to do it in code
|
|||
|
||||
##### See this example in our source code
|
||||
|
||||
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L64)
|
||||
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L64)
|
||||
|
||||
</Note>
|
||||
|
||||
When we _slash and spread_ a pattern, we cut out a triangle, and then rotate it
|
||||
When we *slash and spread* a pattern, we cut out a triangle, and then rotate it
|
||||
around the tip of the triangle.
|
||||
|
||||
And that's exactly what we do in code. We just need to know:
|
||||
|
||||
- What point we want to rotate around
|
||||
- Which points we want to rotate
|
||||
- By how much we want to rotate
|
||||
- What point we want to rotate around
|
||||
- Which points we want to rotate
|
||||
- By how much we want to rotate
|
||||
|
||||
```js
|
||||
let rotate = [
|
||||
|
|
|
@ -8,7 +8,7 @@ about: Adding multiple snippets doesn't need to be a chore with this handy macro
|
|||
|
||||
##### See this example in our source code
|
||||
|
||||
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L381)
|
||||
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L381)
|
||||
|
||||
</Note>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue