feat: Flat import of markdown repo
This is a flat (without history) import of (some of) the content from our markdown module. We've imported this without history because the repo contains our blog posts and showcases posts content prior to porting them to strapi. Since this contains many images, it would balloon the size of this repo to import the full history. Instead, please refer to the history of the (archived) markdown repo at: https://github.com/freesewing/markdown
This commit is contained in:
parent
1671a896b5
commit
b34a2ee2ed
6132 changed files with 244167 additions and 0 deletions
16
markdown/dev/reference/settings/complete/en.md
Normal file
16
markdown/dev/reference/settings/complete/en.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: complete
|
||||
---
|
||||
|
||||
Set this to `false` to draft a base outline of the pattern, rather than a fully detailed pattern.
|
||||
This has different uses, such as generating patterns to be cut out with a laser cutter.
|
||||
|
||||
The default is `true`. Setting this to `false` will force [sa](#sa) to be set to `false`.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
complete: false
|
||||
})
|
||||
```
|
23
markdown/dev/reference/settings/embed/en.md
Normal file
23
markdown/dev/reference/settings/embed/en.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: embed
|
||||
---
|
||||
|
||||
Set to `true` to make SVG output suitable for embedding in a web page.
|
||||
|
||||
This removes the `width` and `height` attributes from the SVG tag, which allows
|
||||
you to inject the SVG into an HTML document, and it will responsively scale.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
embed: true
|
||||
})
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Do **not** use this for SVGs you want to print.
|
||||
|
||||
</Warning>
|
||||
|
14
markdown/dev/reference/settings/en.md
Normal file
14
markdown/dev/reference/settings/en.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: Settings
|
||||
for: developers
|
||||
about: Documents all the settings your pattern can receive, including the pattern options, measurmeents, and design options
|
||||
---
|
||||
|
||||
Settings are what the user passes to your pattern at run-time.
|
||||
|
||||
Don't confuse them with the [pattern configuration](/reference/config/) that is determined by
|
||||
the designer at build-time.
|
||||
|
||||
Below are the supported settings:
|
||||
|
||||
<ReadMore list />
|
18
markdown/dev/reference/settings/idprefix/en.md
Normal file
18
markdown/dev/reference/settings/idprefix/en.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: idPrefix
|
||||
---
|
||||
|
||||
Prefixes all IDs in the SVG with the string you pass it. (defaults to `fs-`).
|
||||
|
||||
When you embed multiple SVGs on a single page, the IDs can and will conflict,
|
||||
especially when using `xlink:href` references (such as for text on paths and snippets).
|
||||
|
||||
This allows you to specify an ID prefix so you can sidestep ID collisions.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
idPrefix: "something-else"
|
||||
})
|
||||
```
|
72
markdown/dev/reference/settings/layout/en.md
Normal file
72
markdown/dev/reference/settings/layout/en.md
Normal file
|
@ -0,0 +1,72 @@
|
|||
---
|
||||
title: layout
|
||||
---
|
||||
|
||||
Allows you to control the way pattern parts are laid out on the pattern.
|
||||
There are 3 scenarios:
|
||||
|
||||
- layout is truthy: Do layout algorithmically
|
||||
- layout is falsy: Do not do any layout apart from stacking all parts together
|
||||
- layout is an object: Layout the parts as detailed in the layout object
|
||||
|
||||
Let's look at each in detail:
|
||||
|
||||
##### layout is truthy
|
||||
|
||||
This is the default behaviour. Parts will be laid without overlap in
|
||||
a space that's a small as possible.
|
||||
|
||||
Don't expect miracles here.
|
||||
It's one of those things humans are far better at than
|
||||
computers.
|
||||
|
||||
##### layout is falsy
|
||||
|
||||
This will cause all parts to be laid out on top of each other.
|
||||
|
||||
It is almost certainly not what you want, but having all parts piled
|
||||
on top of each other in the top left corner can be a good starting
|
||||
point for a custom layout.
|
||||
|
||||
##### layout is a layout object
|
||||
|
||||
This allows you to control the layout by passing a layout object.
|
||||
This object should be structures as such:
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
layout: {
|
||||
parts: {
|
||||
front: {
|
||||
move: {
|
||||
x: 14,
|
||||
y: -202
|
||||
}
|
||||
},
|
||||
back: {
|
||||
rotate: 90,
|
||||
flipX: true,
|
||||
flipY, true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
For each part in the `parts` attribute of our layout object, there are 4 possible attributes:
|
||||
|
||||
- move: Expects an object with an `x` and `y` property, and will move the part by `x` along the X-axis and by `y` along the Y-axis
|
||||
- rotate: Expects a number, and will rotate the part by number degrees around its center point
|
||||
- flipX: Will flip/mirror the part horizontally
|
||||
- flipY: Will flip/mirror the part vertically
|
||||
|
||||
<Note>
|
||||
|
||||
It is a long-standing ambition of ours to build a layout component that allows
|
||||
users to manually do the layout of their pattern.
|
||||
|
||||
Core already supports it, but building a React component for it is non-trivial.
|
||||
|
||||
</Note>
|
16
markdown/dev/reference/settings/locale/en.md
Normal file
16
markdown/dev/reference/settings/locale/en.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: locale
|
||||
---
|
||||
|
||||
A 2-letter language code that indicates what language the user wants.
|
||||
|
||||
This will be used to set the `xml:lang` attribute in the `svg` tag when rendering to SVG,
|
||||
and by [the i18n plugin](/reference/plugins/i18n/) to translate the pattern.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
locale: "es"
|
||||
})
|
||||
```
|
31
markdown/dev/reference/settings/margin/en.md
Normal file
31
markdown/dev/reference/settings/margin/en.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: margin
|
||||
---
|
||||
|
||||
Allows you to specify a part margin (in mm). The default is 2mm.
|
||||
Each part will have this margin applied. This means that:
|
||||
|
||||
- At the edge of the SVG, the margin will be `margin * 1` (2mm by default)
|
||||
- Between parts, the margin will be `margin * 2` (4mm by default)
|
||||
|
||||
Note that setting the margin to zero (or below) will cause parts to overlap.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
margin: 5
|
||||
})
|
||||
```
|
||||
|
||||
<Note>
|
||||
|
||||
###### For paperless, the minimal margin is 10mm
|
||||
|
||||
In paperless mode, the margin will not go below 10mm.
|
||||
|
||||
That is because text is not taken into account when calculating the bounding box of the part.
|
||||
Since dimensions are typically the outermost elements in a paperless part,
|
||||
a too narrow margin would cause the dimension text to get cut off.
|
||||
|
||||
</Note>
|
17
markdown/dev/reference/settings/measurements/en.md
Normal file
17
markdown/dev/reference/settings/measurements/en.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: measurements
|
||||
---
|
||||
|
||||
The measurements to draft for. The pattern configuration lists all required measurements.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
measurements: {
|
||||
chestCircumference: 1080
|
||||
shoulderSlope: 55
|
||||
}
|
||||
})
|
||||
```
|
||||
|
15
markdown/dev/reference/settings/only/en.md
Normal file
15
markdown/dev/reference/settings/only/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: only
|
||||
---
|
||||
|
||||
Allows you to specify one or more parts to draft/render, rather than the entire pattern.
|
||||
|
||||
Accepts a part name as string, or an array of part names.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
only: ["front", "sleeve"]
|
||||
})
|
||||
```
|
18
markdown/dev/reference/settings/options/en.md
Normal file
18
markdown/dev/reference/settings/options/en.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: options
|
||||
---
|
||||
|
||||
The pattern options as specified in the pattern configuration.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
options: {
|
||||
chestEase: 120
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
<Note>Unlike measurements, options come with defaults.</Note>
|
||||
|
14
markdown/dev/reference/settings/paperless/en.md
Normal file
14
markdown/dev/reference/settings/paperless/en.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: paperless
|
||||
---
|
||||
|
||||
Set this to `true` to draft a paperless pattern. The default is `false`.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
paperless: true
|
||||
})
|
||||
```
|
||||
|
22
markdown/dev/reference/settings/sa/en.md
Normal file
22
markdown/dev/reference/settings/sa/en.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: sa
|
||||
---
|
||||
|
||||
The seam allowance in mm.
|
||||
|
||||
Not setting this, setting it to `false`, or to zero, will draft a pattern without seam allowance.
|
||||
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
sa: 10
|
||||
})
|
||||
```
|
||||
|
||||
<Note>
|
||||
|
||||
This is ignored if [settings.complete](#complete) is `false`
|
||||
|
||||
</Note>
|
15
markdown/dev/reference/settings/units/en.md
Normal file
15
markdown/dev/reference/settings/units/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: units
|
||||
---
|
||||
|
||||
Either `metric` (the default) or `imperial`.
|
||||
|
||||
Note that this is only used to format the output. Freesewing expects mm.
|
||||
|
||||
```js
|
||||
import brian from "@freesewing/brian";
|
||||
|
||||
let pattern = new brian({
|
||||
units: "imperial"
|
||||
})
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue