sparkles: Added hem points
This commit is contained in:
parent
9ad16169bd
commit
3c26deb5c3
6 changed files with 23 additions and 16 deletions
|
@ -148,7 +148,9 @@ let settings1 = { ...settings};
|
|||
}
|
||||
var pattern1 = new freesewing.patterns.brian(settings1);
|
||||
pattern1.with(freesewing.plugins.theme);
|
||||
pattern1.with(freesewing.plugins.i18n, {strings: {en: {sleeve: "Sleeve"}}});
|
||||
pattern1.with(freesewing.plugins.designer);
|
||||
pattern1.settings.options.lengthBonus =0.1;
|
||||
//pattern1.settings.only="base";
|
||||
pattern1.draft();
|
||||
console.log(pattern1);
|
||||
document.getElementById("svg1").innerHTML = pattern1.render();
|
||||
|
|
12
packages/brian/package-lock.json
generated
12
packages/brian/package-lock.json
generated
|
@ -947,9 +947,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"@freesewing/plugin-designer": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@freesewing/plugin-designer/-/plugin-designer-0.8.0.tgz",
|
||||
"integrity": "sha512-wXj3aEPdfjaEAXwVbPXMahRbqIfGKT84U85AgdgWRS6ts8p45L8eXYViB6aYCwrFtBOY+EXa79e7YD3d+AMuJw==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@freesewing/plugin-designer/-/plugin-designer-0.10.0.tgz",
|
||||
"integrity": "sha512-t5A21GZlLiknEr5LAXmhsay8bobgE6Mrjxe11PMczGV1rZKWZPM9/Cj1iD1hSmuuLuER8MsMk4KfJVHst9hOFA==",
|
||||
"dev": true
|
||||
},
|
||||
"@freesewing/plugin-dimension": {
|
||||
|
@ -2750,9 +2750,9 @@
|
|||
}
|
||||
},
|
||||
"freesewing": {
|
||||
"version": "0.23.1",
|
||||
"resolved": "https://registry.npmjs.org/freesewing/-/freesewing-0.23.1.tgz",
|
||||
"integrity": "sha512-LRqcat01NXkxs069liPPMv6CD+wgE781oosDB6sUjR6e/LuFfLRzuY/w+LGORvqrD/mVDjGY2iClfYRov03lww==",
|
||||
"version": "0.23.3",
|
||||
"resolved": "https://registry.npmjs.org/freesewing/-/freesewing-0.23.3.tgz",
|
||||
"integrity": "sha512-u3Cq2N8dAnuLFftDsPg5tmKaQQeUo0EY545/caB0cdZ0+nyzMBzJU+7oHzZSM3sSdnTlTNmKHiYHr88M1txsGw==",
|
||||
"requires": {
|
||||
"bezier-js": "^2.2.15",
|
||||
"bin-pack": "1.0.2"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"clean": "rimraf dist",
|
||||
"pretty": "npx prettier --write \"src/*.js\"",
|
||||
"lint": "eslint --fix \"src/*.js\"",
|
||||
"watch": "npx webpack --watch",
|
||||
"watch": "nodemon -w src --exec npm run browserbuild",
|
||||
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -m true -n freesewing_patterns_brian --footer 'freesewing.patterns.brian = freesewing_patterns_brian;'",
|
||||
"nodebuild": "rollup -c rollup.js -o dist/index.js -f cjs -m true",
|
||||
"modulebuild": "rollup -c rollup.js -o dist/index.mjs -f es -m true",
|
||||
|
@ -61,7 +61,7 @@
|
|||
"@freesewing/antman": "0.2.0",
|
||||
"@freesewing/models": "0.4.0",
|
||||
"@freesewing/plugin-debug": "0.3.0",
|
||||
"@freesewing/plugin-designer": "0.8.0",
|
||||
"@freesewing/plugin-designer": "0.10.0",
|
||||
"@freesewing/plugin-theme": "0.18",
|
||||
"@freesewing/plugin-validate": "0.2.0",
|
||||
"@freesewing/plugin-i18n": "0.0.1",
|
||||
|
|
|
@ -34,6 +34,10 @@ export default part => {
|
|||
points.cbNeck.y + measurements.centerBackNeckToWaist
|
||||
);
|
||||
points.cbHips = new Point(
|
||||
0,
|
||||
points.cbWaist.y + measurements.naturalWaistToHip
|
||||
);
|
||||
points.cbHem = new Point(
|
||||
0,
|
||||
points.cbWaist.y +
|
||||
measurements.naturalWaistToHip +
|
||||
|
@ -48,6 +52,7 @@ export default part => {
|
|||
);
|
||||
points.waist = new Point(points.armhole.x, points.cbWaist.y);
|
||||
points.hips = new Point(points.armhole.x, points.cbHips.y);
|
||||
points.hem = new Point(points.armhole.x, points.cbHem.y);
|
||||
|
||||
// Shoulder line
|
||||
points.neck = new Point(
|
||||
|
@ -149,13 +154,13 @@ export default part => {
|
|||
debug({ style: "warning", label: "🚫 Not fitting collar" }, "(in Brian)");
|
||||
|
||||
// Anchor point for sampling
|
||||
points.gridAnchor = points.cbHips;
|
||||
points.gridAnchor = points.cbHem;
|
||||
|
||||
// Seamline
|
||||
paths.saBase = shared.saBase("back", points, Path);
|
||||
paths.seam = new Path()
|
||||
.move(points.cbNeck)
|
||||
.line(points.cbHips)
|
||||
.line(points.cbHem)
|
||||
.join(paths.saBase)
|
||||
.attr("class", "fabric");
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export default part => {
|
|||
points.armholePitchCp2.x -= deeper;
|
||||
|
||||
// Rename cb (center back) to cf (center front)
|
||||
for (let key of ["Shoulder", "Armhole", "Waist", "Hips"]) {
|
||||
for (let key of ["Shoulder", "Armhole", "Waist", "Hips", "Hem"]) {
|
||||
points[`cf${key}`] = new Point(points[`cb${key}`].x, points[`cb${key}`].y);
|
||||
delete points[`cb${key}`];
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ export default part => {
|
|||
paths.saBase = shared.saBase("front", points, Path);
|
||||
paths.seam = new Path()
|
||||
.move(points.cfNeck)
|
||||
.line(points.cfHips)
|
||||
.line(points.cfHem)
|
||||
.join(paths.saBase)
|
||||
.attr("class", "fabric");
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
export function saBase(side, points, Path) {
|
||||
let path = new Path();
|
||||
if (side === "back") path.move(points.cbHips);
|
||||
else path.move(points.cfHips);
|
||||
if (side === "back") path.move(points.cbHem);
|
||||
else path.move(points.cfHem);
|
||||
path
|
||||
.line(points.hips)
|
||||
.line(points.hem)
|
||||
.line(points.armhole)
|
||||
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
||||
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue