amandaghassaei / OrigamiSimulator

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

spec to 1.1, edges_foldAngles to edges_foldAngle and degrees not radians #19

Closed mayakraft closed 4 years ago

mayakraft commented 4 years ago

Fix #6

edemaine commented 4 years ago

Thanks for this!!

One quick thing I spotted: we should change file_spec: 1 to file_spec: '1.1' in saveFOLD.js. And just to check: we don't need to convert back to degrees then, because we only convert to radians in the solver, not the FOLD representation? There's also a few uses of edges_foldAngles in there (when globals.exportFoldAngle is set).

I also see foldAngles mentioned in index.html. Easy to miss this one because it says vertices_foldAngles, but should say edges_foldAngle. 😨

I also wonder about backward compatibility with FOLD spec 1.0. Ideally we should support edges_foldAngles on input, and rewrite it to edges_foldAngle. I worry a little about old FOLD files saved from Origami Simulator that now have the wrong radians vs. degrees... but not sure it's worth a dialog option.