chore(markdown): Add Svg.render() documentation
This commit is contained in:
parent
af9b27c8e3
commit
9593e8d078
1 changed files with 25 additions and 1 deletions
|
@ -2,4 +2,28 @@
|
|||
title: Svg.render()
|
||||
---
|
||||
|
||||
FIXME: Write docs
|
||||
The `Svg.render()` method will render a drafted
|
||||
[Pattern](/reference/core/pattern) as SVG.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
string svg.render()
|
||||
```
|
||||
|
||||
## Svg.render() example
|
||||
|
||||
```
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
|
||||
// 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 = new Svg(pattern).render()
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue