Open vincentfretin opened 1 year ago
Thanks for digging through this @vincentfretin. I might be wrong but the only "new" feature I see in green above might be a bounding box around an entity and its children? I think currently selecting a parent entity with children in inspector will not result in a bounding box displayed unless it has a mesh attached to that exact node.
The touch updates appear to be using pointer
instead of mouse
events to support a wider range of devices but TBH I've tested this on ipad, touch screen displays, etc. and never had a problem before. There seems to be placeholder for custom touch behavior such as "// TODO touch" but nothing substantive.
The part in green with expandByObject
patch seems to be an old version of what is currently in threejs Box3 plus with some isNaN checks. I'm no sure in which case x y z on a vertex could be NaN here. See #686 for this specific part.
I'm opening this PR in draft while I'm looking into it.
The EditorControls.js file in this repo was added the day after this commit in three.js repo https://github.com/mrdoob/three.js/commit/12b89819d482fcebc014e6d59aad2ae1abdab9cd (that was included in three r100) Initial commit was https://github.com/aframevr/aframe-inspector/commit/aae61a3597c9206e89cab11fabddd06e4348fe36 comparing those two versions gave those differences:
further changes to it was around focus and ortho camera: https://github.com/aframevr/aframe-inspector/commit/f658d15beff7f76c7f2457b0f6288ddcaf18da79 https://github.com/aframevr/aframe-inspector/commit/26eb77f76b58fe9ae7a2e90cb2455161c57c181f#diff-d05c541b1811ac8b854c10217ee45ec94afc1f78c715842c7463c2fb9b05efa7 https://github.com/aframevr/aframe-inspector/commit/ee70fa1d1fa6ab223cdd51da46ab8d802957fd6d https://github.com/aframevr/aframe-inspector/commit/b371202e68dcad997e3f740996f912f79fe77526
Latest version in the three.js repo: is at https://github.com/mrdoob/three.js/commits/dev/editor/js/EditorControls.js
Some interesting updates around better touch support may be interesting to backport here: https://github.com/mrdoob/three.js/commit/1eccf74c8e326081616023cadad181eaefe81e4c https://github.com/mrdoob/three.js/commit/e55b718359414dd556e9b5c8f293a7df66f4f06a