1
0
Fork 0

feat(components): More examples in the Examples component

This commit is contained in:
Joost De Cock 2020-12-29 18:33:20 +01:00
parent 44e4352d3e
commit 62e64f973f
13 changed files with 189 additions and 96 deletions

View file

@ -1,100 +1,105 @@
import { version } from "../package.json";
import { version } from '../package.json'
export default {
name: "examples",
name: 'examples',
version,
design: "Joost De Cock",
code: "Joost De Cock",
department: "womenswear",
type: "pattern",
design: 'Joost De Cock',
code: 'Joost De Cock',
department: 'womenswear',
type: 'pattern',
difficulty: 1,
tags: [
"example",
],
tags: ['example'],
optionGroups: {
fit: ["fixme"]
fit: ['fixme']
},
measurements: [],
dependencies: {
point_attr: "path_attr"
point_attr: 'path_attr'
},
parts: [
"point_attr",
"path_move",
"path_line",
"path_curve",
"path__curve",
"path_curve_",
"path_close",
"path_ops",
"path_attr",
"path_clone",
"path_divide",
"path_edge",
"path_end",
"path_intersects",
"path_intersectsx",
"path_intersectsy",
"path_join",
"path_length",
"path_offset",
"path_reverse",
"path_shiftalong",
"path_shiftfractionalong",
"path_split",
"path_start",
"path_translate",
"path_trim",
"plugin_buttons",
"plugin_cutonfold",
"plugin_dimension",
"plugin_grainline",
"plugin_logo",
"plugin_round",
"plugin_scalebox",
"plugin_sprinkle",
"plugin_title",
"point_angle",
"point_attr",
"point_clone",
"point_copy",
"point_dist",
"point_dx",
"point_dy",
"point_flipx",
"point_flipy",
"point_shift",
"point_shiftfractiontowards",
"point_shifttowards",
"point_shiftoutwards",
"point_sitson",
"point_sitsroughlyon",
"point_rotate",
"point_translate",
"settings_sa",
"snippet",
"snippet_attr",
"snippet_clone",
"utils_linesintersect",
"utils_beamsintersect",
"utils_beamintersectsx",
"utils_beamintersectsy",
"utils_lineintersectscurve",
"utils_curvesintersect",
"utils_pointonbeam",
"utils_pointonline",
"utils_pointoncurve",
"utils_circlesintersect",
"utils_beamintersectscircle",
"utils_lineintersectscircle",
"utils_curveintersectsy",
"utils_curveintersectsx",
"utils_splitcurve",
"docs_overview",
"docs_coords"
'point_attr',
'path_move',
'path_line',
'path_curve',
'path__curve',
'path_curve_',
'path_close',
'path_ops',
'path_attr',
'path_clone',
'path_divide',
'path_edge',
'path_end',
'path_intersects',
'path_intersectsx',
'path_intersectsy',
'path_join',
'path_length',
'path_offset',
'path_reverse',
'path_shiftalong',
'path_shiftfractionalong',
'path_split',
'path_start',
'path_translate',
'path_trim',
'plugin_buttons',
'plugin_cutonfold',
'plugin_dimension',
'plugin_grainline',
'plugin_logo',
'plugin_round',
'plugin_scalebox',
'plugin_sprinkle',
'plugin_title',
'point_angle',
'point_attr',
'point_clone',
'point_copy',
'point_dist',
'point_dx',
'point_dy',
'point_flipx',
'point_flipy',
'point_shift',
'point_shiftfractiontowards',
'point_shifttowards',
'point_shiftoutwards',
'point_sitson',
'point_sitsroughlyon',
'point_rotate',
'point_translate',
'settings_sa',
'snippet',
'snippet_attr',
'snippet_clone',
'snippets_bnotch',
'snippets_notch',
'snippets_button',
'snippets_buttonhole',
'snippets_snapsocket',
'snippets_snapstud',
'snippets_logo',
'utils_linesintersect',
'utils_beamsintersect',
'utils_beamintersectsx',
'utils_beamintersectsy',
'utils_lineintersectscurve',
'utils_curvesintersect',
'utils_pointonbeam',
'utils_pointonline',
'utils_pointoncurve',
'utils_circlesintersect',
'utils_beamintersectscircle',
'utils_lineintersectscircle',
'utils_curveintersectsy',
'utils_curveintersectsx',
'utils_splitcurve',
'docs_overview',
'docs_coords'
],
options: {
focus: "",
focus: '',
// Optiongroups are needed for now, because workbench
fixme: {
pct: 50,
@ -102,4 +107,4 @@ export default {
max: 100
}
}
};
}

