chore(markdown): Changes to refer less to models
This commit is contained in:
parent
75eff4f5e4
commit
e35bda36f7
16 changed files with 86 additions and 55 deletions
|
@ -17,7 +17,6 @@ Pattern pattern.addPart(object part)
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
|
||||
const extra = {
|
||||
name: 'aaron.extra',
|
||||
|
@ -36,9 +35,14 @@ const extra = {
|
|||
}
|
||||
}
|
||||
|
||||
const pattern = new Aaron({
|
||||
measurements: cisFemaleAdult34
|
||||
}).addPart(extra)
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const pattern = new Aaron({ measurements }).addPart(extra)
|
||||
|
||||
const svg = pattern.draft().render()
|
||||
```
|
||||
|
|
|
@ -19,11 +19,15 @@ Pattern pattern.draft()
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
|
||||
const pattern = new Aaron({
|
||||
measurements: cisFemaleAdult34
|
||||
})
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const pattern = new Aaron({ measurements })
|
||||
|
||||
const svg = pattern.draft().render()
|
||||
```
|
||||
|
|
|
@ -22,11 +22,6 @@ object pattern.getConfig()
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
|
||||
const pattern = new Aaron({
|
||||
measurements: cisFemaleAdult34
|
||||
})
|
||||
|
||||
const config = pattern.getConfig()
|
||||
const config = new Aaron().getConfig()
|
||||
```
|
||||
|
|
|
@ -16,11 +16,15 @@ string pattern.render()
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
|
||||
const pattern = new Aaron({
|
||||
measurements: cisFemaleAdult34
|
||||
})
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const pattern = new Aaron({ measurements })
|
||||
|
||||
const svg = pattern.draft().render()
|
||||
```
|
||||
|
|
|
@ -35,11 +35,17 @@ Pattern pattern.sample()
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult } from "@freesewing/models"
|
||||
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const pattern = new Aaron({
|
||||
sample: {
|
||||
models: cisFemaleAdult
|
||||
models: measurements
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -25,11 +25,15 @@ Pattern pattern.sampleMeasurement(string measurement)
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
|
||||
const pattern = new Aaron({
|
||||
measurements: cisFemaleAdult34
|
||||
})
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const pattern = new Aaron({ measurements })
|
||||
|
||||
const svg = pattern.draft().sampleMeasurement('chest')
|
||||
```
|
||||
|
|
|
@ -53,9 +53,15 @@ identifying your model in the models object.
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult } from "@freesewing/models"
|
||||
|
||||
const Aaron = new Aaron()
|
||||
|
||||
const svg = aaron.sampleModels(cisFemaleAdult, "34").render()
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const svg = aaron.sampleModels(measurements, "34").render()
|
||||
```
|
||||
|
|
|
@ -32,11 +32,15 @@ Pattern pattern.sampleOption(string option)
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
|
||||
const pattern = new Aaron({
|
||||
measurements: cisFemaleAdult34
|
||||
})
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const pattern = new Aaron({ measurements })
|
||||
|
||||
const svg = pattern.draft().sampleOption('backlineBend')
|
||||
```
|
||||
|
|
|
@ -23,12 +23,16 @@ you plugin object.
|
|||
|
||||
```js
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
import { pluginTheme } from "@freesewing/plugin-theme"
|
||||
|
||||
const pattern = new Aaron({
|
||||
measurements: cisFemaleAdult34
|
||||
}).use(pluginTheme)
|
||||
// Load some public test measurements from the FreeSewing backend
|
||||
const measurements = (
|
||||
await (
|
||||
await fetch("https://backend3.freesewing.org/curated-sets/1.json")
|
||||
).json()
|
||||
).measurements
|
||||
|
||||
const pattern = new Aaron({ measurements }).use(pluginTheme)
|
||||
|
||||
const svg = pattern.draft().render()
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue