4.2 KiB
title |
---|
@freesewing/core API |
This is the documentation for FreeSewing's core library, published as @freesewing/core
on NPM.
It's a complete toolbox for parametric design with a primary focus on
sewing patterns, but can be utilized for a variety of similar 2D design tasks.
Looking to get started?
You are currently browsing the reference documentation. Please refer to the quick start guide to get started.
Named exports
Ever since version 3 of FreeSewing, we use only named exports, and no default exports.
Refer to the migration guide for more details.
The @freesewing/core
package provides the following named exports:
Named export | Description |
---|---|
version | The version of @freesewing/core |
Bezier | A re-export of the bezier-js dependency |
The following named exports are constructors:
You will typically use the Design()
constructor.
The other constructors and utilities below are exported to
facilitate unit testing and other specific use cases.
Named export | Description |
---|---|
Design |
The Design constructor |
Attributes |
The Attributes constructor |
Pattern |
The Pattern constructor |
Point |
The Point constructor |
Path |
The Path constructor |
Part |
The Part constructor |
Snippet |
The Snippet constructor |
Store |
The Store constructor |
The following named exports are uitility methods:
Named export | Description |
---|---|
beamIntersectsCircle |
See the beamIntersectsCircle documentation |
beamIntersectsX |
See the beamIntersectsX documentation |
beamIntersectsY |
See the beamIntersectsY documentation |
beamsIntersect |
See the beamsIntersect documentation |
capitalize |
See the capitalize documentation |
circlesIntersect |
See the circlesIntersect documentation |
curveEdge |
See the curveEdge documentation |
curveIntersectsX |
See the curveIntersectsX documentation |
curveIntersectsY |
See the curveIntersectsY documentation |
curvesIntersect |
See the curvesIntersect documentation |
deg2rad |
See the deg2rad documentation |
generateStackTransform |
see the generateStackTransform documentation |
lineIntersectsCircle |
See the lineIntersectsCircle documentation |
lineIntersectsCurve |
See the lineIntersectsCurve documentation |
linesIntersect |
See the linesIntersect documentation |
pctBasedOn |
See the pctBasedOn documentation |
pointOnBeam |
See the pointOnBeam documentation |
pointOnCurve |
See the pointOnCurve documentation |
pointOnLine |
See the pointOnLine documentation |
rad2deg |
See the rad2deg documentation |
splitCurve |
See the splitCurve documentation |
stretchToScale |
See the stretchToScale documentation |
units |
See the units documentation |