chore(hortensia): Port to v3 stage 2
This commit is contained in:
parent
1cd21a38b8
commit
c89e5e9569
8 changed files with 91 additions and 72 deletions
|
@ -1,21 +1,20 @@
|
|||
import { sidepanel } from './sidepanel.mjs'
|
||||
|
||||
function draftHortensiaBottompanel (part) {
|
||||
let {
|
||||
store,
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
} = part.shorthand()
|
||||
|
||||
function draftHortensiaBottompanel({
|
||||
store,
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
part,
|
||||
}) {
|
||||
let w = store.get('bottomPanelLength')
|
||||
let h = store.get('depth')
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export function bottomsidepanel (points, topMiddle, w, h, sizeRatio) {
|
||||
export function bottomsidepanel(points, topMiddle, w, h, sizeRatio) {
|
||||
const c = 0.551915024494 // circle constant
|
||||
const cornerCP = 20 * sizeRatio
|
||||
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
import { sidepanel } from './sidepanel.mjs'
|
||||
|
||||
function draftHortensiaFrontpanel (part) {
|
||||
let {
|
||||
store,
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
} = part.shorthand()
|
||||
|
||||
function draftHortensiaFrontpanel({
|
||||
store,
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
part,
|
||||
}) {
|
||||
let w = store.get('frontPanelLength')
|
||||
let h = store.get('depth')
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Design } from '@freesewing/core'
|
||||
import { data } from '../data.mjs'
|
||||
// Parts
|
||||
import { sidepanel } from './sidepanel.mjs'
|
||||
import { sidepanel } from './sidepanel.mjs'
|
||||
import { frontpanel } from './frontpanel.mjs'
|
||||
import { bottompanel } from './bottompanel.mjs'
|
||||
import { zipperpanel } from './zipperpanel.mjs'
|
||||
|
@ -11,15 +11,8 @@ import { strap } from './strap.mjs'
|
|||
// Create new design
|
||||
const Hortensia = new Design({
|
||||
data,
|
||||
parts: [
|
||||
sidepanel, frontpanel, bottompanel, zipperpanel,
|
||||
sidepanelreinforcement, strap,
|
||||
],
|
||||
parts: [sidepanel, frontpanel, bottompanel, zipperpanel, sidepanelreinforcement, strap],
|
||||
})
|
||||
|
||||
// Named exports
|
||||
export {
|
||||
sidepanel, frontpanel, bottompanel, zipperpanel,
|
||||
sidepanelreinforcement, strap,
|
||||
Hortensia,
|
||||
}
|
||||
export { sidepanel, frontpanel, bottompanel, zipperpanel, sidepanelreinforcement, strap, Hortensia }
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
import { pluginBundle } from '@freesewing/plugin-bundle'
|
||||
import { bottomsidepanel } from './bottomsidepanel.mjs'
|
||||
|
||||
function draftHortensiaSidepanel (part) {
|
||||
let {
|
||||
store,
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
} = part.shorthand()
|
||||
|
||||
function draftHortensiaSidepanel({
|
||||
store,
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
part,
|
||||
}) {
|
||||
const c = 0.551915024494 // circle constant
|
||||
const phi = 1.6180339887
|
||||
|
||||
|
@ -225,10 +224,12 @@ export const sidepanel = {
|
|||
width: 230,
|
||||
height: 330,
|
||||
size: { pct: 50, min: 20, max: 200, menu: 'style' },
|
||||
zipperSize: { dflt: '#5',
|
||||
zipperSize: {
|
||||
dflt: '#5',
|
||||
list: ['#3', '#4', '#4.5', '#5', '#6', '#8', '#10', 'Invisible'],
|
||||
menu: 'style' },
|
||||
menu: 'style',
|
||||
},
|
||||
},
|
||||
plugins: [ pluginBundle ],
|
||||
plugins: [pluginBundle],
|
||||
draft: draftHortensiaSidepanel,
|
||||
}
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
import { sidepanel } from './sidepanel.mjs'
|
||||
import { bottomsidepanel } from './bottomsidepanel.mjs'
|
||||
|
||||
function draftHortensiaSidepanelreinforcement (part) {
|
||||
let { store, Point, Path, points, paths, complete, sa, paperless, macro } = part.shorthand()
|
||||
|
||||
function draftHortensiaSidepanelreinforcement({
|
||||
store,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
part,
|
||||
}) {
|
||||
const w = store.get('width')
|
||||
const h = store.get('sidePanelReinforcementHeight')
|
||||
const sizeRatio = store.get('sizeRatio')
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
import { sidepanel } from './sidepanel.mjs'
|
||||
|
||||
function draftHortensiaStrap (part) {
|
||||
let { store, options, Point, Path, points, paths, complete, sa, paperless, macro } =
|
||||
part.shorthand()
|
||||
|
||||
function draftHortensiaStrap({
|
||||
store,
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
part,
|
||||
}) {
|
||||
let w = store.get('width') * options.handleWidth
|
||||
let h = store.get('depth') * options.strapLength
|
||||
if (sa > w * 0.8) {
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
import { sidepanel } from './sidepanel.mjs'
|
||||
|
||||
function draftHortensiaZipperpanel (part) {
|
||||
let { store, Point, Path, points, paths, complete, sa, paperless, macro } = part.shorthand()
|
||||
|
||||
function draftHortensiaZipperpanel({
|
||||
store,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
part,
|
||||
}) {
|
||||
let z = store.get('zipperWidth')
|
||||
let w = (store.get('zipperPanelWidth') - z) / 2
|
||||
let h = store.get('depth')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue