1.7 KiB
1.7 KiB
title | order |
---|---|
Pattern | 15 |
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
function freesewing.Pattern(object settings)
A pattern is instantiated by passing a settings object to the pattern constructor.
This settings objects holds, amongst other things, the measurements and options chosen by the user. Refer to the settings documentation 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 constructor |
settings |
The settings as set by the user |
store |
A Store instance |
svg |
An Svg instance |
settings
: The settings as set by the useroptions
: the options as set by the userconfig
: The pattern configurationparts
: A plain object to hold your partsPart
: The Part constructorstore
: A Store instancesvg
: An Svg instanceis
: A string that will be set todraft
orsample
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.