amandaghassaei / OrigamiSimulator

Realtime WebGL origami simulator
http://origamisimulator.org/
MIT License
1.11k stars 140 forks source link

Transform support is broken #28

Closed edemaine closed 4 years ago

edemaine commented 4 years ago

I previously thought that transform attributes on graphical elements worked, but they don't. Here is an example output directly from Ipe that looks terrible loading.

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="449pt" height="513pt" viewBox="0 0 449 513" version="1.1">
<g id="surface12902">
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(100%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 256 576 L 320 512 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(100%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 256 512 L 320 448 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,100%);stroke-opacity:1;stroke-miterlimit:10;" d="M 256 512 L 64 320 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,100%);stroke-opacity:1;stroke-miterlimit:10;" d="M 320 448 L 512 640 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(100%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 320 448 L 320 256 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(100%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 256 768 L 256 512 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,100%);stroke-opacity:1;stroke-miterlimit:10;" d="M 320 448 L 320 768 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,100%);stroke-opacity:1;stroke-miterlimit:10;" d="M 256 512 L 256 256 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(100%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 256 576 L 64 384 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(100%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 320 512 L 512 704 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 64 768 L 64 256 L 512 256 L 512 768 Z M 64 768 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,100%);stroke-opacity:1;stroke-miterlimit:10;" d="M 256 576 L 256 512 " transform="matrix(1,0,0,-1,-63,769)"/>
<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(100%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 320 512 L 320 448 " transform="matrix(1,0,0,-1,-63,769)"/>
</g>
</svg>