1
0
Fork 0

construction: Pre-weekend commit

This commit is contained in:
joostdecock 2018-07-19 14:43:27 +00:00 committed by Joost De Cock
parent 95ea42916f
commit 92aca3b339
4 changed files with 31 additions and 7 deletions

File diff suppressed because one or more lines are too long

View file

@ -23,6 +23,7 @@
shoulderToWrist: 700,
wristCircumference: 190
};
pattern.settings.paperless = true;
pattern.on('preRenderSvg', function(next) {
this.attributes.add("viewBox", "-10 -10 600 800");
next();
@ -35,7 +36,6 @@ pattern.on('preRenderSvg', function(next) {
// this.svg = this.svg.replace('green', 'yellow');
// next();
//});
console.log(pattern);
//console.log(freesewing_theme_default);
pattern.loadPlugin(freesewing_theme_designer);
pattern.loadPlugin(freesewing_theme_default);

View file

@ -3,10 +3,10 @@ import base from './base';
var back =
{
draft: function(part, context, final = true)
draft: function(part, context)
{
let { measurements, options, points, paths, snippets } = F.utils.shorthand(part, context);
let { measurements, options, points, paths, snippets, macro, final, paperless } = F.utils.shorthand(part, context);
console.log('shorthand', F.utils.shorthand(part, context));
base.draft(part, context);
paths.seam = new F.path()
@ -21,6 +21,30 @@ var back =
.curve(points.neckCp1, points.cbNeck, points.cbNeck)
.close()
;
// Final?
var decorate = function(part, context)
{
//macro('cof', {
// from: points.cbNeck
// ,to: points.cbHips
//});
}
if(final) {
decorate(part, context);
}
// Paperless?
var gauge = function(part, context) {
}
if(paperless) {
gauge(part, context);
}
}
}

View file

@ -4,9 +4,9 @@ import back from './back'
var brian = new F.pattern(patternConfig);
brian.draft = function(final = true)
brian.draft = function()
{
back.draft(brian.parts.back, brian.context, final);
back.draft(brian.parts.back, brian.context);
return brian;
}