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,8 +2,7 @@ import { pctBasedOn } from '@freesewing/core'
import { elastics } from '@freesewing/snapseries'
import { pluginBundle } from '@freesewing/plugin-bundle'
function shinBack(part) {
const {
function shinBack({
store,
macro,
Point,
@ -18,8 +17,8 @@ function shinBack(part) {
options,
measurements,
utils,
} = part.shorthand()
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,7 +1,6 @@
import { back } from './back.mjs'
function shinFront(part) {
const {
function shinFront({
store,
macro,
Point,
@ -16,8 +15,8 @@ function shinFront(part) {
options,
measurements,
utils,
} = part.shorthand()
part,
}) {
let angle = -12
let bulge = (measurements.waistToUpperLeg - measurements.waistToHips) * options.bulge
points.hipSide = new Point(0, 0)

View file

@ -1,7 +1,6 @@
import { back } from './back.mjs'
function shinWaistband(part) {
const {
function shinWaistband({
store,
macro,
Point,
@ -13,8 +12,8 @@ function shinWaistband(part) {
sa,
utils,
absoluteOptions,
} = part.shorthand()
part,
}) {
const height = absoluteOptions.elasticWidth * 2
points.topLeft = new Point(0, 0)
points.bottomLeft = new Point(0, height)