bwasty / gltf-viewer

glTF 2.0 Viewer written in Rust
The Unlicense
188 stars 31 forks source link

add --straight flag to take model screenshots from head-on #49

Closed ox closed 6 years ago

ox commented 6 years ago

This diff adds a --straight flag (flexible on the naming), which can toggle the viewer.set_camera_from_bounds' straight argument. I have some models which are meant to be looked at straight-on, and this would directly solve that issue.

A more generalized solution would be to be able to specify camera rotation angles around the bounding box, but I'm not sure how that would jive with the count flag.

bwasty commented 6 years ago

Thanks! I changed the help string a bit because I consider the automatically positioned camera to be the default one (most sample files don't contain a camera).