1
0
Fork 0

chore(shin): Port to v3 stage 2

This commit is contained in:
joostdecock 2022-09-11 16:40:43 +02:00
parent 42b8207079
commit 495e8d24a1
3 changed files with 48 additions and 51 deletions

View file

@ -2,24 +2,23 @@ import { pctBasedOn } from '@freesewing/core'
import { elastics } from '@freesewing/snapseries'
import { pluginBundle } from '@freesewing/plugin-bundle'
function shinBack(part) {
const {
store,
macro,
Point,
Path,
points,
paths,
complete,
paperless,
snippets,
Snippet,
sa,
options,
measurements,
utils,
} = part.shorthand()
function shinBack({
store,
macro,
Point,
Path,
points,
paths,
complete,
paperless,
snippets,
Snippet,
sa,
options,
measurements,
utils,
part,
}) {
// Store some helper variables
store.set('hips', (measurements.hips / 2) * utils.stretchToScale(options.stretch))
store.set('hipFront', store.get('hips') * options.frontFactor)

View file

@ -1,23 +1,22 @@
import { back } from './back.mjs'
function shinFront(part) {
const {
store,
macro,
Point,
Path,
points,
paths,
complete,
paperless,
snippets,
Snippet,
sa,
options,
measurements,
utils,
} = part.shorthand()
function shinFront({
store,
macro,
Point,
Path,
points,
paths,
complete,
paperless,
snippets,
Snippet,
sa,
options,
measurements,
utils,
part,
}) {
let angle = -12
let bulge = (measurements.waistToUpperLeg - measurements.waistToHips) * options.bulge
points.hipSide = new Point(0, 0)

View file

@ -1,20 +1,19 @@
import { back } from './back.mjs'
function shinWaistband(part) {
const {
store,
macro,
Point,
Path,
points,
paths,
complete,
paperless,
sa,
utils,
absoluteOptions,
} = part.shorthand()
function shinWaistband({
store,
macro,
Point,
Path,
points,
paths,
complete,
paperless,
sa,
utils,
absoluteOptions,
part,
}) {
const height = absoluteOptions.elasticWidth * 2
points.topLeft = new Point(0, 0)
points.bottomLeft = new Point(0, height)