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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue