construction: Changed repo name and org
This commit is contained in:
parent
f767d653fa
commit
a1e296858b
7 changed files with 56 additions and 52 deletions
|
@ -8,10 +8,15 @@
|
||||||
<div id="svg"></div>
|
<div id="svg"></div>
|
||||||
<script type="text/javascript" src="freesewing.js"></script>
|
<script type="text/javascript" src="freesewing.js"></script>
|
||||||
<script type="text/javascript" src="dist/brian.min.js"></script>
|
<script type="text/javascript" src="dist/brian.min.js"></script>
|
||||||
<script type="text/javascript" src="theme-default.js"></script>
|
<script type="text/javascript" src="theme.js"></script>
|
||||||
<script type="text/javascript" src="theme-designer.js"></script>
|
<script type="text/javascript" src="designer.js"></script>
|
||||||
|
<script type="text/javascript" src="cutonfold.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var pattern = freesewing.patterns.brian;
|
var pattern = freesewing.patterns.brian
|
||||||
|
.with(freesewing.plugins.theme)
|
||||||
|
.with(freesewing.plugins.designer)
|
||||||
|
.with(freesewing.plugins.cutonfold);
|
||||||
|
|
||||||
pattern.settings.measurements = {
|
pattern.settings.measurements = {
|
||||||
bicepsCircumference: 335,
|
bicepsCircumference: 335,
|
||||||
centerBackNeckToWaist: 480,
|
centerBackNeckToWaist: 480,
|
||||||
|
@ -24,34 +29,34 @@
|
||||||
shoulderToWrist: 700,
|
shoulderToWrist: 700,
|
||||||
wristCircumference: 190
|
wristCircumference: 190
|
||||||
};
|
};
|
||||||
console.log(freesewing);
|
pattern.settings.mode = 'draft';
|
||||||
//pattern.withPlugin(freesewing_theme_designer);
|
pattern.on('preRenderSvg', function(next) {
|
||||||
//pattern.withPlugin(freesewing_theme_default);
|
this.attributes.add('viewBox', '-10 -10 400 600');
|
||||||
//pattern.on('preRenderSvg', function(next) {
|
next();
|
||||||
// this.attributes.add('viewBox', '-10 -10 400 600');
|
});
|
||||||
// next();
|
pattern.draft();
|
||||||
//});
|
document.getElementById("svg").innerHTML = pattern.render();
|
||||||
// pattern.draft();
|
|
||||||
// document.getElementById("svg").innerHTML = pattern.render();
|
console.log('Freesewing object',freesewing);
|
||||||
// function pointHover(evt) {
|
function pointHover(evt) {
|
||||||
// var point = evt.target;
|
var point = evt.target;
|
||||||
// var id = point.id;
|
var id = point.id;
|
||||||
// var cx = point.getAttribute('x');
|
var cx = point.getAttribute('x');
|
||||||
// var cy = point.getAttribute('y');
|
var cy = point.getAttribute('y');
|
||||||
// var name = point.getAttribute('data-point');
|
var name = point.getAttribute('data-point');
|
||||||
// var part = point.getAttribute('data-part');
|
var part = point.getAttribute('data-part');
|
||||||
// console.log(name+' ('+cx+', '+cy+') @ '+part);
|
console.log(name+' ('+cx+', '+cy+') @ '+part);
|
||||||
// var scale = 2;
|
var scale = 2;
|
||||||
// cx = cx-scale*cx;
|
cx = cx-scale*cx;
|
||||||
// cy = cy-scale*cy;
|
cy = cy-scale*cy;
|
||||||
// point.setAttribute("transform", 'matrix('+scale+', 0, 0, '+scale+', '+cx+', '+cy+')');
|
point.setAttribute("transform", 'matrix('+scale+', 0, 0, '+scale+', '+cx+', '+cy+')');
|
||||||
// pointUnhover(id);
|
pointUnhover(id);
|
||||||
// }
|
}
|
||||||
// function pointUnhover(id) {
|
function pointUnhover(id) {
|
||||||
// setTimeout(function(){
|
setTimeout(function(){
|
||||||
// document.getElementById(id).removeAttribute("transform", '');
|
document.getElementById(id).removeAttribute("transform", '');
|
||||||
// }, 500);
|
}, 500);
|
||||||
// }
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
6
packages/brian/package-lock.json
generated
6
packages/brian/package-lock.json
generated
|
@ -56,9 +56,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@freesewing-plugins/macro-cutonfold": {
|
"@freesewing-plugins/macro-cutonfold": {
|
||||||
"version": "0.2.1",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@freesewing-plugins/macro-cutonfold/-/macro-cutonfold-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@freesewing-plugins/macro-cutonfold/-/macro-cutonfold-0.3.2.tgz",
|
||||||
"integrity": "sha512-zPklEytV9iqRkxgpOYegkox7C2W+j88tO3O5idZqf1vIwWQPOx+ktv5Y0Pt1yT/+Knmv7YLEUVy5XGMRE1uR8w=="
|
"integrity": "sha512-2M6bNiQv1bJkhj+W9mCRaOqj/sL/OB2vzjwx4KrU2xORX87wqTXoFy9UevX36DBXBNIKkR4077AhfHBGOVW6tQ=="
|
||||||
},
|
},
|
||||||
"@samverschueren/stream-to-observable": {
|
"@samverschueren/stream-to-observable": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing-plugins/macro-cutonfold": "0.2.1",
|
"@freesewing-plugins/macro-cutonfold": "0.3.2",
|
||||||
"freesewing": "^0.3.3"
|
"freesewing": "^0.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -21,18 +21,19 @@ export default {
|
||||||
browser: true
|
browser: true
|
||||||
}),
|
}),
|
||||||
json(),
|
json(),
|
||||||
|
commonjs(),
|
||||||
babel({
|
babel({
|
||||||
exclude: "node_modules/**"
|
exclude: "node_modules/**"
|
||||||
}),
|
|
||||||
terser({
|
|
||||||
output: {
|
|
||||||
preamble: `/**\n * ${meta.name} | v${meta.version}\n * ${
|
|
||||||
meta.description
|
|
||||||
}\n * (c) ${new Date().getFullYear()} ${meta.author}\n * @license ${
|
|
||||||
meta.license
|
|
||||||
}\n */`
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
// terser({
|
||||||
|
// output: {
|
||||||
|
// preamble: `/**\n * ${meta.name} | v${meta.version}\n * ${
|
||||||
|
// meta.description
|
||||||
|
// }\n * (c) ${new Date().getFullYear()} ${meta.author}\n * @license ${
|
||||||
|
// meta.license
|
||||||
|
// }\n */`
|
||||||
|
// }
|
||||||
|
// })
|
||||||
],
|
],
|
||||||
external: [
|
external: [
|
||||||
"freesewing",
|
"freesewing",
|
||||||
|
|
|
@ -2,17 +2,17 @@ import * as freesewing from "freesewing";
|
||||||
import * as cutonfold from "@freesewing-plugins/macro-cutonfold";
|
import * as cutonfold from "@freesewing-plugins/macro-cutonfold";
|
||||||
import { config } from "../config/config";
|
import { config } from "../config/config";
|
||||||
import back from "./back";
|
import back from "./back";
|
||||||
|
|
||||||
import { version } from "../package.json";
|
import { version } from "../package.json";
|
||||||
console.log("config", config);
|
|
||||||
var brian = new freesewing.pattern(config).withPlugin(cutonfold);
|
|
||||||
|
|
||||||
|
var brian = new freesewing.pattern(config).with(cutonfold);
|
||||||
|
brian.on("preRenderSvg", function(next) {
|
||||||
|
this.attributes.add("freesewing:brian", version);
|
||||||
|
next();
|
||||||
|
});
|
||||||
brian.draft = function() {
|
brian.draft = function() {
|
||||||
back.draft(brian.parts.back, brian.context);
|
back.draft(brian.parts.back, brian.context);
|
||||||
|
|
||||||
return brian;
|
return brian;
|
||||||
};
|
};
|
||||||
|
|
||||||
brian.version = version;
|
|
||||||
|
|
||||||
export default brian;
|
export default brian;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../theme-default/dist/browser/bundle.js
|
|
|
@ -1 +0,0 @@
|
||||||
../theme-designer/dist/browser/bundle.js
|
|
Loading…
Add table
Add a link
Reference in a new issue