fix(docs): Correct small typos
This commit is contained in:
parent
265833d419
commit
fea16617d4
31 changed files with 36 additions and 36 deletions
|
@ -3,7 +3,7 @@ title: Attributes.asPropsIfPrefixIs()
|
|||
---
|
||||
|
||||
The `Attributes.asPropsIfPrefixIs()` method will return attribute values as a
|
||||
props object (a plain Javascript object) but only for those keys who start with
|
||||
props object (a plain JavaScript object) but only for those keys who start with
|
||||
`prefix`.
|
||||
|
||||
## Signature
|
||||
|
|
|
@ -11,7 +11,7 @@ The `Attributes.get()` method will return the value of attribute stored under
|
|||
string attributes.get(string key)
|
||||
```
|
||||
|
||||
If key has multiple values, they will be joined together in a string, seperated by spaces.
|
||||
If key has multiple values, they will be joined together in a string, separated by spaces.
|
||||
|
||||
## Example
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ title: Attributes.renderAsCss()
|
|||
---
|
||||
|
||||
The `Attributes.renderAsCss()` method will render attributes as a string
|
||||
suitable for inclusion in a CSS defninition.
|
||||
suitable for inclusion in a CSS definition.
|
||||
|
||||
## Signature
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Design
|
||||
---
|
||||
|
||||
The `Design` named export in FreeSewing's core library is a contructor that
|
||||
The `Design` named export in FreeSewing's core library is a constructor that
|
||||
creates new pattern designs.
|
||||
|
||||
## Signature
|
||||
|
@ -39,7 +39,7 @@ const Sorcha = new Design({
|
|||
|
||||
<Tip>A Design in FreeSewing is little more than a container for various Parts</Tip>
|
||||
|
||||
Optionally, you can also pass it a `data` attrbute
|
||||
Optionally, you can also pass it a `data` attribute
|
||||
to hold any custom data you'd like to add to your Design.
|
||||
|
||||
Any `data` you add to the Design constructor will be added
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Setting a value in millimeter as a percentage option
|
||||
---
|
||||
|
||||
Percentage options are great for parametric desing, but not always
|
||||
Percentage options are great for parametric design, but not always
|
||||
very intuitive for the user. For example: A user may desire 13
|
||||
centimeters (5 inches) of chest ease. But what percentage should
|
||||
they set the `chestEase` option to to accomplish this?
|
||||
|
|
|
@ -22,10 +22,10 @@ Your snapped percentage option should be a plain object with these properties:
|
|||
##### Values for snapped percentage options are available through `absoluteOptions`
|
||||
|
||||
Your draft method can not only destructure the `options` property to get access to options,
|
||||
it can also desctructure the `absoluteOptions` property to get access to the values
|
||||
it can also destructure the `absoluteOptions` property to get access to the values
|
||||
for those options with snaps configured.
|
||||
|
||||
See [the part `draft()` method](/reference/api/part/draft) for mor details.
|
||||
See [the part `draft()` method](/reference/api/part/draft) for more details.
|
||||
|
||||
</Tip>
|
||||
|
||||
|
@ -179,7 +179,7 @@ under the hood, let's first agree on terminology:
|
|||
Its value always represents a percentage. For example `0.5` for 50%.
|
||||
- The **millimeter value** is the result of feeding the **percentage value** to
|
||||
the `toAbs()` method. Its value always represents millimeters. For example `12mm`.
|
||||
- The **snap values** are the values provided by the snap confguration.
|
||||
- The **snap values** are the values provided by the snap configuration.
|
||||
Each of the values always represents millimeters (even for imperial users).
|
||||
|
||||
Under the hood, and snapped percentage option will:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Reporting a percentage option value in millimeter
|
||||
---
|
||||
|
||||
Percentage options are great for parametric desing, but not always
|
||||
Percentage options are great for parametric design, but not always
|
||||
very intuitive for the user. For example: Setting the `chestEase`
|
||||
option to `9%` is not very meaningful unless you happen to know
|
||||
what that percentage is based on.
|
||||
|
|
|
@ -4,7 +4,7 @@ title: Part
|
|||
|
||||
A `Part` in FreeSewing holds all data, logic, and configuration of a Design.
|
||||
Parts truly are the building blocks of FreeSewing as they not only provide
|
||||
the configurarion, but also a `draft()` method that does the actual work
|
||||
the configuration, but also a `draft()` method that does the actual work
|
||||
of drafting a parametric design.
|
||||
|
||||
## Example
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Part.getId()
|
||||
---
|
||||
|
||||
The `Part.getId()` methid will return an integer the can be used as an
|
||||
The `Part.getId()` method will return an integer the can be used as an
|
||||
for ID Points/Paths/Snippets. This method will ensure the ID is unique by
|
||||
keeping an internal incremental counter of the IDs that have been used.
|
||||
It is typically used when programatically adding points, paths, or snippets.
|
||||
|
@ -19,7 +19,7 @@ in [a part's draft method](/reference/api/part/draft).
|
|||
int|string getId(prefix='')
|
||||
```
|
||||
|
||||
This methiod takes an optional parameter that will be used as a prefix for the ID.
|
||||
This method takes an optional parameter that will be used as a prefix for the ID.
|
||||
|
||||
## Part.getId() example
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Path.asPathString()
|
||||
---
|
||||
|
||||
This `Path.asPathString()` returs the path as a string that can be used
|
||||
This `Path.asPathString()` returns the path as a string that can be used
|
||||
as the `d` attribute for an SVG `path` element.
|
||||
|
||||
## Signature
|
||||
|
|
|
@ -13,7 +13,7 @@ Path path.reverse(bool cloneAttributes=false)
|
|||
|
||||
If you pass a truthy value to this method, it will return a deep clone of the
|
||||
path, including its attributes. By default, it will return a shallow
|
||||
copy, whithout the attributes.
|
||||
copy, without the attributes.
|
||||
|
||||
## Example
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ Number path.roughLength()
|
|||
|
||||
## Notes
|
||||
|
||||
The `Path.roughLength()` is not intended to give an estimate that is accurate, but rather differentiatate between paths that are a few millimeter long, or meters long.
|
||||
The `Path.roughLength()` is not intended to give an estimate that is accurate, but rather differentiates between paths that are a few millimeter long, or meters long.
|
||||
|
||||
It calculates the length without *walking the (cubic) Bezier curve* making it very fast and very inaccurate (for curves).
|
||||
It is typically used to determine how much precision to apply when walking a curve.
|
||||
|
|
|
@ -53,7 +53,7 @@ const pattern = new Florence([
|
|||
We refer to these *multiple sets of settings* as **multisets**.
|
||||
It is what powers FreeSewing's [sampling capabilities](/reference/api/pattern/sample) but
|
||||
it also allows you to draft some pattern parts with one set of measurements, and other parts
|
||||
with another set. For example if you have an asymetric model to fit.
|
||||
with another set. For example if you have an asymmetric model to fit.
|
||||
|
||||
<Note>
|
||||
|
||||
|
|
|
@ -39,4 +39,4 @@ the following properties:
|
|||
| `settings` | The (sets of) settings used to draft the pattern |
|
||||
| `stacks` | A plain object holding the drafted stacks |
|
||||
| `svg` | An [Svg Object](/reference/api/svg/) object with the `preRender` hook applied |
|
||||
| `width` | Widht of the drafted pattern in `mm` |
|
||||
| `width` | Width of the drafted pattern in `mm` |
|
||||
|
|
|
@ -18,7 +18,7 @@ Pattern pattern.on(string hook, function method)
|
|||
<Tip>
|
||||
|
||||
Refer to [the Lifecycle hooks documentation](/reference/hooks/) for a list
|
||||
of all availalble lifecycle hooks, as well as the signature of the function you
|
||||
of all available lifecycle hooks, as well as the signature of the function you
|
||||
should pass it.
|
||||
|
||||
</Tip>
|
||||
|
|
|
@ -44,7 +44,7 @@ could hold `modelName2` for example.
|
|||
|
||||
By passing this second parameter, you can put the _focus_ on one of the models,
|
||||
which will influence the render style, and make it
|
||||
easier to see a comparison between a given set of measrurements, and the rest.
|
||||
easier to see a comparison between a given set of measurements, and the rest.
|
||||
|
||||
Alternatively, you can use the `Pattern.sample()` method and set `settings.sample.focus` to the key
|
||||
identifying your model in the models object.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Snippet
|
||||
---
|
||||
|
||||
A Snippet is a reuseable bit of markup for your pattern. They are added to the
|
||||
A Snippet is a reusable bit of markup for your pattern. They are added to the
|
||||
SVG `defs` section, and rendered with the SVG `use` tag.
|
||||
|
||||
## Signature
|
||||
|
|
|
@ -30,6 +30,6 @@ const options = {
|
|||
## Notes
|
||||
|
||||
This will return an object with `toAbs` and `fromAbs` properties that calculate
|
||||
the option's absolute and relative values based on a measurment. Refer to
|
||||
the option's absolute and relative values based on a measurement. Refer to
|
||||
[snapped percentage options](/reference/api/part/config/options/pct/snap) for
|
||||
more details.
|
||||
|
|
|
@ -75,6 +75,6 @@ The fourth parameter controls the precision. Lower numbers make the check less p
|
|||
|
||||
Typically, you don't need to worry about precision. But occasionally, you may
|
||||
get unexpected results because of floating point errors, rounding errors, or
|
||||
cubic bezier juggling.
|
||||
cubic Bezier juggling.
|
||||
|
||||
When that happens, you can lower the precision so you get what you expect.
|
||||
|
|
|
@ -62,4 +62,4 @@ bool utils.pointOnCurve(
|
|||
|
||||
## Notes
|
||||
|
||||
Keep in mind that calculations with Bezier curves are often aproximations.
|
||||
Keep in mind that calculations with Bezier curves are often approximations.
|
||||
|
|
|
@ -48,7 +48,7 @@ in the response body should indicate the nature of the problem.
|
|||
| Value | Type | Description |
|
||||
| ------------------- | -------- | ----------- |
|
||||
| `result` | String | Either `success` or `error` |
|
||||
| `error` | String | Will give info on the nature of the error. Only set if an error occured. |
|
||||
| `error` | String | Will give info on the nature of the error. Only set if an error occurred. |
|
||||
| `token` | String | A JSON web token (JWT) token to authenticate with |
|
||||
| `account.id` | Number | The ID of the User |
|
||||
| `account.bio` | String | The bio of the User |
|
||||
|
|
|
@ -53,7 +53,7 @@ The response body is the only time the API key's secret will be revealed.
|
|||
| Value | Type | Description |
|
||||
| ------------------- | -------- | ----------- |
|
||||
| `result` | `string` | Either `success` or `error` |
|
||||
| `error` | `string` | Will give info on the nature of the error. Only set if an error occured. |
|
||||
| `error` | `string` | Will give info on the nature of the error. Only set if an error occurred. |
|
||||
| `apikey.key` | `string` | The API key |
|
||||
| `apikey.secret` | `string` | The API secret |
|
||||
| `apikey.level` | `number` | The privilege level of the API key |
|
||||
|
|
|
@ -46,7 +46,7 @@ in the response body should indicate the nature of the problem.
|
|||
| Value | Type | Description |
|
||||
| ------------------- | -------- | ----------- |
|
||||
| `result` | `string` | `success` on success, and `error` on error |
|
||||
| `error` | `string` | Will give info on the nature of the error. Only set if an error occured. |
|
||||
| `error` | `string` | Will give info on the nature of the error. Only set if an error occurred. |
|
||||
| `apikey.key` | `string` | The API key |
|
||||
| `apikey.level` | `number` | The privilege level of the API key |
|
||||
| `apikey.expiresAt` | `string` | A string representation of the moment the API key expires |
|
||||
|
|
|
@ -38,7 +38,7 @@ in the response body should indicate the nature of the problem.
|
|||
| Value | Type | Description |
|
||||
| ------------------- | -------- | ----------- |
|
||||
| `result` | `string` | `success` on success, and `error` on error |
|
||||
| `error` | `string` | Will give info on the nature of the error. Only set if an error occured. |
|
||||
| `error` | `string` | Will give info on the nature of the error. Only set if an error occurred. |
|
||||
| `apikey.key` | `string` | The API key |
|
||||
| `apikey.level` | `number` | The privilege level of the API key |
|
||||
| `apikey.expiresAt` | `string` | A string representation of the moment the API key expires |
|
||||
|
|
|
@ -41,7 +41,7 @@ macro('banner', {
|
|||
|-------------:|------------|------------|-------------|
|
||||
| `anchor` | | `Point` | The point to start the bartack from |
|
||||
| `angle` | `0` | `number` | The angle under which to draw the bartack |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are togeter |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are together |
|
||||
| `length` | `15` | `number` | Length of the bartack |
|
||||
| `prefix` | | `string` | A prefix to apply to the name of the generated path |
|
||||
| `suffix` | | `string` | A suffix to apply to the name of the generated path |
|
||||
|
|
|
@ -46,7 +46,7 @@ macro('banner', {
|
|||
| Property | Default | Type | Description |
|
||||
|-------------:|------------|------------|-------------|
|
||||
| `angle` | `0` | `number` | The angle under which to draw the bartack |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are togeter |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are together |
|
||||
| `length` | `15` | `number` | Length of the bartack |
|
||||
| `path` | | `Path` | The path the bartack should follow |
|
||||
| `prefix` | | `string` | A prefix to apply to the name of the generated path |
|
||||
|
|
|
@ -50,7 +50,7 @@ macro('banner', {
|
|||
| Property | Default | Type | Description |
|
||||
|-------------:|------------|------------|-------------|
|
||||
| `angle` | `0` | `number` | The angle under which to draw the bartack |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are togeter |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are together |
|
||||
| `end` | `1` | `number` | At which fraction of the path length (from `0` to `1`) should the bartack end |
|
||||
| `length` | `15` | `number` | Length of the bartack |
|
||||
| `path` | | `Path` | The path the bartack should follow |
|
||||
|
|
|
@ -44,6 +44,6 @@ macro('flip', { String axis=x })
|
|||
Under the hood, this macro will:
|
||||
|
||||
- Go through all Points in your Part, and multiply their (X or Y)-coordinate by -1
|
||||
- Go through all the Paths in your Part, and for each drawing operation will multiply the (X or Y)-coordinare by -1
|
||||
- Go through all the Paths in your Part, and for each drawing operation will multiply the (X or Y)-coordinate by -1
|
||||
- Go through all the Snippets in your Part and multiply the (X or Y)-coordinate of the anchor point by -1
|
||||
- Add a 'flipped` Attribute to Points and Paths to keep track of the number of times they have been flipped (to avoid issues when multiple flips are performed)
|
||||
|
|
|
@ -5,7 +5,7 @@ title: plugin-bust
|
|||
Published as [@freesewing/plugin-bust][1], this plugin helps you adapt menswear
|
||||
patterns for people with breasts. If you are designing a womenswear pattern,
|
||||
you won't need this plugin. But if you're adapting a menswear pattern for
|
||||
breasts or merely want to accomodate both people with and without breasts,
|
||||
breasts or merely want to accommodate both people with and without breasts,
|
||||
this plugin can help you accomplish that.
|
||||
|
||||
## Installation
|
||||
|
@ -58,7 +58,7 @@ pattern. In this case, the plugin will always be loaded since the pattern
|
|||
assumes breasts will be present.
|
||||
|
||||
This way you can extend a menswear pattern and have it drafted with the high
|
||||
bust measurement as chest measurment, after which you can create room for the
|
||||
bust measurement as chest measurement, after which you can create room for the
|
||||
breasts.
|
||||
|
||||
You can see this in practice in our [Carlita][2] design, which extends the
|
||||
|
|
|
@ -5,7 +5,7 @@ title: plugin-gore
|
|||
Published as [@freesewing/plugin-gore][1], this plugin provides [the gore
|
||||
macro](/reference/macros/gore) which allows you to generate [gore
|
||||
segments](https://en.wikipedia.org/wiki/Gore_\(segment\)); 2D panels to create
|
||||
a sphehrical shape as used in hats for example.
|
||||
a spherical shape as used in hats for example.
|
||||
|
||||
This plugin handles all the mathematics to create a (part-)sphere in your
|
||||
designs.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: plugin-i18n
|
||||
---
|
||||
|
||||
Published as [@freesewing/plugin-i18n][1], this plugin faciliates
|
||||
Published as [@freesewing/plugin-i18n][1], this plugin facilitates
|
||||
translation of your designs by allowing you to provide your own
|
||||
language translations.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue