2022-01-18 10:12:58 +01:00
|
|
|
---
|
|
|
|
title: gore
|
|
|
|
---
|
|
|
|
|
2022-09-30 01:45:37 +02:00
|
|
|
The `gore` macro facilitates the drafting of [gores][1] which are typically
|
|
|
|
used in hats.
|
2022-01-18 10:12:58 +01:00
|
|
|
It is provided by the [gore plugin](/reference/plugins/grainline/).
|
|
|
|
|
2022-09-30 01:45:37 +02:00
|
|
|
## Signature
|
2022-01-18 10:12:58 +01:00
|
|
|
|
|
|
|
```js
|
2022-09-30 01:45:37 +02:00
|
|
|
macro('gore', {
|
|
|
|
Point from,
|
|
|
|
Number radius,
|
|
|
|
Number gores,
|
|
|
|
Number extraLength,
|
|
|
|
Boolean hidden=true,
|
|
|
|
String class='',
|
|
|
|
)
|
2022-01-18 10:12:58 +01:00
|
|
|
```
|
|
|
|
|
2022-09-30 01:45:37 +02:00
|
|
|
## Example
|
|
|
|
|
|
|
|
<Example caption="Example of the gore macro">
|
|
|
|
```js
|
|
|
|
({ Point, macro, part }) => {
|
|
|
|
|
|
|
|
macro('gore', {
|
|
|
|
from: new Point(0,0),
|
|
|
|
radius: 100,
|
|
|
|
gores: 6,
|
|
|
|
extraLength: 20,
|
|
|
|
hidden: false,
|
|
|
|
class: 'fabric',
|
|
|
|
})
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
|
|
|
```
|
|
|
|
</Example>
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
| Property | Default | Type | Description |
|
2022-01-18 10:12:58 +01:00
|
|
|
|--------------:|---------|------------|----------------------------------------------|
|
|
|
|
| `from` | | [Point][2] | The point to start drafting the gore from |
|
|
|
|
| `radius` | | number | The radius of the sphere the gores should cover |
|
2022-02-20 14:35:50 +01:00
|
|
|
| `gores` | | number | The text to put on the _grainline_ indicator |
|
2022-01-18 10:12:58 +01:00
|
|
|
| `extraLength` | | number | The length of the straight section after a complete semisphere |
|
2022-09-30 01:45:37 +02:00
|
|
|
| `hidden` | `true` | boolean | Whether or not to hide the generated path |
|
2022-01-18 10:12:58 +01:00
|
|
|
| `class` | | boolean | Any classes to add to the generated path |
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
[1]: https://en.wikipedia.org/wiki/Gore_\(segment\)
|
2022-01-18 10:12:58 +01:00
|
|
|
|
|
|
|
[2]: /reference/api/point
|