wip: Working on better developer docs
This commit is contained in:
parent
c16b212bb9
commit
e0a261731f
25 changed files with 461 additions and 152 deletions
|
@ -3,7 +3,34 @@ title: Pattern
|
|||
order: 15
|
||||
---
|
||||
|
||||
A Pattern object comes wih the following properties:
|
||||
The `Pattern` object in FreeSewing's core library holds all data and logic of a pattern.
|
||||
It is the parametric blueprint that when instantiated with a user's measurements and
|
||||
objects will generated a made-to-measure pattern.
|
||||
|
||||
## Pattern constructor
|
||||
|
||||
```js
|
||||
function freesewing.Pattern(object settings)
|
||||
```
|
||||
|
||||
A pattern is instantiated by passing a [settings object](/reference/settings/) to the pattern constructor.
|
||||
|
||||
This settings objects holds, amongst other things, the measurements and options chosen by the user.
|
||||
Refer to the [settings documentation](/reference/settings/) for an exhaustive list.
|
||||
|
||||
|
||||
## Pattern properties
|
||||
|
||||
| Property | Description |
|
||||
| --------:| ----------- |
|
||||
| `config` | The pattern configuration |
|
||||
| `is` | A string that will be set to `draft` or `sample` when you respectively draft or sample a pattern. |
|
||||
| `options` | The options as set by the user |
|
||||
| `parts` | A plain object to hold your parts |
|
||||
| `Part` | The [Part](/en/docs/developer/api/part) constructor |
|
||||
| `settings` | The settings as set by the user |
|
||||
| `store` | A [Store](/en/docs/developer/api/store) instance |
|
||||
| `svg` | An [Svg](/en/docs/developer/api/svg) instance |
|
||||
|
||||
- `settings` : The settings as set by the user
|
||||
- `options` : the options as set by the user
|
||||
|
@ -15,6 +42,6 @@ A Pattern object comes wih the following properties:
|
|||
- `is` : A string that will be set to `draft` or `sample` when you respectively draft or sample a pattern.
|
||||
This allows plugins that hook into your pattern to determine what to do in a given scenario.
|
||||
|
||||
In addition, a Pattern object has the following methods:
|
||||
## Pattern methods
|
||||
|
||||
<ReadMore list />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue