construction: Toying with decorators
This commit is contained in:
parent
a5b6d5609a
commit
e5fe4cc2d2
6 changed files with 1556 additions and 1844 deletions
2
packages/brian/dist/browser/bundle.js
vendored
2
packages/brian/dist/browser/bundle.js
vendored
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Webpack App</title>
|
||||
<title>Brian</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="svg"></div>
|
||||
|
@ -23,6 +23,24 @@
|
|||
};
|
||||
pattern.draft();
|
||||
document.getElementById("svg").innerHTML = pattern.render();
|
||||
function pointHover(evt) {
|
||||
var point = evt.target;
|
||||
var id = point.id;
|
||||
var cx = point.getAttribute('x');
|
||||
var cy = point.getAttribute('y');
|
||||
console.log('Point '+id+' ( '+cx+' , '+cy+' )');
|
||||
var scale = 2;
|
||||
cx = cx-scale*cx;
|
||||
cy = cy-scale*cy;
|
||||
point.setAttribute("transform", 'matrix('+scale+', 0, 0, '+scale+', '+cx+', '+cy+')');
|
||||
pointUnhover(id);
|
||||
}
|
||||
function pointUnhover(id) {
|
||||
setTimeout(function(){
|
||||
document.getElementById(id).removeAttribute("transform", '');
|
||||
}, 500);
|
||||
}
|
||||
console.log(pattern.parts.backBlock.points);
|
||||
</script>
|
||||
</html>
|
||||
|
||||
|
|
3354
packages/brian/package-lock.json
generated
3354
packages/brian/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -10,9 +10,9 @@
|
|||
"browserbuild": "npx webpack-cli --config webpack.config.js",
|
||||
"watch": "babel-watch src/index.js",
|
||||
"run": "nodemon node dist/node/index.js",
|
||||
"dev1": "webpack-dev-server --open",
|
||||
"dev2": "npx webpack-cli --config webpack.config.js --watch",
|
||||
"dev": "webpack-dev-server --open && npx webpack-cli --config webpack.config.js --watch"
|
||||
"watch": "npx webpack-cli --config webpack.config.js --watch",
|
||||
"dev": "webpack-dev-server --open",
|
||||
"rdev": "webpack-dev-server --disable-host-check --public joost.freesewing.org:8080"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -10,6 +10,7 @@ var backBlock = {
|
|||
let values = pattern.values;
|
||||
let points = pattern.parts.backBlock.points;
|
||||
let paths = pattern.parts.backBlock.paths;
|
||||
let snippets = pattern.parts.backBlock.snippets;
|
||||
let F = freesewing;
|
||||
|
||||
// Center back (cb) vertical axis
|
||||
|
@ -35,21 +36,13 @@ var backBlock = {
|
|||
points._tmp3 = F.utils.beamsCross(points._tmp1, points._tmp2, points.armhole, points.armholePitch);
|
||||
points.armholeHollow = points._tmp1.shiftFractionTowards(points._tmp3, 0.5);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
paths.seam = new F.path()
|
||||
.move(points.cbNeck)
|
||||
.line(points.cbHips)
|
||||
.move(points.cbShoulder)
|
||||
.line(points.cbHips)
|
||||
.line(points.hips)
|
||||
.line(points.armhole)
|
||||
.curve(points.neck, points.shoulder, points.armholePitch)
|
||||
.close()
|
||||
;
|
||||
|
||||
points.gridAnchor = points.cbHips;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue