chore(tiberius): Ported to v3
This commit is contained in:
parent
64f69daf84
commit
cdac5589c0
3 changed files with 52 additions and 85 deletions
|
@ -1,72 +0,0 @@
|
|||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
const { version } = pkg
|
||||
|
||||
export default {
|
||||
version,
|
||||
name: 'tiberius',
|
||||
design: 'Rika Tamaike',
|
||||
code: 'Rika Tamaike',
|
||||
department: 'tops',
|
||||
type: 'pattern',
|
||||
difficulty: 1,
|
||||
tags: [
|
||||
'freesewing',
|
||||
'design',
|
||||
'diy',
|
||||
'fashion',
|
||||
'made to measure',
|
||||
'parametric design',
|
||||
'pattern',
|
||||
'sewing',
|
||||
'sewing pattern',
|
||||
],
|
||||
optionGroups: {
|
||||
fit: ['headRatio', 'armholeDrop'],
|
||||
style: [
|
||||
'lengthBonus',
|
||||
'widthBonus',
|
||||
{ clavi: ['clavi', 'clavusLocation', 'clavusWidth'] },
|
||||
'length',
|
||||
'width',
|
||||
],
|
||||
advanced: ['forceWidth'],
|
||||
},
|
||||
measurements: [
|
||||
'head',
|
||||
'shoulderToElbow',
|
||||
'shoulderToShoulder',
|
||||
'biceps',
|
||||
'hpsToWaistBack',
|
||||
'waistToKnee',
|
||||
'waist',
|
||||
'chest',
|
||||
'seat',
|
||||
'hips',
|
||||
'waistToFloor',
|
||||
'waistToUpperLeg',
|
||||
],
|
||||
dependencies: {},
|
||||
inject: {},
|
||||
hide: [],
|
||||
parts: ['tunica'],
|
||||
options: {
|
||||
headRatio: { pct: 100, min: 80, max: 120 },
|
||||
armholeDrop: { pct: 110, min: 100, max: 150 },
|
||||
lengthBonus: { pct: 90, min: 60, max: 130 },
|
||||
widthBonus: { pct: 100, min: 50, max: 130 },
|
||||
clavi: { bool: false },
|
||||
clavusLocation: { pct: 65, min: 50, max: 80 },
|
||||
clavusWidth: { pct: 100, min: 50, max: 150 },
|
||||
length: {
|
||||
list: ['toKnee', 'toMidLeg', 'toFloor'],
|
||||
dflt: 'toKnee',
|
||||
},
|
||||
width: {
|
||||
list: ['toElbow', 'toShoulder', 'toMidArm'],
|
||||
dflt: 'toMidArm',
|
||||
},
|
||||
// advanced
|
||||
forceWidth: { bool: false },
|
||||
},
|
||||
}
|
|
@ -1,15 +1,12 @@
|
|||
import freesewing from '@freesewing/core'
|
||||
import plugins from '@freesewing/plugin-bundle'
|
||||
import config from '../config'
|
||||
import draftTunica from './tunica'
|
||||
import { Design } from '@freesewing/core'
|
||||
import { data } from '../data.mjs'
|
||||
import { tunica } from './tunica.mjs'
|
||||
|
||||
// Create new design
|
||||
const Tiberius = new freesewing.Design(config, plugins)
|
||||
|
||||
Tiberius.prototype.draftTunica = draftTunica
|
||||
// Setup our new design
|
||||
const Tiberius = new Design({
|
||||
data,
|
||||
parts: [tunica],
|
||||
})
|
||||
|
||||
// Named exports
|
||||
export { config, Tiberius }
|
||||
|
||||
// Default export
|
||||
export default Tiberius
|
||||
export { tunica, Tiberius }
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
export default function (part) {
|
||||
import { pluginBundle } from '@freesewing/plugin-bundle'
|
||||
|
||||
function tiberiusTunica(part) {
|
||||
const {
|
||||
Point,
|
||||
points,
|
||||
|
@ -180,3 +182,43 @@ export default function (part) {
|
|||
}
|
||||
return part
|
||||
}
|
||||
|
||||
export const tunica = {
|
||||
name: 'tiberius.tunica',
|
||||
plugins: [pluginBundle],
|
||||
measurements: [
|
||||
'head',
|
||||
'shoulderToElbow',
|
||||
'shoulderToShoulder',
|
||||
'biceps',
|
||||
'hpsToWaistBack',
|
||||
'waistToKnee',
|
||||
'waist',
|
||||
'chest',
|
||||
'seat',
|
||||
'hips',
|
||||
'waistToFloor',
|
||||
'waistToUpperLeg',
|
||||
],
|
||||
options: {
|
||||
headRatio: { pct: 100, min: 80, max: 120, menu: 'fit' },
|
||||
armholeDrop: { pct: 110, min: 100, max: 150, menu: 'fit' },
|
||||
lengthBonus: { pct: 90, min: 60, max: 130, menu: 'style' },
|
||||
widthBonus: { pct: 100, min: 50, max: 130, menu: 'style' },
|
||||
clavi: { bool: false, menu: 'style.clavi' },
|
||||
clavusLocation: { pct: 65, min: 50, max: 80, menu: 'style.clavi' },
|
||||
clavusWidth: { pct: 100, min: 50, max: 150, menu: 'style.clavi' },
|
||||
length: {
|
||||
list: ['toKnee', 'toMidLeg', 'toFloor'],
|
||||
dflt: 'toKnee',
|
||||
menu: 'style',
|
||||
},
|
||||
width: {
|
||||
list: ['toElbow', 'toShoulder', 'toMidArm'],
|
||||
dflt: 'toMidArm',
|
||||
menu: 'style',
|
||||
},
|
||||
forceWidth: { bool: false, menu: 'advanced' },
|
||||
},
|
||||
draft: tiberiusTunica,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue