minorua / Qgis2threejs

3D map visualization and web export plugin for QGIS
http://minorua.github.io/Qgis2threejs/docs/
GNU General Public License v2.0
512 stars 91 forks source link

Set and save camera and target position / save a view - enhancement request #203

Open lamemusic opened 4 years ago

lamemusic commented 4 years ago

Currently you can reset the camera position which returns to a set value, but not save a particular view of a 3D model and return to it.

For a design/urban design use case it would be highly useful to be able to recreate views and angles in the Qgis2threejs Exporter window when using the 3D model as a starting point for additional work - whether this is provided as a link that can be pasted in or some other method.

This is also much more useful in the Qgis2threejs Exporter as the complexity of the models appears to break some gltf viewers - although smaller exports are working under version 2.4.2.

This is an enhancement request.

lamemusic commented 4 years ago

I've figured you can query position and target from the console with the following commands app.camera.position app.controls.target At the end of the returned string you get x, y, and z values

You can then set these as follows: app.camera.position.set(x,y,z) app.controls.target.set(x,y,-z)

To update the view you can follow this with: app.render(true)

If I can figure out how to program this in (I'm not really a coder) I will share this :)

TimKrohn commented 4 years ago

Yes yes, please please add function to reset camera position to my desired location. I really need it :-)