From 9f487c22204180c1174961e1312b0fdff6a60e4b Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sun, 11 Sep 2022 13:58:08 +0200 Subject: [PATCH] chore(titan): Port to v3 stage 2 --- designs/titan/src/back.mjs | 38 ++++++++++++++++++------------------- designs/titan/src/front.mjs | 38 ++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/designs/titan/src/back.mjs b/designs/titan/src/back.mjs index 571e0fc5cc9..b90ea042669 100644 --- a/designs/titan/src/back.mjs +++ b/designs/titan/src/back.mjs @@ -2,7 +2,24 @@ import { pctBasedOn } from '@freesewing/core' import { elastics } from '@freesewing/snapseries' import { pluginBundle } from '@freesewing/plugin-bundle' -function titanBack(part) { +function titanBack({ + points, + Point, + paths, + Path, + measurements, + options, + complete, + paperless, + store, + macro, + utils, + snippets, + Snippet, + sa, + absoluteOptions, + part, +}) { /* * Helper method to draw the inseam path */ @@ -85,25 +102,6 @@ function titanBack(part) { .rotate(options.crossSeamCurveAngle, points.fork) } - // Shorthand - let { - points, - Point, - paths, - Path, - measurements, - options, - complete, - paperless, - store, - macro, - utils, - snippets, - Snippet, - sa, - absoluteOptions, - } = part.shorthand() - // Let's get to work points.waistX = new Point(-1 * measurements.waistBackArc * (1 + options.waistEase), 0) points.upperLegY = new Point(0, measurements.waistToUpperLeg) diff --git a/designs/titan/src/front.mjs b/designs/titan/src/front.mjs index ec597fd2865..752f5b8e048 100644 --- a/designs/titan/src/front.mjs +++ b/designs/titan/src/front.mjs @@ -1,6 +1,23 @@ import { back } from './back.mjs' -function titanFront(part) { +function titanFront({ + points, + Point, + paths, + Path, + measurements, + options, + complete, + paperless, + store, + macro, + utils, + snippets, + Snippet, + sa, + absoluteOptions, + part, +}) { /* * Helper method to draw the inseam path */ @@ -156,25 +173,6 @@ function titanFront(part) { const adaptOutseam = () => adaptSeam('out') const adaptInseam = () => adaptSeam('in') - // Shorthand - let { - points, - Point, - paths, - Path, - measurements, - options, - complete, - paperless, - store, - macro, - utils, - snippets, - Snippet, - sa, - absoluteOptions, - } = part.shorthand() - // Let's get to work points.waistX = new Point(measurements.waistFrontArc * (1 + options.waistEase), 0) points.upperLegY = new Point(0, measurements.waistToUpperLeg)