1.3 KiB
1.3 KiB
title |
---|
Pattern.sampleOption() |
The Pattern.sampleOption()
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, the variants it drafts depend on the type of option:
- For a Percentage or Degree option, 10 steps will be sampled, between min and max
- For a Counter or Millimeter option, a maximum of 10 steps will be sampled, between min and max
- For a Constant numeric option, 10 steps will be sampled between 90% and 110% of the value
- For a List option, each option in the list will be sampled
- For a Boolean option, both
false
andtrue
will be sampled
This method is chainable as it returns the Pattern object
Pattern.sampleOption() signature
Pattern pattern.sampleOption(string option)
Pattern.sampleOption() example
import { Aaron } from "@freesewing/aaron"
import { cisFemaleAdult34 } from "@freesewing/models"
const pattern = new Aaron({
measurements: cisFemaleAdult34
})
const svg = pattern.draft().sampleOption('backlineBend')