View file

@ -76,6 +76,13 @@ import draftSettings_sa from './settings_sa'
import draftSnippet from './snippet'
import draftSnippet_attr from './snippet_attr'
import draftSnippet_clone from './snippet_clone'
import draftSnippets_bnotch from './snippets_bnotch'
import draftSnippets_notch from './snippets_notch'
import draftSnippets_button from './snippets_button'
import draftSnippets_buttonhole from './snippets_buttonhole'
import draftSnippets_snapsocket from './snippets_snapsocket'
import draftSnippets_snapstud from './snippets_snapstud'
import draftSnippets_logo from './snippets_logo'
// Docs illustrations
import draftDocs_overview from './docs_overview'
import draftDocs_coords from './docs_coords'
@ -140,6 +147,13 @@ let methods = {
draftSnippet,
draftSnippet_attr,
draftSnippet_clone,
draftSnippets_bnotch,
draftSnippets_notch,
draftSnippets_button,
draftSnippets_buttonhole,
draftSnippets_snapsocket,
draftSnippets_snapstud,
draftSnippets_logo,
draftUtils_linesintersect,
draftUtils_beamsintersect,
draftUtils_beamintersectsx,

View file

@ -1,12 +1,12 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, snippets, Snippet } = part.shorthand()
snippets.button = new Snippet('button', new Point(20, 10))
snippets.buttonhole = new Snippet('buttonhole', new Point(40, 10))
snippets.snapMale = new Snippet('snap-male', new Point(60, 10))
snippets.snapFemale = new Snippet('snap-female', new Point(80, 10))
snippets.snapMale = new Snippet('snap-stud', new Point(60, 10))
snippets.snapFemale = new Snippet('snap-socket', new Point(80, 10))
return box(part, 100, 20)
}

View file

@ -1,10 +1,10 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.topLeft = new Point(0, 0)
points.topRight = new Point(150, 0)
points.bottomRight = new Point(150, 50)
points.bottomLeft = new Point(0, 50)
points.bottomRight = new Point(150, 30)
points.bottomLeft = new Point(0, 30)
paths.box = new Path()
.move(points.topLeft)
@ -14,8 +14,8 @@ export default part => {
.close()
macro('cutonfold', {
from: points.topRight,
to: points.topLeft,
from: points.bottomLeft,
to: points.bottomRight,
grainline: true
})

View file

@ -1,4 +1,6 @@
export default part => {
import { box } from './shared'
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.grainlineFrom = new Point(10, 10)
@ -9,5 +11,5 @@ export default part => {
to: points.grainlineTo
})
return part
return box(part, 110, 15)
}

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 5)
snippets.demo = new Snippet('bnotch', points.anchor)
return box(part, 100, 10)
}

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 5)
snippets.demo = new Snippet('button', points.anchor)
return box(part, 100, 10)
}

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 5)
snippets.demo = new Snippet('buttonhole', points.anchor)
return box(part, 100, 10)
}

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 35)
snippets.demo = new Snippet('logo', points.anchor)
return box(part, 100, 50)
}

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 5)
snippets.demo = new Snippet('notch', points.anchor)
return box(part, 100, 10)
}

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 5)
snippets.demo = new Snippet('snap-socket', points.anchor)
return box(part, 100, 10)
}

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 5)
snippets.demo = new Snippet('snap-stud', points.anchor)
return box(part, 100, 10)
}