chore(florent): Port to v3 stage 2
This commit is contained in:
parent
9206ee4e4c
commit
a217074fd7
6 changed files with 60 additions and 31 deletions
|
@ -1,9 +1,19 @@
|
||||||
import { pluginBundle } from '@freesewing/plugin-bundle'
|
import { pluginBundle } from '@freesewing/plugin-bundle'
|
||||||
|
|
||||||
function draftFlorentBrimBottom (part) {
|
function draftFlorentBrimBottom({
|
||||||
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path, measurements } =
|
paperless,
|
||||||
part.shorthand()
|
sa,
|
||||||
|
store,
|
||||||
|
complete,
|
||||||
|
points,
|
||||||
|
options,
|
||||||
|
macro,
|
||||||
|
Point,
|
||||||
|
paths,
|
||||||
|
Path,
|
||||||
|
measurements,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
let scale = 1
|
let scale = 1
|
||||||
let base = scale * measurements.head * (1 + options.headEase)
|
let base = scale * measurements.head * (1 + options.headEase)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
import { brimBottom } from './brimbottom.mjs'
|
import { brimBottom } from './brimbottom.mjs'
|
||||||
|
|
||||||
function draftFlorentBrimInterfacing (part) {
|
function draftFlorentBrimInterfacing({
|
||||||
let { paperless, sa, complete, points, macro, paths, Path } = part.shorthand()
|
paperless,
|
||||||
|
sa,
|
||||||
|
complete,
|
||||||
|
points,
|
||||||
|
macro,
|
||||||
|
paths,
|
||||||
|
Path,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
paths.hint = paths.seam.clone().attr('class', 'dashed stroke-sm')
|
paths.hint = paths.seam.clone().attr('class', 'dashed stroke-sm')
|
||||||
|
|
||||||
paths.outset = new Path()
|
paths.outset = new Path()
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { brimBottom } from './brimbottom.mjs'
|
import { brimBottom } from './brimbottom.mjs'
|
||||||
|
|
||||||
function draftFlorentBrimTop (part) {
|
function draftFlorentBrimTop({ paperless, sa, complete, points, macro, paths, Path, part }) {
|
||||||
let { paperless, sa, complete, points, macro, paths, Path } = part.shorthand()
|
|
||||||
|
|
||||||
paths.hint = new Path()
|
paths.hint = new Path()
|
||||||
.move(points.tipLeft)
|
.move(points.tipLeft)
|
||||||
.curve(points.tipLeftCp2, points.outerMidCp1, points.outerMid)
|
.curve(points.tipLeftCp2, points.outerMidCp1, points.outerMid)
|
||||||
|
|
|
@ -10,13 +10,8 @@ import { brimInterfacing } from './briminterfacing.mjs'
|
||||||
// Create new design
|
// Create new design
|
||||||
const Florent = new Design({
|
const Florent = new Design({
|
||||||
data,
|
data,
|
||||||
parts: [
|
parts: [top, side, brimBottom, brimTop, brimInterfacing],
|
||||||
top, side, brimBottom, brimTop, brimInterfacing,
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Named exports
|
// Named exports
|
||||||
export {
|
export { top, side, brimBottom, brimTop, brimInterfacing, Florent }
|
||||||
top, side, brimBottom, brimTop, brimInterfacing,
|
|
||||||
Florent,
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
import { top } from './top.mjs'
|
import { top } from './top.mjs'
|
||||||
|
|
||||||
function draftFlorentSide (part) {
|
function draftFlorentSide({
|
||||||
let { store, paperless, sa, complete, points, macro, paths, Path, snippets, Snippet } =
|
store,
|
||||||
part.shorthand()
|
paperless,
|
||||||
|
sa,
|
||||||
|
complete,
|
||||||
|
points,
|
||||||
|
macro,
|
||||||
|
paths,
|
||||||
|
Path,
|
||||||
|
snippets,
|
||||||
|
Snippet,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
// Clean up
|
// Clean up
|
||||||
for (let i of Object.keys(paths)) {
|
for (let i of Object.keys(paths)) {
|
||||||
if (i !== 'side') delete paths[i]
|
if (i !== 'side') delete paths[i]
|
||||||
|
|
|
@ -1,9 +1,19 @@
|
||||||
import { pluginBundle } from '@freesewing/plugin-bundle'
|
import { pluginBundle } from '@freesewing/plugin-bundle'
|
||||||
|
|
||||||
function draftFlorentTop (part) {
|
function draftFlorentTop({
|
||||||
let { paperless, sa, points, macro, Point, Path, paths, snippets, Snippet, complete, store } =
|
paperless,
|
||||||
part.shorthand()
|
sa,
|
||||||
|
points,
|
||||||
|
macro,
|
||||||
|
Point,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
snippets,
|
||||||
|
Snippet,
|
||||||
|
complete,
|
||||||
|
store,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
const fitCap = (part, scale) => {
|
const fitCap = (part, scale) => {
|
||||||
let { points, options, Point, Path, measurements } = part.shorthand()
|
let { points, options, Point, Path, measurements } = part.shorthand()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue