fire: Removed unneeded box calls and fixed some formatting
This commit is contained in:
parent
268e535b37
commit
2f5e17d07d
26 changed files with 25 additions and 69 deletions
|
@ -25,18 +25,16 @@
|
|||
pattern.settings.measurements = freesewing.models.men.manSize36;
|
||||
|
||||
// Uncomment this line to enable paperless
|
||||
//pattern.settings.paperless = true;
|
||||
pattern.settings.paperless = true;
|
||||
|
||||
// Some default settings
|
||||
pattern.settings.sa = 10;
|
||||
pattern.settings.units = 'metric';
|
||||
pattern.settings.only = 'macroGrainline';
|
||||
console.log('need1', pattern.needs('pointShift'));
|
||||
console.log('need2', pattern.needs('pointShiftTowards'));
|
||||
pattern.on('preRender', function(next) {
|
||||
this.style += 'svg { background: yellow;}';
|
||||
next();
|
||||
});
|
||||
//pattern.settings.only = 'macroGrainline';
|
||||
//pattern.on('preRender', function(next) {
|
||||
// this.style += 'g { border: 1px solid red; background: red;}';
|
||||
// next();
|
||||
//});
|
||||
|
||||
//pattern.sampleOption('chestEase');
|
||||
//pattern.sampleMeasurement('chestCircumference');
|
||||
|
|
8
packages/examples/package-lock.json
generated
8
packages/examples/package-lock.json
generated
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "@freesewing/template",
|
||||
"name": "@freesewing/examples",
|
||||
"version": "0.2.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
@ -2911,9 +2911,9 @@
|
|||
}
|
||||
},
|
||||
"freesewing": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/freesewing/-/freesewing-0.7.1.tgz",
|
||||
"integrity": "sha512-mbdyiqzhvy1zSSOid9ZoRG8pfYdbT/WnRIcyWNjCxl2TtT9v5BxDmmgo0DWpZgLW+gn08dBgnuBBgc5K5tALNw==",
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/freesewing/-/freesewing-0.8.3.tgz",
|
||||
"integrity": "sha512-CxvkFFkQOYFnV8EDOdFqB6b1BpczX/P4MJ24X671Y7l44VUK5EOGk+MrFBoIGZj9UcL7PttNE9sH2Q+FHIcGPw==",
|
||||
"requires": {
|
||||
"bezier-js": "2.2.14",
|
||||
"bin-pack": "1.0.2",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathAttrs = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathClone = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathEnd = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathJoin = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathLength = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathOps = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.A = new Point(10, 10)
|
||||
.attr('data-text', 'Move to point A')
|
||||
.attr('data-text-class', 'center text-xs');
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathShiftAlong = {
|
||||
draft: function(part) {
|
||||
|
@ -19,11 +18,13 @@ var pathShiftAlong = {
|
|||
|
||||
|
||||
points.X1 = paths.example.shiftAlong(20)
|
||||
.attr('data-text', 'Shifted 2cm along this path')
|
||||
.attr('data-text-class', 'center');
|
||||
.attr('data-text', "Shifted 2cm\nalong this path")
|
||||
.attr('data-text-class', 'center')
|
||||
.attr('data-text-lineheight', 6);
|
||||
points.X2 = paths.example.shiftAlong(90)
|
||||
.attr('data-text', 'Shifted 9cm along this path')
|
||||
.attr('data-text-class', 'center');
|
||||
.attr('data-text', "Shifted 9cm\nalong this path")
|
||||
.attr('data-text-class', 'center')
|
||||
.attr('data-text-lineheight', 6);
|
||||
|
||||
snippets.Xl = new Snippet('x', points.X1);
|
||||
snippets.X2 = new Snippet('x', points.X2);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathShiftFractionAlong = {
|
||||
draft: function(part) {
|
||||
|
@ -19,11 +18,13 @@ var pathShiftFractionAlong = {
|
|||
|
||||
|
||||
points.X1 = paths.example.shiftFractionAlong(0.2)
|
||||
.attr('data-text', 'Shifted 20% along this path')
|
||||
.attr('data-text-class', 'center');
|
||||
.attr('data-text', "Shifted 20%\nalong this path")
|
||||
.attr('data-text-class', 'center')
|
||||
.attr('data-text-lineheight', 6);
|
||||
points.X2 = paths.example.shiftFractionAlong(0.9)
|
||||
.attr('data-text', 'Shifted 90% along this path')
|
||||
.attr('data-text-class', 'center');
|
||||
.attr('data-text', "Shifted 90%\nalong this path")
|
||||
.attr('data-text-class', 'center')
|
||||
.attr('data-text-lineheight', 6);
|
||||
|
||||
snippets.Xl = new Snippet('x', points.X1);
|
||||
snippets.X2 = new Snippet('x', points.X2);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathStart = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointAngle = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets} = part.shorthand();
|
||||
|
||||
box(part, 80, 80);
|
||||
|
||||
points.sun = new Point(40, 40);
|
||||
points.moon1 = new Point(70, 40).attr('data-text', '0').attr('data-text-class', 'text-xl');
|
||||
points.moon2 = new Point(40, 10).attr('data-text', 90).attr('data-text-class', 'text-xl');
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointDist = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.from = new Point(10, 10);
|
||||
points.to = new Point(90, 40);
|
||||
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointDx = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.from = new Point(10, 10);
|
||||
points.to = new Point(90, 40);
|
||||
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointDy = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.from = new Point(10, 10);
|
||||
points.to = new Point(90, 40);
|
||||
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointFlipX = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.top = new Point(50, 10);
|
||||
points.out1 = new Point(70, 30);
|
||||
points.in1 = new Point(55, 35);
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointFlipX = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.start = new Point(0, 50);
|
||||
points.churchTowerWallLeft = new Point(10, 50);
|
||||
points.churchTowerRoofLeft = new Point(10, 30);
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointRotate = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets} = part.shorthand();
|
||||
|
||||
box(part, 80, 80);
|
||||
|
||||
points.sun = new Point(40, 40);
|
||||
snippets.sun = new Snippet("notch", points.sun);
|
||||
points.moon = new Point(70, 40);
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointShift = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.A = new Point(90, 40).attr('data-text', 'Point A');
|
||||
points.A = new Point(90, 40)
|
||||
.attr('data-text', 'Point A')
|
||||
.attr('data-text-class', 'right');
|
||||
points.B = points.A.shift(155, 70)
|
||||
.attr('data-text', "Point B is point A shifted 7cm\nat a 155 degree angle")
|
||||
.attr('data-text-lineheight', 6);
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointShiftFractionTowards = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.A = new Point(90, 70).attr('data-text', 'Point A');
|
||||
points.B = new Point(10, 10).attr('data-text', 'Point B');
|
||||
points.C = points.A.shiftFractionTowards(points.B, 0.5)
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointShiftOutwards = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.A = new Point(90, 70).attr('data-text', 'Point A');
|
||||
points.B = new Point(10, 10).attr('data-text', 'Point B');
|
||||
points.C = points.A.shiftOutwards(points.B, 30)
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pointShiftTowards = {
|
||||
draft: function(part) {
|
||||
// prettier-ignore
|
||||
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
|
||||
|
||||
box(part);
|
||||
|
||||
points.A = new Point(90, 70).attr('data-text', 'Point A');
|
||||
points.B = new Point(10, 10).attr('data-text', 'Point B');
|
||||
points.C = points.A.shiftTowards(points.B, 35)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var pathOffset = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var utilsBeamCrossesX = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var utilsBeamsCross = {
|
||||
draft: function(part) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import freesewing from "freesewing";
|
||||
import { box } from "./shared";
|
||||
|
||||
var utilsLinesCross = {
|
||||
draft: function(part) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue