fix: Broken links to the API reference
This commit is contained in:
parent
f0761cecf9
commit
c83d618ad3
21 changed files with 33 additions and 33 deletions
|
@ -12,19 +12,19 @@ that you should take into account while developing your pattern. They are:
|
|||
|
||||
## Complete
|
||||
|
||||
The [complete](/reference/api/settings#complete) setting is a boolean that is either true or false.
|
||||
The [complete](/reference/api/settings/complete) setting is a boolean that is either true or false.
|
||||
Its goal is to determine whether we should draft a _complete_ pattern, or merely the outline.
|
||||
|
||||
## Paperless
|
||||
|
||||
The [paperless](/reference/api/settings#paperless) setting is a boolean that is either true or false.
|
||||
The [paperless](/reference/api/settings/paperless) setting is a boolean that is either true or false.
|
||||
|
||||
A _paperless_ pattern is a pattern that has extra dimensions so users can trace the
|
||||
paper on fabric or paper without having the need to print it.
|
||||
|
||||
## Seam allowance
|
||||
|
||||
The [sa](/reference/api/settings#sa) setting is a number that controls the seam allowance.
|
||||
The [sa](/reference/api/settings/sa) setting is a number that controls the seam allowance.
|
||||
|
||||
Unless `sa` is zero, you should add the requested seam allowance to your pattern.
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ order: 60
|
|||
|
||||
A **hook** is a lifecycle event. The available hooks are:
|
||||
|
||||
- [preRender](/reference/api/hooks/prerender/): Called at the start of [`Pattern.render()`](/reference/api/pattern#render)
|
||||
- [postRender](/reference/api/hooks/postrender/): Called at the end of [`Pattern.render()`](/reference/api/pattern#render)
|
||||
- [preRender](/reference/api/hooks/prerender/): Called at the start of [`Pattern.render()`](/reference/api/pattern/render)
|
||||
- [postRender](/reference/api/hooks/postrender/): Called at the end of [`Pattern.render()`](/reference/api/pattern/render)
|
||||
- [insertText](/reference/api/hooks/inserttext/): Called when inserting text
|
||||
- [preDraft](/reference/api/hooks/predraft/): Called at the start of [`Pattern.draft()`](/reference/api/pattern#draft)
|
||||
- [postDraft](/reference/api/hooks/postdraft/): Called at the end of [`Pattern.draft()`](/reference/api/pattern#draft)
|
||||
- [preSample](/reference/api/hooks/presample/): Called at the start of [`Pattern.sample()`](/reference/api/pattern#sample)
|
||||
- [postSample](/reference/api/hooks/postsample/): Called at the end of [`Pattern.sample()`](/reference/api/pattern#sample)
|
||||
- [preDraft](/reference/api/hooks/predraft/): Called at the start of [`Pattern.draft()`](/reference/api/pattern/draft)
|
||||
- [postDraft](/reference/api/hooks/postdraft/): Called at the end of [`Pattern.draft()`](/reference/api/pattern/draft)
|
||||
- [preSample](/reference/api/hooks/presample/): Called at the start of [`Pattern.sample()`](/reference/api/pattern/sample)
|
||||
- [postSample](/reference/api/hooks/postsample/): Called at the end of [`Pattern.sample()`](/reference/api/pattern/sample)
|
||||
|
||||
You can register a method for a hook. When the hook is triggered, your method will be
|
||||
called. It will receive two parameters:
|
||||
|
|
|
@ -4,7 +4,7 @@ order: 20
|
|||
---
|
||||
|
||||
Build-time plugins are loaded at build time, by passing them to
|
||||
the [`freesewing.Design`](/reference/api/#design) constructor:
|
||||
the [`freesewing.Design`](/reference/api/design) constructor:
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core"
|
||||
|
|
|
@ -4,12 +4,12 @@ for: developers
|
|||
about: Shows you how to use our shorthand method and notation
|
||||
---
|
||||
|
||||
The [Part.shorthand()](/reference/api/part/#shorthand) method will become your best friend.
|
||||
The [Part.shorthand()](/reference/api/part/shorthand) method will become your best friend.
|
||||
|
||||
By using [object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring) you'll get access to a bunch
|
||||
of handy variables to make your code more concise and readable.
|
||||
|
||||
[Part.shorthand()](/reference/api/part/#shorthand) provides a lot of things, and you typically
|
||||
[Part.shorthand()](/reference/api/part/shorthand) provides a lot of things, and you typically
|
||||
don't need all of them, but here's everything it has to offer:
|
||||
|
||||
```js
|
||||
|
|
|
@ -6,9 +6,9 @@ The `preSample` hook runs just before your pattern is sampled.
|
|||
|
||||
It is triggered at the very start of either:
|
||||
|
||||
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
|
||||
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
|
||||
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
|
||||
- the [Pattern.sampleOption()](/reference/api/pattern/sampleoption) method
|
||||
- the [Pattern.sampleMeasurement()](/reference/api/pattern/samplemeasurement) method
|
||||
- the [Pattern.sampleModels()](/reference/api/pattern/samplemodels) method
|
||||
|
||||
Your plugin will receive the Pattern object.
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ a string that includes the user's units.
|
|||
|
||||
###### This method is available as shorthand
|
||||
|
||||
You can access this units method from the [Part.shorthand](#shorthand) method:
|
||||
You can access this units method from the [Part.shorthand](/reference/api/part/shorthand) method:
|
||||
|
||||
```js
|
||||
let { units } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,7 @@ Path path.trim()
|
|||
|
||||
Returns a new Path that is this path with overlapping parts removed.
|
||||
|
||||
This method is typically used when [Path.offset()](#offset) caused some overlap.
|
||||
This method is typically used when [Path.offset()](/reference/api/path/offset) caused some overlap.
|
||||
|
||||
<Warning>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Point point.clone()
|
|||
|
||||
###### Copy vs clone
|
||||
|
||||
The [`Point.copy()`](reference/api/point/copy/) method will only copy the point's coordinates, whereas this
|
||||
The [`Point.copy()`](/reference/api/point/copy/) method will only copy the point's coordinates, whereas this
|
||||
`Point.clone()` method will also copy its attributes.
|
||||
|
||||
</Note>
|
||||
|
|
|
@ -16,7 +16,7 @@ Point point.copy()
|
|||
###### Copy vs clone
|
||||
|
||||
this `Point.copy()` method will only copy the point's coordinates.
|
||||
To also copy the attributes, use [`Point.clone()`](reference/api/point/clone/) instead.
|
||||
To also copy the attributes, use [`Point.clone()`](/reference/api/point/clone/) instead.
|
||||
|
||||
</Note>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Point.rotate()
|
|||
A point's `rotate()` method returns a new `Point` that has been rotated by `angle` degrees
|
||||
around the point (`center`) that you pass it.
|
||||
|
||||
Just like the result of the [`Point.angle()`](reference/api/point/angle/) method, an angle of 0° points right, and the angle increases counterclockwise.
|
||||
Just like the result of the [`Point.angle()`](/reference/api/point/angle/) method, an angle of 0° points right, and the angle increases counterclockwise.
|
||||
|
||||
## Point.rotate() signature
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ point and the target.
|
|||
This method accepts values larger than 1 to go beyond the target point, or negative values to shift the
|
||||
point in the opposite direction.
|
||||
|
||||
If you need to move a point by a specific distance instead of a percentage, use [`Point.shiftTowards()`](\(reference/api/point/shifttowards/\)) or [`Point.shiftOutwards()`](reference/api/point/shiftoutwards/) instead.
|
||||
If you need to move a point by a specific distance instead of a percentage, use [`Point.shiftTowards()`](/reference/api/point/shifttowards/) or [`Point.shiftOutwards()`](/reference/api/point/shiftoutwards/) instead.
|
||||
|
||||
## Point.shiftFractionTowards() signature
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ title: Point.shiftTowards()
|
|||
|
||||
Returns a new `Point` that is shifted `distance` (mm) in the direction of the `target`.
|
||||
|
||||
If you need to move a point a percentage instead of a specific distance, use [`Point.shiftFractionTowards()`](reference/api/point/shiftfractiontowards/) instead.
|
||||
If you need to move a point a percentage instead of a specific distance, use [`Point.shiftFractionTowards()`](/reference/api/point/shiftfractiontowards/) instead.
|
||||
|
||||
## Point.shiftTowards() signature
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ const pattern = new Brian({
|
|||
|
||||
<Note>
|
||||
|
||||
This is ignored if [settings.complete](#complete) is `false`
|
||||
This is ignored if [settings.complete](/reference/api/settings/complete) is `false`
|
||||
|
||||
<Comment by="joost">
|
||||
Is it though?
|
||||
|
|
|
@ -9,7 +9,7 @@ SVG `defs` section, and rendered with the SVG `use` tag.
|
|||
The snippet constructor takes two arguments:
|
||||
|
||||
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
|
||||
- `anchor` : A [`Point`](#point) on which to anchor the snippet
|
||||
- `anchor` : A [`Point`](./point) on which to anchor the snippet
|
||||
|
||||
```js
|
||||
Snippet new Snippet(def, Point);
|
||||
|
@ -18,8 +18,8 @@ Snippet new Snippet(def, Point);
|
|||
A Snippet object comes with the following properties:
|
||||
|
||||
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
|
||||
- `anchor` : A [`Point`](../point) on which to anchor the snippet
|
||||
- `attributes` : An [`Attributes`](../attributes) instance holding the snippet's attributes
|
||||
- `anchor` : A [`Point`](./point) on which to anchor the snippet
|
||||
- `attributes` : An [`Attributes`](./attributes) instance holding the snippet's attributes
|
||||
|
||||
In addition, a Snippet object exposes the following methods:
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Point | false utils.beamsIntersect(
|
|||
)
|
||||
```
|
||||
|
||||
Finds the intersection between two endless lines (beams). Returns a [Point](#point) object
|
||||
Finds the intersection between two endless lines (beams). Returns a [Point](../point) object
|
||||
for the intersection, or `false` if the lines don't intersect.
|
||||
|
||||
<Example part="utils_beamsintersect">
|
||||
|
|
|
@ -14,7 +14,7 @@ array | Point | false utils.curveIntersectsX(
|
|||
Finds the point(s) where a curve intersects a given X-value.
|
||||
|
||||
This is a low-level variant
|
||||
of [`Path.intersectsX()`](/reference/api/path/#pathintersectsx).
|
||||
of [`Path.intersectsX()`](/reference/api/path#intersectsx).
|
||||
Instead of a path, you describe a single curve by passing the four
|
||||
points that describes it.
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ array | Point | false utils.curveIntersectsY(
|
|||
Finds the point(s) where a curve intersects a given Y-value.
|
||||
|
||||
This is a low-level variant
|
||||
of [`Path.intersectsY()`](/reference/api/path/#pathintersectsy).
|
||||
of [`Path.intersectsY()`](/reference/api/path#intersectsy).
|
||||
Instead of a path, you describe a single curve by passing the four
|
||||
points that describes it.
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Point | false utils.linesIntersect(
|
|||
)
|
||||
```
|
||||
|
||||
Finds the intersection between two line segments. Returns a [Point](#point) object
|
||||
Finds the intersection between two line segments. Returns a [Point](../point) object
|
||||
for the intersection, or `false` if the lines don't intersect.
|
||||
|
||||
<Example part="utils_linesintersect">
|
||||
|
|
|
@ -13,7 +13,7 @@ bool utils.pointOnLine(
|
|||
|
||||
Returns `true` if the point `check` lies on a line segment from point `from` to point `to`.
|
||||
|
||||
The fourth parameter controls the precision. See [pointOnBeam](#utilspointonbeam).
|
||||
The fourth parameter controls the precision. See [pointOnBeam](/reference/api/utils/pointonbeam).
|
||||
|
||||
<Example part="utils_pointonline">
|
||||
A Utils.pointOnLine() example
|
||||
|
|
|
@ -84,7 +84,7 @@ For now, we only need these so that the pattern skeleton compiles properly.
|
|||
<Note>
|
||||
|
||||
This will all become clear, but if you're curious, the API docs have all the details
|
||||
on [the Part.shorthand() method](/reference/api/part/#shorthand).
|
||||
on [the Part.shorthand() method](/reference/api/part/shorthand).
|
||||
|
||||
</Note>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ You have a number of ways to test your pattern:
|
|||
- Test measurements
|
||||
- Test models
|
||||
|
||||
The [API docs on sampling](/reference/api/pattern/#sample) have all the details on how this works, but
|
||||
The [API docs on sampling](/reference/api/pattern/sample) have all the details on how this works, but
|
||||
for now we'll just look at the end result of each of these.
|
||||
|
||||
## Testing pattern options
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue