64 lines
1.9 KiB
HTML
64 lines
1.9 KiB
HTML
![]() |
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>Aaron</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="svg"></div>
|
||
|
<script src="freesewing.js"></script>
|
||
|
<script src="https://unpkg.com/@freesewing/plugin-bundle"></script>
|
||
|
<script src="brian.js"></script>
|
||
|
<script src="dist/browser.js"></script>
|
||
|
<script src="tmp/theme.js"></script>
|
||
|
<script src="tmp/designer.js"></script>
|
||
|
<script src="tmp/models.js"></script>
|
||
|
<script src="tmp/antmantest.js"></script>
|
||
|
<script src="tmp/validate.js"></script>
|
||
|
<script src="tmp/debug.js"></script>
|
||
|
<script>
|
||
|
var pattern = freesewing.patterns.aaron
|
||
|
.with(freesewing.plugins.validate)
|
||
|
.with(freesewing.plugins.debug)
|
||
|
.with(freesewing.plugins.theme)
|
||
|
.with(freesewing.plugins.designer)
|
||
|
console.log('freesewing', freesewing);
|
||
|
|
||
|
//pattern.settings.paperless = true;
|
||
|
pattern.settings.measurements = freesewing.models.men.manSize36;
|
||
|
|
||
|
pattern.settings.sa = 10;
|
||
|
pattern.settings.units = 'metric';
|
||
|
pattern.settings.sample = {
|
||
|
type: 'measurement',
|
||
|
measurement: 'shoulderToShoulder'
|
||
|
}
|
||
|
//pattern.sampleOption('lengthBonus');
|
||
|
//pattern.sampleMeasurement('bicepsCircumference');
|
||
|
//pattern.sampleModels(freesewing.antmantest);
|
||
|
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');
|
||
|
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>
|