1
0
Fork 0
This commit is contained in:
Wouter van Wageningen 2022-07-30 22:28:48 +00:00
parent 061d5b605a
commit da58f5b881
2 changed files with 12 additions and 8 deletions

View file

@ -9,10 +9,10 @@ export default {
type: 'pattern', type: 'pattern',
difficulty: 5, difficulty: 5,
optionGroups: { optionGroups: {
style: ['size','type','legWidth','legLength','neckWidth','legTaper','bottomTopLegRatio','bottomLegReduction','bottomLegReductionPlushy'], options: ['size','type','legWidth','legLength','neckWidth','legTaper','bottomTopLegRatio','bottomLegReduction','bottomLegReductionPlushy'],
}, },
measurements: [],
parts: ['headSection0', 'headSection1', 'legSection0', 'legSection1', 'eye0', 'eye1', 'eye2'], parts: ['headSection0', 'headSection1', 'legSection0', 'legSection1', 'eye0', 'eye1', 'eye2'],
measurements: [],
dependencies: { dependencies: {
eye0: 'headSection0', eye0: 'headSection0',
eye1: 'headSection0', eye1: 'headSection0',

View file

@ -6,18 +6,22 @@ import draftLegSection from './legSection'
import draftEye from './eye' import draftEye from './eye'
// Create new design // Create new design
const Pattern = new freesewing.Design(config, plugins) const Octoplushy = new freesewing.Design(config, plugins)
// Attach the draft methods to the prototype // Attach the draft methods to the prototype
// Pattern.prototype.draftHeadSection = draftHeadSection // Octoplushy.prototype.draftHeadSection = draftHeadSection
for (let i = 0; i < 2; i++) { for (let i = 0; i < 2; i++) {
Pattern.prototype[`draftHeadSection${i}`] = (part) => draftHeadSection(i, part) Octoplushy.prototype[`draftHeadSection${i}`] = (part) => draftHeadSection(i, part)
} }
for (let i = 0; i < 2; i++) { for (let i = 0; i < 2; i++) {
Pattern.prototype[`draftLegSection${i}`] = (part) => draftLegSection(i, part) Octoplushy.prototype[`draftLegSection${i}`] = (part) => draftLegSection(i, part)
} }
for (let i = 0; i < 3; i++) { for (let i = 0; i < 3; i++) {
Pattern.prototype[`draftEye${i}`] = (part) => draftEye(i, part) Octoplushy.prototype[`draftEye${i}`] = (part) => draftEye(i, part)
} }
export default Pattern // Named exports
export { config, Octoplushy }
// Default export
export default Octoplushy