2018-12-21 18:19:21 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Simon</title>
|
|
|
|
<style>
|
|
|
|
.two {
|
|
|
|
display: inline-block;
|
|
|
|
max-width: 95%;
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="svg"></div>
|
|
|
|
<div id="svg1" class="two"></div>
|
|
|
|
<div id="svg2" class="two"></div>
|
|
|
|
<!-- <script type="text/javascript" src="node_modules/freesewing/dist/browser.js"></script> -->
|
|
|
|
<script type="text/javascript" src="../../freesewing/dist/browser.js"></script>
|
2018-12-29 15:35:27 +01:00
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/brian/dist/browser.js"></script>
|
2018-12-21 18:19:21 +01:00
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-bundle/dist/browser.js"></script>
|
2018-12-22 15:15:49 +01:00
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-sprinkle/dist/browser.js"></script>
|
2018-12-28 15:42:53 +01:00
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-banner/dist/browser.js"></script>
|
2018-12-21 18:19:21 +01:00
|
|
|
<script type="text/javascript" src="dist/browser.js"></script>
|
|
|
|
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-theme/dist/browser.js"></script> -->
|
|
|
|
<script type="text/javascript" src="../../plugins/plugin-theme/dist/browser.js"></script>
|
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-designer/dist/browser.js"></script>
|
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-debug/dist/browser.js"></script>
|
|
|
|
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-validate/dist/browser.js"></script> -->
|
|
|
|
<script type="text/javascript" src="../../plugins/plugin-validate/dist/browser.js"></script>
|
|
|
|
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-i18n/dist/browser.js"></script> -->
|
2018-12-22 15:15:49 +01:00
|
|
|
<script type="text/javascript" src="../../plugins/plugin-flip/dist/browser.js"></script>
|
2018-12-21 18:19:21 +01:00
|
|
|
<script type="text/javascript" src="../../plugins/plugin-i18n/dist/browser.js"></script>
|
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/models/dist/browser.js"></script>
|
|
|
|
<script type="text/javascript" src="node_modules/@freesewing/antman/dist/browser.js"></script>
|
|
|
|
<script>
|
|
|
|
let settings = {
|
|
|
|
"embed": true,
|
|
|
|
"measurements": {
|
|
|
|
"bicepsCircumference": 335,
|
|
|
|
"centerBackNeckToWaist": 520,
|
|
|
|
"chestCircumference": 1080,
|
|
|
|
"hipsCircumference": 990,
|
|
|
|
"naturalWaist": 925,
|
|
|
|
"naturalWaistToHip": 145,
|
|
|
|
"neckCircumference": 420,
|
|
|
|
"shoulderSlope": 55,
|
|
|
|
"shoulderToElbow": 410,
|
|
|
|
"shoulderToShoulder": 465,
|
|
|
|
"shoulderToWrist": 680,
|
|
|
|
"wristCircumference": 190,
|
|
|
|
"seatCircumference": 1080,
|
|
|
|
"inseam": 910,
|
|
|
|
"seatDepth": 200,
|
|
|
|
"hipsToUpperLeg": 220,
|
|
|
|
"upperLegCircumference": 630,
|
|
|
|
"headCircumference": 590,
|
|
|
|
"naturalWaistToFloor": 1310,
|
|
|
|
"naturalWaistToSeat": 280
|
2018-12-29 15:35:27 +01:00
|
|
|
},
|
|
|
|
only: ["front", "frontLeft"],
|
|
|
|
options: {
|
|
|
|
extraTopButton: false,
|
|
|
|
lengthBonus: 0.2,
|
|
|
|
hemStyle: "slashed",
|
|
|
|
|
2018-12-21 18:19:21 +01:00
|
|
|
}
|
|
|
|
};
|
2018-12-29 15:35:27 +01:00
|
|
|
var pattern = new freesewing.patterns.simon(settings);
|
|
|
|
pattern.use(freesewing.plugins.theme);
|
|
|
|
pattern.use(freesewing.plugins.designer);
|
|
|
|
pattern.use(freesewing.plugins.flip);
|
|
|
|
pattern.use(freesewing.plugins.banner);
|
|
|
|
pattern.use(freesewing.plugins.debug);
|
|
|
|
pattern.draft();
|
|
|
|
document.getElementById("svg1").innerHTML = pattern.render();
|
2018-12-21 18:19:21 +01:00
|
|
|
|
|
|
|
function pointHover(evt) {
|
|
|
|
var point = evt.target;
|
|
|
|
var id = point.id;
|
|
|
|
var cx = point.getAttribute('x');
|
|
|
|
var cy = point.getAttribute('y');
|
|
|
|
var name = point.getAttribute('data-point');
|
|
|
|
var part = point.getAttribute('data-part');
|
|
|
|
console.log(name+' ('+cx+', '+cy+') @ '+part);
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|