construction: Started update pattern to freesewing v0.29
This commit is contained in:
parent
0c24881616
commit
23a7f20818
7 changed files with 284 additions and 1979 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
import { version } from "../package.json";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "examples"
|
name: "examples",
|
||||||
|
version,
|
||||||
|
parts: ["pathAttr"]
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
<!-- <script type="text/javascript" src="freesewing.js"></script> -->
|
|
||||||
<script type="text/javascript" src="node_modules/freesewing/dist/browser.js"></script>
|
<script type="text/javascript" src="node_modules/freesewing/dist/browser.js"></script>
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/plugin-bundle/dist/browser.js"></script>
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-bundle/dist/browser.js"></script>
|
||||||
<script type="text/javascript" src="dist/browser.js"></script>
|
<script type="text/javascript" src="dist/browser.js"></script>
|
||||||
|
@ -17,30 +16,14 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="svg"></div>
|
<div id="svg"></div>
|
||||||
<script>
|
<script>
|
||||||
var pattern = freesewing.patterns.examples
|
var pattern = new freesewing.patterns.examples();
|
||||||
.with(freesewing.plugins.debug)
|
pattern.use(freesewing.plugins.debug)
|
||||||
.with(freesewing.plugins.theme)
|
.use(freesewing.plugins.theme)
|
||||||
//.with(freesewing.plugins.designer)
|
.use(freesewing.plugins.designer)
|
||||||
//.with(freesewing.plugins.validate)
|
.use(freesewing.plugins.validate)
|
||||||
;
|
;
|
||||||
pattern.settings.measurements = freesewing.models.men.manSize36;
|
|
||||||
|
|
||||||
// Uncomment this line to enable paperless
|
pattern.settings.only = ['pathAttr'];
|
||||||
//pattern.settings.paperless = true;
|
|
||||||
// Some default settings
|
|
||||||
pattern.settings.sa = 10;
|
|
||||||
pattern.settings.units = 'metric';
|
|
||||||
// console.log(pattern);
|
|
||||||
pattern.settings.only = ['pathTranslate'];
|
|
||||||
//pattern.on('preRender', function(next) {
|
|
||||||
// this.style += 'g { border: 1px solid red; background: red;}';
|
|
||||||
// next();
|
|
||||||
//});
|
|
||||||
|
|
||||||
//pattern.sampleOption('chestEase');
|
|
||||||
//pattern.sampleMeasurement('chestCircumference');
|
|
||||||
//pattern.sampleModels(freesewing.models.men);
|
|
||||||
//pattern.sampleModels(freesewing.models.antman);
|
|
||||||
pattern.draft();
|
pattern.draft();
|
||||||
document.getElementById("svg").innerHTML = pattern.render();
|
document.getElementById("svg").innerHTML = pattern.render();
|
||||||
|
|
||||||
|
|
1928
packages/examples/package-lock.json
generated
1928
packages/examples/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -31,6 +31,7 @@
|
||||||
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -n freesewing_patterns_examples --footer 'freesewing.patterns.examples = freesewing_patterns_examples;'",
|
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -n freesewing_patterns_examples --footer 'freesewing.patterns.examples = freesewing_patterns_examples;'",
|
||||||
"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",
|
||||||
|
"rebuild": "npm run nodebuild && npm run modulebuild",
|
||||||
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
|
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
@ -45,8 +46,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing/plugin-bundle": "0.2.0",
|
"@freesewing/plugin-bundle": "0.7.1",
|
||||||
"freesewing": "0.16.2"
|
"freesewing": "0.29.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.0.0-beta.56",
|
"@babel/core": "7.0.0-beta.56",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import freesewing from "freesewing";
|
import freesewing from "freesewing";
|
||||||
import pluginBundle from "@freesewing/plugin-bundle";
|
import plugins from "@freesewing/plugin-bundle";
|
||||||
|
|
||||||
import config from "../config/config";
|
import config from "../config/config";
|
||||||
import { version } from "../package.json";
|
import { version } from "../package.json";
|
||||||
|
@ -21,8 +21,9 @@ import pointTranslate from "./point.translate";
|
||||||
import pointSitsOn from "./point.sitson";
|
import pointSitsOn from "./point.sitson";
|
||||||
import pointClone from "./point.clone";
|
import pointClone from "./point.clone";
|
||||||
|
|
||||||
|
import draftPathAttr from "./pathAttr";
|
||||||
|
|
||||||
import pathOps from "./path.ops";
|
import pathOps from "./path.ops";
|
||||||
import pathAttr from "./path.attr";
|
|
||||||
import pathOffset from "./path.offset";
|
import pathOffset from "./path.offset";
|
||||||
import pathLength from "./path.length";
|
import pathLength from "./path.length";
|
||||||
import pathStart from "./path.start";
|
import pathStart from "./path.start";
|
||||||
|
@ -63,231 +64,30 @@ import pluginScalebox from "./plugin.scalebox";
|
||||||
|
|
||||||
import settingsSa from "./settings.sa";
|
import settingsSa from "./settings.sa";
|
||||||
|
|
||||||
var pattern = new freesewing.Pattern({ version: version, ...config }).with(
|
// Constructor
|
||||||
pluginBundle
|
const Examples = function(settings) {
|
||||||
);
|
freesewing.Pattern.call(this, config);
|
||||||
|
this.use(plugins).apply(settings);
|
||||||
|
|
||||||
pattern.draft = function() {
|
return this;
|
||||||
if (this.needs("pointAttr"))
|
|
||||||
this.parts.pointAttr = this.draftPointAttr(new pattern.Part());
|
|
||||||
if (this.needs("pointDist"))
|
|
||||||
this.parts.pointDist = this.draftPointDist(new pattern.Part());
|
|
||||||
if (this.needs("pointDx"))
|
|
||||||
this.parts.pointDx = this.draftPointDx(new pattern.Part());
|
|
||||||
if (this.needs("pointDy"))
|
|
||||||
this.parts.pointDy = this.draftPointDy(new pattern.Part());
|
|
||||||
if (this.needs("pointAngle"))
|
|
||||||
this.parts.pointAngle = this.draftPointAngle(new pattern.Part());
|
|
||||||
if (this.needs("pointRotate"))
|
|
||||||
this.parts.pointRotate = this.draftPointRotate(new pattern.Part());
|
|
||||||
if (this.needs("pointCopy"))
|
|
||||||
this.parts.pointCopy = this.draftPointCopy(new pattern.Part());
|
|
||||||
if (this.needs("pointFlipX"))
|
|
||||||
this.parts.pointFlipX = this.draftPointFlipX(new pattern.Part());
|
|
||||||
if (this.needs("pointFlipY"))
|
|
||||||
this.parts.pointFlipY = this.draftPointFlipY(new pattern.Part());
|
|
||||||
if (this.needs("pointShift"))
|
|
||||||
this.parts.pointShift = this.draftPointShift(new pattern.Part());
|
|
||||||
if (this.needs("pointShiftTowards"))
|
|
||||||
this.parts.pointShiftTowards = this.draftPointShiftTowards(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("pointShiftFractionTowards"))
|
|
||||||
this.parts.pointShiftFractionTowards = this.draftPointShiftFractionTowards(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("pointShiftOutwards"))
|
|
||||||
this.parts.pointShiftOutwards = this.draftPointShiftOutwards(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("pointTranslate"))
|
|
||||||
this.parts.pointTranslate = this.draftPointTranslate(new pattern.Part());
|
|
||||||
if (this.needs("pointSitsOn"))
|
|
||||||
this.parts.pointSitsOn = this.draftPointSitsOn(new pattern.Part());
|
|
||||||
if (this.needs("pointClone"))
|
|
||||||
this.parts.pointClone = this.draftPointClone(new pattern.Part());
|
|
||||||
|
|
||||||
if (this.needs("pathOps"))
|
|
||||||
this.parts.pathOps = this.draftPathOps(new pattern.Part());
|
|
||||||
if (this.needs("pathAttr"))
|
|
||||||
this.parts.pathAttr = this.draftPathAttr(new pattern.Part());
|
|
||||||
if (this.needs("pathOffset"))
|
|
||||||
this.parts.pathOffset = this.draftPathOffset(new pattern.Part());
|
|
||||||
if (this.needs("pathLength"))
|
|
||||||
this.parts.pathLength = this.draftPathLength(new pattern.Part());
|
|
||||||
if (this.needs("pathStart"))
|
|
||||||
this.parts.pathStart = this.draftPathStart(new pattern.Part());
|
|
||||||
if (this.needs("pathEnd"))
|
|
||||||
this.parts.pathEnd = this.draftPathEnd(new pattern.Part());
|
|
||||||
if (this.needs("pathClone"))
|
|
||||||
this.parts.pathClone = this.draftPathClone(new pattern.Part());
|
|
||||||
if (this.needs("pathJoin"))
|
|
||||||
this.parts.pathJoin = this.draftPathJoin(new pattern.Part());
|
|
||||||
if (this.needs("pathReverse"))
|
|
||||||
this.parts.pathReverse = this.draftPathReverse(new pattern.Part());
|
|
||||||
if (this.needs("pathShiftAlong"))
|
|
||||||
this.parts.pathShiftAlong = this.draftPathShiftAlong(new pattern.Part());
|
|
||||||
if (this.needs("pathShiftFractionAlong"))
|
|
||||||
this.parts.pathShiftFractionAlong = this.draftPathShiftFractionAlong(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("pathEdge"))
|
|
||||||
this.parts.pathEdge = this.draftPathEdge(new pattern.Part());
|
|
||||||
if (this.needs("pathTrim"))
|
|
||||||
this.parts.pathTrim = this.draftPathTrim(new pattern.Part());
|
|
||||||
if (this.needs("pathIntersectsX"))
|
|
||||||
this.parts.pathIntersectsX = this.draftPathIntersectsX(new pattern.Part());
|
|
||||||
if (this.needs("pathIntersectsY"))
|
|
||||||
this.parts.pathIntersectsY = this.draftPathIntersectsY(new pattern.Part());
|
|
||||||
if (this.needs("pathIntersects"))
|
|
||||||
this.parts.pathIntersects = this.draftPathIntersects(new pattern.Part());
|
|
||||||
if (this.needs("pathDivide"))
|
|
||||||
this.parts.pathDivide = this.draftPathDivide(new pattern.Part());
|
|
||||||
if (this.needs("pathSplit"))
|
|
||||||
this.parts.pathSplit = this.draftPathSplit(new pattern.Part());
|
|
||||||
if (this.needs("pathTranslate"))
|
|
||||||
this.parts.pathTranslate = this.draftPathTranslate(new pattern.Part());
|
|
||||||
|
|
||||||
if (this.needs("utilsLinesIntersect"))
|
|
||||||
this.parts.utilsLinesIntersect = this.draftUtilsLinesIntersect(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsBeamsIntersect"))
|
|
||||||
this.parts.utilsBeamsIntersect = this.draftUtilsBeamsIntersect(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsBeamIntersectsX"))
|
|
||||||
this.parts.utilsBeamIntersectsX = this.draftUtilsBeamIntersectsX(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsBeamIntersectsY"))
|
|
||||||
this.parts.utilsBeamIntersectsY = this.draftUtilsBeamIntersectsY(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsLineIntersectsCurve"))
|
|
||||||
this.parts.utilsLineIntersectsCurve = this.draftUtilsLineIntersectsCurve(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsCurvesIntersect"))
|
|
||||||
this.parts.utilsCurvesIntersect = this.draftUtilsCurvesIntersect(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsPointOnLine"))
|
|
||||||
this.parts.utilsPointOnLine = this.draftUtilsPointOnLine(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsPointOnBeam"))
|
|
||||||
this.parts.utilsPointOnBeam = this.draftUtilsPointOnBeam(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsPointOnCurve"))
|
|
||||||
this.parts.utilsPointOnCurve = this.draftUtilsPointOnCurve(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsCirclesIntersect"))
|
|
||||||
this.parts.utilsCirclesIntersect = this.draftUtilsCirclesIntersect(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsBeamIntersectsCircle"))
|
|
||||||
this.parts.utilsBeamIntersectsCircle = this.draftUtilsBeamIntersectsCircle(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
if (this.needs("utilsLineIntersectsCircle"))
|
|
||||||
this.parts.utilsLineIntersectsCircle = this.draftUtilsLineIntersectsCircle(
|
|
||||||
new pattern.Part()
|
|
||||||
);
|
|
||||||
|
|
||||||
if (this.needs("pluginGrainline"))
|
|
||||||
this.parts.pluginGrainline = this.draftPluginGrainline(new pattern.Part());
|
|
||||||
if (this.needs("pluginCutonfold"))
|
|
||||||
this.parts.pluginCutonfold = this.draftPluginCutonfold(new pattern.Part());
|
|
||||||
if (this.needs("pluginDimension"))
|
|
||||||
this.parts.pluginDimension = this.draftPluginDimension(new pattern.Part());
|
|
||||||
if (this.needs("pluginLogo"))
|
|
||||||
this.parts.pluginLogo = this.draftPluginLogo(new pattern.Part());
|
|
||||||
if (this.needs("pluginTitle"))
|
|
||||||
this.parts.pluginTitle = this.draftPluginTitle(new pattern.Part());
|
|
||||||
if (this.needs("pluginScalebox"))
|
|
||||||
this.parts.pluginScalebox = this.draftPluginScalebox(new pattern.Part());
|
|
||||||
|
|
||||||
if (this.needs("settingsSa"))
|
|
||||||
this.parts.settingsSa = this.draftSettingsSa(new pattern.Part());
|
|
||||||
return pattern;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pattern.draftPointAttr = part => pointAttr.draft(part);
|
// Set up inheritance
|
||||||
pattern.draftPointDist = part => pointDist.draft(part);
|
Examples.prototype = Object.create(freesewing.Pattern.prototype);
|
||||||
pattern.draftPointDx = part => pointDx.draft(part);
|
Examples.prototype.constructor = Examples;
|
||||||
pattern.draftPointDy = part => pointDy.draft(part);
|
|
||||||
pattern.draftPointAngle = part => pointAngle.draft(part);
|
|
||||||
pattern.draftPointRotate = part => pointRotate.draft(part);
|
|
||||||
pattern.draftPointCopy = part => pointCopy.draft(part);
|
|
||||||
pattern.draftPointFlipX = part => pointFlipX.draft(part);
|
|
||||||
pattern.draftPointFlipY = part => pointFlipY.draft(part);
|
|
||||||
pattern.draftPointShift = part => pointShift.draft(part);
|
|
||||||
pattern.draftPointShiftTowards = part => pointShiftTowards.draft(part);
|
|
||||||
pattern.draftPointShiftFractionTowards = part =>
|
|
||||||
pointShiftFractionTowards.draft(part);
|
|
||||||
pattern.draftPointShiftOutwards = part => pointShiftOutwards.draft(part);
|
|
||||||
pattern.draftPointTranslate = part => pointTranslate.draft(part);
|
|
||||||
pattern.draftPointSitsOn = part => pointSitsOn.draft(part);
|
|
||||||
pattern.draftPointClone = part => pointClone.draft(part);
|
|
||||||
|
|
||||||
pattern.draftPathOps = part => pathOps.draft(part);
|
// Attach per-part draft methods to prototype
|
||||||
pattern.draftPathAttr = part => pathAttr.draft(part);
|
Examples.prototype.draftPathAttr = draftPathAttr;
|
||||||
pattern.draftPathOffset = part => pathOffset.draft(part);
|
|
||||||
pattern.draftPathLength = part => pathLength.draft(part);
|
|
||||||
pattern.draftPathStart = part => pathStart.draft(part);
|
|
||||||
pattern.draftPathEnd = part => pathEnd.draft(part);
|
|
||||||
pattern.draftPathClone = part => pathClone.draft(part);
|
|
||||||
pattern.draftPathJoin = part => pathJoin.draft(part);
|
|
||||||
pattern.draftPathReverse = part => pathReverse.draft(part);
|
|
||||||
pattern.draftPathShiftAlong = part => pathShiftAlong.draft(part);
|
|
||||||
pattern.draftPathShiftFractionAlong = part =>
|
|
||||||
pathShiftFractionAlong.draft(part);
|
|
||||||
pattern.draftPathEdge = part => pathEdge.draft(part);
|
|
||||||
pattern.draftPathTrim = part => pathTrim.draft(part);
|
|
||||||
pattern.draftPathIntersectsX = part => pathIntersectsX.draft(part);
|
|
||||||
pattern.draftPathIntersectsY = part => pathIntersectsY.draft(part);
|
|
||||||
pattern.draftPathIntersects = part => pathIntersects.draft(part);
|
|
||||||
pattern.draftPathDivide = part => pathDivide.draft(part);
|
|
||||||
pattern.draftPathSplit = part => pathSplit.draft(part);
|
|
||||||
pattern.draftPathTranslate = part => pathTranslate.draft(part);
|
|
||||||
|
|
||||||
pattern.draftUtilsLinesIntersect = part => utilsLinesIntersect.draft(part);
|
|
||||||
pattern.draftUtilsBeamsIntersect = part => utilsBeamsIntersect.draft(part);
|
|
||||||
pattern.draftUtilsBeamIntersectsX = part => utilsBeamIntersectsX.draft(part);
|
|
||||||
pattern.draftUtilsBeamIntersectsY = part => utilsBeamIntersectsY.draft(part);
|
|
||||||
pattern.draftUtilsLineIntersectsCurve = part =>
|
|
||||||
utilsLineIntersectsCurve.draft(part);
|
|
||||||
pattern.draftUtilsCurvesIntersect = part => utilsCurvesIntersect.draft(part);
|
|
||||||
pattern.draftUtilsPointOnBeam = part => utilsPointOnBeam.draft(part);
|
|
||||||
pattern.draftUtilsPointOnLine = part => utilsPointOnLine.draft(part);
|
|
||||||
pattern.draftUtilsPointOnCurve = part => utilsPointOnCurve.draft(part);
|
|
||||||
pattern.draftUtilsCirclesIntersect = part => utilsCirclesIntersect.draft(part);
|
|
||||||
pattern.draftUtilsBeamIntersectsCircle = part =>
|
|
||||||
utilsBeamIntersectsCircle.draft(part);
|
|
||||||
pattern.draftUtilsLineIntersectsCircle = part =>
|
|
||||||
utilsLineIntersectsCircle.draft(part);
|
|
||||||
|
|
||||||
pattern.draftPluginGrainline = part => pluginGrainline.draft(part);
|
|
||||||
pattern.draftPluginCutonfold = part => pluginCutonfold.draft(part);
|
|
||||||
pattern.draftPluginDimension = part => pluginDimension.draft(part);
|
|
||||||
pattern.draftPluginLogo = part => pluginLogo.draft(part);
|
|
||||||
pattern.draftPluginTitle = part => pluginTitle.draft(part);
|
|
||||||
pattern.draftPluginScalebox = part => pluginScalebox.draft(part);
|
|
||||||
|
|
||||||
pattern.draftSettingsSa = part => settingsSa.draft(part);
|
|
||||||
|
|
||||||
// Add custom snippet
|
// Add custom snippet
|
||||||
pattern.on("preRender", function(next) {
|
//pattern.on("preRender", function(next) {
|
||||||
this.defs += `
|
// this.defs += `
|
||||||
<g id="x">
|
//<g id="x">
|
||||||
<path d="M -1.1 -1.1 L 1.1 1.1 M 1.1 -1.1 L -1.1 1.1" class="note"></path>
|
// <path d="M -1.1 -1.1 L 1.1 1.1 M 1.1 -1.1 L -1.1 1.1" class="note"></path>
|
||||||
<circle cy="0" cx="0" r="1.8" class="note"></circle>
|
// <circle cy="0" cx="0" r="1.8" class="note"></circle>
|
||||||
</g>
|
//</g>
|
||||||
`;
|
//`;
|
||||||
next();
|
// next();
|
||||||
});
|
//});
|
||||||
|
|
||||||
export default pattern;
|
export default Examples;
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
import freesewing from "freesewing";
|
|
||||||
|
|
||||||
var pathAttrs = {
|
|
||||||
draft: function(part) {
|
|
||||||
// prettier-ignore
|
|
||||||
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
|
|
||||||
|
|
||||||
points.B = new Point(10, 30);
|
|
||||||
points.BCp2 = new Point(40, 40);
|
|
||||||
points.C = new Point(90, 30);
|
|
||||||
points.CCp1 = new Point(50, -30);
|
|
||||||
|
|
||||||
paths.example = new Path()
|
|
||||||
.move(points.B)
|
|
||||||
.curve(points.BCp2, points.CCp1, points.C)
|
|
||||||
.attr("class", "stroke-xl canvas")
|
|
||||||
.attr("data-text", "I am text placed on a path")
|
|
||||||
.attr("data-text-class", "center fill-note");
|
|
||||||
|
|
||||||
return part;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default pathAttrs;
|
|
25
packages/examples/src/pathAttr.js
Normal file
25
packages/examples/src/pathAttr.js
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
export default part => {
|
||||||
|
let {
|
||||||
|
Point,
|
||||||
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
Snippet,
|
||||||
|
snippets,
|
||||||
|
macro
|
||||||
|
} = part.shorthand();
|
||||||
|
|
||||||
|
points.B = new Point(10, 50);
|
||||||
|
points.BCp2 = new Point(40, 10);
|
||||||
|
points.C = new Point(90, 30);
|
||||||
|
points.CCp1 = new Point(50, 90);
|
||||||
|
|
||||||
|
paths.example = new Path()
|
||||||
|
.move(points.B)
|
||||||
|
.curve(points.BCp2, points.CCp1, points.C)
|
||||||
|
.attr("class", "stroke-xl canvas")
|
||||||
|
.attr("data-text", "I am text placed on a path")
|
||||||
|
.attr("data-text-class", "center fill-note");
|
||||||
|
|
||||||
|
return part;
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue