sparkles: Updated to changes in Brian 0.20
This commit is contained in:
parent
85aed038fa
commit
404c561478
6 changed files with 40 additions and 41 deletions
|
@ -48,7 +48,7 @@
|
||||||
"collarEase": 0.035,
|
"collarEase": 0.035,
|
||||||
"cuffEase": 0.2,
|
"cuffEase": 0.2,
|
||||||
"frontArmholeDeeper": 0.005,
|
"frontArmholeDeeper": 0.005,
|
||||||
"lengthBonus": 0,
|
"lengthBonus": 0.1,
|
||||||
"shoulderEase": 0,
|
"shoulderEase": 0,
|
||||||
"shoulderSlopeReduction": 0,
|
"shoulderSlopeReduction": 0,
|
||||||
"sleevecapEase": 0.01,
|
"sleevecapEase": 0.01,
|
||||||
|
@ -72,8 +72,8 @@
|
||||||
"sleeveLengthBonus": 0
|
"sleeveLengthBonus": 0
|
||||||
},
|
},
|
||||||
"embed": true,
|
"embed": true,
|
||||||
"sa": 0,
|
"sa": 10,
|
||||||
"paperless": false,
|
"paperless": true,
|
||||||
"measurements": {
|
"measurements": {
|
||||||
"bicepsCircumference": 335,
|
"bicepsCircumference": 335,
|
||||||
"centerBackNeckToWaist": 520,
|
"centerBackNeckToWaist": 520,
|
||||||
|
@ -148,9 +148,8 @@ let settings1 = { ...settings};
|
||||||
}
|
}
|
||||||
var pattern1 = new freesewing.patterns.aaron(settings1);
|
var pattern1 = new freesewing.patterns.aaron(settings1);
|
||||||
pattern1.with(freesewing.plugins.theme);
|
pattern1.with(freesewing.plugins.theme);
|
||||||
pattern1.with(freesewing.plugins.i18n, {strings: {en: {sleeve: "Sleeve"}}});
|
pattern1.with(freesewing.plugins.designer);
|
||||||
pattern1.draft();
|
pattern1.draft();
|
||||||
console.log(pattern1);
|
|
||||||
document.getElementById("svg1").innerHTML = pattern1.render();
|
document.getElementById("svg1").innerHTML = pattern1.render();
|
||||||
|
|
||||||
function pointHover(evt) {
|
function pointHover(evt) {
|
||||||
|
|
18
packages/aaron/package-lock.json
generated
18
packages/aaron/package-lock.json
generated
|
@ -917,9 +917,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@freesewing/brian": {
|
"@freesewing/brian": {
|
||||||
"version": "0.19.0",
|
"version": "0.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/@freesewing/brian/-/brian-0.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@freesewing/brian/-/brian-0.20.0.tgz",
|
||||||
"integrity": "sha512-Acl5RsIgKXtp/jw5gwTLo0ZM8OSi0ScKuvZiw66l4SN5meZwp9+VZ9ytnR+lbPUkpUKYhdyW3i9khvSMBkzALg==",
|
"integrity": "sha512-vBCSoLpIOaEe4FeK8N6auEuO85LlFoJayDNP92dAW0XuB8pV5bmuehxDFkFKbA8frPH0hJgKDCD1zSTSIhWi5Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@freesewing/plugin-bundle": "0.5.1",
|
"@freesewing/plugin-bundle": "0.5.1",
|
||||||
"freesewing": "^0.23.2"
|
"freesewing": "^0.23.2"
|
||||||
|
@ -956,9 +956,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@freesewing/plugin-designer": {
|
"@freesewing/plugin-designer": {
|
||||||
"version": "0.7.2",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@freesewing/plugin-designer/-/plugin-designer-0.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/@freesewing/plugin-designer/-/plugin-designer-0.10.0.tgz",
|
||||||
"integrity": "sha512-k9OIFtL30lKMa35xnJyoyhILvH/1Ez+fpHXP32vylQo8XAYeGqPSArGHzdqlEBlTKMG/WSqZ2/EHVvGUYfsc7Q==",
|
"integrity": "sha512-t5A21GZlLiknEr5LAXmhsay8bobgE6Mrjxe11PMczGV1rZKWZPM9/Cj1iD1hSmuuLuER8MsMk4KfJVHst9hOFA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@freesewing/plugin-dimension": {
|
"@freesewing/plugin-dimension": {
|
||||||
|
@ -2759,9 +2759,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"freesewing": {
|
"freesewing": {
|
||||||
"version": "0.23.2",
|
"version": "0.23.3",
|
||||||
"resolved": "https://registry.npmjs.org/freesewing/-/freesewing-0.23.2.tgz",
|
"resolved": "https://registry.npmjs.org/freesewing/-/freesewing-0.23.3.tgz",
|
||||||
"integrity": "sha512-6EWJnr/X6lsyCkN4NJK1KAP6TTI4YF7NIaAP0eATOebAU87FENqBaHLH8x+PoY/0BcekprGIen/hhQelUOLc5g==",
|
"integrity": "sha512-u3Cq2N8dAnuLFftDsPg5tmKaQQeUo0EY545/caB0cdZ0+nyzMBzJU+7oHzZSM3sSdnTlTNmKHiYHr88M1txsGw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bezier-js": "^2.2.15",
|
"bezier-js": "^2.2.15",
|
||||||
"bin-pack": "1.0.2"
|
"bin-pack": "1.0.2"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"clean": "rimraf dist",
|
"clean": "rimraf dist",
|
||||||
"pretty": "npx prettier --write \"src/*.js\"",
|
"pretty": "npx prettier --write \"src/*.js\"",
|
||||||
"lint": "eslint --fix \"src/*.js\"",
|
"lint": "eslint --fix \"src/*.js\"",
|
||||||
"watch": "rollup -w -c rollup.js -o dist/browser.js -f iife -n freesewing_patterns_aaron --footer 'freesewing.patterns.aaron = freesewing_patterns_aaron;'",
|
"watch": "nodemon -w src --exec npm run browserbuild",
|
||||||
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -n freesewing_patterns_aaron --footer 'freesewing.patterns.aaron = freesewing_patterns_aaron;'",
|
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -n freesewing_patterns_aaron --footer 'freesewing.patterns.aaron = freesewing_patterns_aaron;'",
|
||||||
"nodebuild": "rollup -c rollup.js -o dist/index.js -f cjs",
|
"nodebuild": "rollup -c rollup.js -o dist/index.js -f cjs",
|
||||||
"modulebuild": "rollup -c rollup.js -o dist/index.mjs -f es",
|
"modulebuild": "rollup -c rollup.js -o dist/index.mjs -f es",
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing/brian": "^0.19"
|
"@freesewing/brian": "^0.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.0.0-beta.56",
|
"@babel/core": "7.0.0-beta.56",
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
"@freesewing/antman": "^0.3",
|
"@freesewing/antman": "^0.3",
|
||||||
"@freesewing/models": "^0.6",
|
"@freesewing/models": "^0.6",
|
||||||
"@freesewing/plugin-debug": "^0.1",
|
"@freesewing/plugin-debug": "^0.1",
|
||||||
"@freesewing/plugin-designer": "^0.7.2",
|
"@freesewing/plugin-designer": "^0.10",
|
||||||
"@freesewing/plugin-i18n": "^0.0.2",
|
"@freesewing/plugin-i18n": "^0.0.2",
|
||||||
"@freesewing/plugin-theme": "^0.13.2",
|
"@freesewing/plugin-theme": "^0.13.2",
|
||||||
"@freesewing/plugin-validate": "^0.2",
|
"@freesewing/plugin-validate": "^0.2",
|
||||||
|
|
|
@ -4,9 +4,6 @@ export default function(part) {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let {store, sa, Point, points, Path, paths, Snippet, snippets, options, complete, paperless, macro, utils, units} = part.shorthand();
|
let {store, sa, Point, points, Path, paths, Snippet, snippets, options, complete, paperless, macro, utils, units} = part.shorthand();
|
||||||
|
|
||||||
// Hide Brian paths
|
|
||||||
for(let key of Object.keys(paths)) paths[key].render = false;
|
|
||||||
|
|
||||||
points.strapLeftCp2 = utils.beamsIntersect(
|
points.strapLeftCp2 = utils.beamsIntersect(
|
||||||
points.strapLeft,
|
points.strapLeft,
|
||||||
points.strapCenter.rotate(90, points.strapLeft),
|
points.strapCenter.rotate(90, points.strapLeft),
|
||||||
|
@ -20,8 +17,8 @@ export default function(part) {
|
||||||
// Seamline
|
// Seamline
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.cbNeck)
|
.move(points.cbNeck)
|
||||||
.line(points.cbHips)
|
.line(points.cbHem)
|
||||||
.line(points.hips)
|
.line(points.hem)
|
||||||
.line(points.waist)
|
.line(points.waist)
|
||||||
.join(paths.side)
|
.join(paths.side)
|
||||||
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
||||||
|
@ -64,7 +61,7 @@ export default function(part) {
|
||||||
|
|
||||||
macro("cutonfold", {
|
macro("cutonfold", {
|
||||||
from: points.cfNeck,
|
from: points.cfNeck,
|
||||||
to: points.cfHips,
|
to: points.cfHem,
|
||||||
grainline: true
|
grainline: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -77,9 +74,9 @@ export default function(part) {
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
dimensions(macro, points, sa);
|
dimensions(macro, points, sa);
|
||||||
macro("vd", {
|
macro("vd", {
|
||||||
from: points.cbHips,
|
from: points.cbHem,
|
||||||
to: points.cbNeck,
|
to: points.cbNeck,
|
||||||
x: points.cbHips.x - sa - 15
|
x: points.cbHem.x - sa - 15
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default function(part) {
|
||||||
for(let i in points) points[i].x = points[i].x * (1 - options.stretchFactor);
|
for(let i in points) points[i].x = points[i].x * (1 - options.stretchFactor);
|
||||||
|
|
||||||
// Rename cb (center back) to cf (center front)
|
// Rename cb (center back) to cf (center front)
|
||||||
for (let key of ["Neck", "Shoulder", "Armhole", "Waist", "Hips"]) {
|
for (let key of ["Neck", "Shoulder", "Armhole", "Waist", "Hips", "Hem"]) {
|
||||||
points[`cf${key}`] = new Point(
|
points[`cf${key}`] = new Point(
|
||||||
points[`cb${key}`].x,
|
points[`cb${key}`].x,
|
||||||
points[`cb${key}`].y
|
points[`cb${key}`].y
|
||||||
|
@ -42,9 +42,12 @@ export default function(part) {
|
||||||
points.waist.x = points.hips.x; // Because stretch
|
points.waist.x = points.hips.x; // Because stretch
|
||||||
points.waistCp2 = points.waist.shift(90,points.armhole.dy(points.waist)/2);
|
points.waistCp2 = points.waist.shift(90,points.armhole.dy(points.waist)/2);
|
||||||
|
|
||||||
|
// Hem
|
||||||
|
points.hem.x = points.hips.x;
|
||||||
|
|
||||||
// Armhole drop
|
// Armhole drop
|
||||||
let side = new Path()
|
let side = new Path()
|
||||||
.move(points.hips)
|
.move(points.hem)
|
||||||
.line(points.waist)
|
.line(points.waist)
|
||||||
.curve(points.waistCp2, points.armhole, points.armhole);
|
.curve(points.waistCp2, points.armhole, points.armhole);
|
||||||
let split = side.intersectsY(points.armhole.y * (1 + options.armholeDrop)).pop();
|
let split = side.intersectsY(points.armhole.y * (1 + options.armholeDrop)).pop();
|
||||||
|
@ -65,8 +68,8 @@ export default function(part) {
|
||||||
// Seamline
|
// Seamline
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.cfNeck)
|
.move(points.cfNeck)
|
||||||
.line(points.cfHips)
|
.line(points.cfHem)
|
||||||
.line(points.hips)
|
.line(points.hem)
|
||||||
.line(points.waist)
|
.line(points.waist)
|
||||||
.join(paths.side)
|
.join(paths.side)
|
||||||
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
||||||
|
@ -95,7 +98,7 @@ export default function(part) {
|
||||||
if (complete) {
|
if (complete) {
|
||||||
macro("cutonfold", {
|
macro("cutonfold", {
|
||||||
from: points.cfNeck,
|
from: points.cfNeck,
|
||||||
to: points.cfHips,
|
to: points.cfHem,
|
||||||
grainline: true
|
grainline: true
|
||||||
});
|
});
|
||||||
points.title = new Point(points.waist.x/2, points.waist.y);
|
points.title = new Point(points.waist.x/2, points.waist.y);
|
||||||
|
@ -118,12 +121,12 @@ export default function(part) {
|
||||||
.line(points.aaronArmhole)
|
.line(points.aaronArmhole)
|
||||||
.attr("class", "fabric sa");
|
.attr("class", "fabric sa");
|
||||||
paths.saHem = new Path()
|
paths.saHem = new Path()
|
||||||
.move(points.cfHips)
|
.move(points.cfHem)
|
||||||
.line(points.hips)
|
.line(points.hem)
|
||||||
.offset(sa * 2.5).attr("class", "fabric sa")
|
.offset(sa * 2.5).attr("class", "fabric sa")
|
||||||
.line(paths.saSide.start());
|
.line(paths.saSide.start());
|
||||||
paths.saHem
|
paths.saHem
|
||||||
.move(points.cfHips)
|
.move(points.cfHem)
|
||||||
.line(paths.saHem.start());
|
.line(paths.saHem.start());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,9 +135,9 @@ export default function(part) {
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
dimensions(macro, points, sa);
|
dimensions(macro, points, sa);
|
||||||
macro("vd", {
|
macro("vd", {
|
||||||
from: points.cfHips,
|
from: points.cfHem,
|
||||||
to: points.cfNeck,
|
to: points.cfNeck,
|
||||||
x: points.cfHips.x - sa - 15
|
x: points.cfHem.x - sa - 15
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
export function dimensions(macro, points, sa) {
|
export function dimensions(macro, points, sa) {
|
||||||
macro("hd", {
|
macro("hd", {
|
||||||
from: points.cfHips,
|
from: points.cfHem,
|
||||||
to: points.hips,
|
to: points.hem,
|
||||||
y: points.hips.y + sa * 2.5 + 15
|
y: points.hem.y + sa * 2.5 + 15
|
||||||
});
|
});
|
||||||
macro("hd", {
|
macro("hd", {
|
||||||
from: points.cfNeck,
|
from: points.cfNeck,
|
||||||
|
@ -15,17 +15,17 @@ export function dimensions(macro, points, sa) {
|
||||||
y: points.neck.y - sa - 30
|
y: points.neck.y - sa - 30
|
||||||
});
|
});
|
||||||
macro("vd", {
|
macro("vd", {
|
||||||
from: points.hips,
|
from: points.hem,
|
||||||
to: points.aaronArmhole,
|
to: points.aaronArmhole,
|
||||||
x: points.aaronArmhole.x + sa + 15
|
x: points.aaronArmhole.x + sa + 15
|
||||||
});
|
});
|
||||||
macro("vd", {
|
macro("vd", {
|
||||||
from: points.hips,
|
from: points.hem,
|
||||||
to: points.strapRight,
|
to: points.strapRight,
|
||||||
x: points.aaronArmhole.x + sa + 30
|
x: points.aaronArmhole.x + sa + 30
|
||||||
});
|
});
|
||||||
macro("vd", {
|
macro("vd", {
|
||||||
from: points.hips,
|
from: points.hem,
|
||||||
to: points.strapLeft,
|
to: points.strapLeft,
|
||||||
x: points.aaronArmhole.x + sa + 45
|
x: points.aaronArmhole.x + sa + 45
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue