aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
647 stars 198 forks source link

Keep the camera position when switching to inspector (fix #607) #717

Open vincentfretin opened 1 month ago

vincentfretin commented 1 month ago

Keep the camera position and rotation when opening the inspector.

I have this change for quite some times in my project. When I use the default inspector build in other projects I am so frustrated that the camera position is not kept while opening the inspector. It seems I am not the only one that wanted this behavior.

This closes #607

vincentfretin commented 1 month ago

But it should be an option somehow. I want that behavior when I am on a scene and I open the inspector. But I don't want that behavior when opening directly the inspector and want the perspective camera to be at the specified position https://github.com/aframevr/aframe-inspector/blob/575c9106e26b41c714cc369b55c4db861315d7a0/src/lib/cameras.js#L45-L46 Those positions should also be configurable, with the ortho cameras as well. I'm writing some configurators where I want different camera positions.