1
0
Fork 0
freesewing/markdown/dev/reference/api/en.md

51 lines
1.5 KiB
Markdown
Raw Normal View History

2021-10-17 17:34:55 +02:00
***
title: Core API
for: developers
2021-10-17 17:34:55 +02:00
icons:
* javascript
* terms
about: FreeSewing's core API reference documents all available methods and objects
***
2021-09-25 17:05:18 +02:00
This is the documentation for FreeSewing's core library, published as `@freesewing/core` on NPM.
2021-10-17 17:34:55 +02:00
It's a complete toolbox for parametric design with a primary focus on
2021-09-25 17:05:18 +02:00
sewing patterns, but can be utilized for a variety of similar 2D design tasks.
## Getting started
To get started, import the library:
```js
import freesewing from '@freesewing/core'
```
2021-09-25 17:05:18 +02:00
<Tip>
2021-10-17 17:34:55 +02:00
This is the reference documentation. For a more hands-on walkthrough,
2021-09-25 17:05:18 +02:00
please refer to our [pattern design tutorial](/tutorials/pattern-design/)
</Tip>
## Properties
The `@freesewing/core` default export is a single object with the following properties:
2021-10-17 17:34:55 +02:00
* `Design`: The [Design constructor](/reference/api/design/) to create a new design
2021-09-25 17:05:18 +02:00
<Note>
2021-10-17 17:34:55 +02:00
You will typically use the `Design()` constructor.\
The other constructors and utilities below are exported to facilitate unit testing.
2021-09-25 17:05:18 +02:00
</Note>
2021-10-17 17:34:55 +02:00
* `Path`: The [Path constructor](/reference/api/path) to create a new path
* `Pattern`: The [Pattern constructor](/reference/api/pattern) to create a new pattern
* `Point`: The [Point constructor](/reference/api/point) to create a new point
* `Snippet`: The [Snippet constructor](/reference/api/snippet) to create a new snippet
* `utils`: A collection of [utilities](/reference/api/utils)
* `version`: A string containing the `@freesewing/core` version number