Files
svg2cube/svgCube.html
T
2016-01-17 17:21:55 +08:00

48 lines
1.3 KiB
HTML
Executable File

<!-- Non gui version of svgCube_gui.html for webdriver converions to svg -->
<html>
<head>
<meta charset="utf-8">
<title>svg2Cube</title>
</head>
<body>
<div style="display: none;" id="dimensions">
</input>
</body>
<script type="text/javascript" src="node_modules/snapsvg/dist/snap.svg.js"></script>
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="projectSVG.js"></script>
<script>
var cube1
window.onload = function() {
cube1 = new SvgCube({
rotateX: 45,
topUrl: 'inputs/top.svg',
leftUrl: 'inputs/left.svg',
frontUrl: 'inputs/front.svg',
rightUrl: 'inputs/right.svg',
backUrl: 'inputs/back.svg',
bottomUrl: 'inputs/bottom.svg',
clipCircle: false,
stroke: {
"stroke": 'black', // stroke color for outline
"stroke-width": 0, // outline width
},
size: 444,
});
cube1.drawCube()
var text = cube1.getBounds();
// Get dimensions of each pane and make it accesable to webdriver
$('#dimensions').attr('value', 1)
$('#dimensions').text(JSON.stringify(text))
}
</script>
</html>