1
0
Fork 0

chore(yuri): Port to v3 stage 2

This commit is contained in:
Benjamin F 2022-09-11 07:02:12 -07:00
parent 50fc054c1d
commit c37ea7e8c3
6 changed files with 83 additions and 53 deletions

View file

@ -1,8 +1,7 @@
import { back as brianBack } from '@freesewing/brian' import { back as brianBack } from '@freesewing/brian'
import { sharedDimensions } from './shared.mjs' import { sharedDimensions } from './shared.mjs'
function yuriBack(part) { function yuriBack({
const {
store, store,
macro, macro,
Path, Path,
@ -14,7 +13,8 @@ function yuriBack(part) {
sa, sa,
options, options,
measurements, measurements,
} = part.shorthand() part,
}) {
// Clear paths from Brian // Clear paths from Brian
for (const i in paths) { for (const i in paths) {

View file

@ -1,8 +1,7 @@
import { front as brianFront } from '@freesewing/brian' import { front as brianFront } from '@freesewing/brian'
import { sharedDimensions } from './shared.mjs' import { sharedDimensions } from './shared.mjs'
function yuriFront(part) { function yuriFront({
const {
store, store,
Point, Point,
Path, Path,
@ -16,7 +15,8 @@ function yuriFront(part) {
macro, macro,
snippets, snippets,
Snippet, Snippet,
} = part.shorthand() part,
}) {
// Clear paths from Brian // Clear paths from Brian
for (const i in paths) { for (const i in paths) {

View file

@ -1,8 +1,19 @@
import { back } from './back.mjs' import { back } from './back.mjs'
function yuriGusset(part) { function yuriGusset({
const { Point, Path, points, paths, Snippet, snippets, complete, sa, paperless, macro, store } = Point,
part.shorthand() Path,
points,
paths,
Snippet,
snippets,
complete,
sa,
paperless,
macro,
store,
part,
}) {
const w = store.get('gussetLength') const w = store.get('gussetLength')
points.top = new Point(0, 0) points.top = new Point(0, 0)

View file

@ -1,8 +1,18 @@
import { hoodSide } from './hoodside.mjs' import { hoodSide } from './hoodside.mjs'
function yuriHoodCenter(part) { function yuriHoodCenter({
const { store, sa, Point, points, Path, paths, complete, paperless, macro, units } = store,
part.shorthand() sa,
Point,
points,
Path,
paths,
complete,
paperless,
macro,
units,
part,
}) {
const width = store.get('hoodCenterWidth') const width = store.get('hoodCenterWidth')
const length = complete ? width * 2.5 : store.get('hoodCenterLength') const length = complete ? width * 2.5 : store.get('hoodCenterLength')

View file

@ -1,8 +1,7 @@
import { back } from './back.mjs' import { back } from './back.mjs'
import { front } from './front.mjs' import { front } from './front.mjs'
function yuriHoodSide(part) { function yuriHoodSide({
const {
store, store,
sa, sa,
Point, Point,
@ -15,7 +14,8 @@ function yuriHoodSide(part) {
complete, complete,
paperless, paperless,
macro, macro,
} = part.shorthand() part,
}) {
const neckOpening = store.get('frontNeckSeamLength') + store.get('backNeckSeamLength') const neckOpening = store.get('frontNeckSeamLength') + store.get('backNeckSeamLength')
const hoodOpening = measurements.head const hoodOpening = measurements.head

View file

@ -1,7 +1,16 @@
import { sleeve as brianSleeve } from '@freesewing/brian' import { sleeve as brianSleeve } from '@freesewing/brian'
function yuriSleeve(part) { function yuriSleeve({
let { Point, Path, points, paths, complete, sa, paperless, macro } = part.shorthand() Point,
Path,
points,
paths,
complete,
sa,
paperless,
macro,
part,
}) {
// Clear paths from Brian, but keep sleevecap // Clear paths from Brian, but keep sleevecap
for (let p of Object.keys(paths)) { for (let p of Object.keys(paths)) {