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
654 stars 201 forks source link

Transform controls really big #649

Closed vincentfretin closed 3 weeks ago

vincentfretin commented 1 year ago

There is an issue where the transform controls doesn't resize when zooming in or out, so it appears really big when the camera is far away and you focus on a small object (with f or dblclick). transform_controls_really_big

vincentfretin commented 1 year ago

Normal size if I click away and reclick on the object:

transform_controls_normal_size

dmarcos commented 1 year ago

Any quick fix for this we can incorporate to 1.4.0?

vincentfretin commented 1 year ago

This is most probably an update method to call after using zoom. I quickly look at it but I'm not familiar enough with the code to do a quick fix on this. I plan to work on updating TransformControls next year, we should be able to use the latest one from three instead of our very old one in the repository (for example setScaleSnap is missing on our old version).

Also I see that in EditorControls.js we're patching THREE.Box3.prototype.expandByObject so overriding the one from three, that's not great.

Also I would disable the dbclick to focus behavior, it's really confusing when you do it by mistake on the ground plane, it zooms out to infinity.

vincentfretin commented 1 year ago

You can sponsor vincentfretin to expedite this fix. Find other work you can sponsor at https://github.com/c-frame/sponsorship