1
0
Fork 0

Revert "chore: Linting for markdown and js"

This reverts commit 1c92e0f655.
This commit is contained in:
joostdecock 2021-10-17 18:26:00 +02:00
parent 994874fa72
commit cba1ab19c8
6627 changed files with 25791 additions and 24211 deletions

View file

@ -1,31 +1,31 @@
***
## title: Pattern.sample()
---
title: Pattern.sample()
---
A pattern's `sample()` method will *sample* the pattern which means
to draft it in different iterations while adjusting the input settings.
Under the hood, this method will call one of
Under the hood, this method will call one of
[Pattern.sampleOption()](/reference/apu/pattern/sampleoption),
[Pattern.sampleMeasurement()](/reference/apu/pattern/sampleoption), or
[Pattern.sampleModels()](/reference/apu/pattern/sampleoption) to sample
an option, a measurement, or a set of measurements respectively.
Unlike those three methods where you pass the relevant info to to the method,
this `Pattern.sample()` will instead read the `pattern.settings.sample`
Unlike those three methods where you pass the relevant info to to the method,
this `Pattern.sample()` will instead read the `pattern.settings.sample`
object to determine what to do.
The possiblities are:
* **type**: One of `option`, `measurement`, or `models`
* **option**: An option name as defined in the pattern config file (only used when `type` is option).
* **measurement**: A measurement name as defined in the pattern config file (only used when `type` is measurement).
* **models**: An array of models with the required measurements for this pattern (only used when `type` is models).
- **type**: One of `option`, `measurement`, or `models`
- **option**: An option name as defined in the pattern config file (only used when `type` is option).
- **measurement**: A measurement name as defined in the pattern config file (only used when `type` is measurement).
- **models**: An array of models with the required measurements for this pattern (only used when `type` is models).
See the specific sample methods below for more details:
* [Pattern.sampleOption()](/reference/apu/pattern/sampleoption)
* [Pattern.sampleMeasurement()](/reference/apu/pattern/sampleoption)
* [Pattern.sampleModels()](/reference/apu/pattern/sampleoption)
- [Pattern.sampleOption()](/reference/apu/pattern/sampleoption)
- [Pattern.sampleMeasurement()](/reference/apu/pattern/sampleoption)
- [Pattern.sampleModels()](/reference/apu/pattern/sampleoption)
From a lifecycle point of view, the `Pattern.sample()` method is a substitute for
`Pattern.draft()`. So you call it after instantiating the pattern, prior to
@ -56,11 +56,12 @@ roadmap](https://github.com/freesewing/freesewing/discussions/1278) for details.
</Warning>
## Pattern.sample() signature
```js
Pattern pattern.sample()
```
```
## Pattern.sample() example
@ -76,4 +77,5 @@ const pattern = new Aaron({
})
const svg = pattern.sample().render()
```
```