chore(markdown): Working on v3 docs
This commit is contained in:
parent
22680fbddc
commit
1f7ba79f81
17 changed files with 433 additions and 272 deletions
|
@ -2,9 +2,11 @@
|
|||
title: Pattern.sampleModels()
|
||||
---
|
||||
|
||||
A pattern's `sampleModels()` method will _sample_ a pattern for a list of
|
||||
models you pass to it. It will draft different iterations of the pattern,
|
||||
using the measurements for each model you pass to it.
|
||||
The `Pattern.sampleModels()` method will _sample_ the pattern which means
|
||||
to draft multiple variants of the same pattern, and stack them on
|
||||
top of each other.
|
||||
|
||||
In this particular case, it will draft a variants for each of the models you pass it.
|
||||
|
||||
<Tip>
|
||||
The goal of model sampling is to verify that a pattern grades correctly up and down as sizes change.
|
||||
|
@ -12,24 +14,13 @@ The goal of model sampling is to verify that a pattern grades correctly up and d
|
|||
|
||||
<Note>This method is chainable as it returns the Pattern object</Note>
|
||||
|
||||
<Tip>
|
||||
|
||||
###### Anchor your samples
|
||||
|
||||
If you add a point named `anchor` to your pattern part, the different samples
|
||||
will be anchored on this point.
|
||||
|
||||
In other words, for each sample, the anchor point will be kept in the same location.
|
||||
|
||||
</Tip>
|
||||
|
||||
## Pattern.sampleModels() signature
|
||||
|
||||
```js
|
||||
Pattern pattern.sampleModels(object models, string focus)
|
||||
```
|
||||
|
||||
The models object you pass as the first parameter should be structured as such:
|
||||
The `models` object you pass as the first parameter should be structured as such:
|
||||
|
||||
```js
|
||||
{
|
||||
|
@ -61,10 +52,10 @@ identifying your model in the models object.
|
|||
## Pattern.sampleModels() example
|
||||
|
||||
```js
|
||||
import Aaron from "@freesewing/aaron"
|
||||
import models from "@freesewing/models"
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult } from "@freesewing/models"
|
||||
|
||||
const Aaron = new Aaron()
|
||||
|
||||
const svg = aaron.sampleModels(models, "manSize38").render()
|
||||
const svg = aaron.sampleModels(cisFemaleAdult, "34').render()
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue