react-three-editor
react-three-editor copied to clipboard
Fix editing in the `ClickAndHover` example
This issue is for detailing problems editing in the R3F ClickAndHover example. I am picking this example because it is so basic. I am currently working off: https://github.com/pmndrs/react-three-editor/pull/39
- ~~The
Box2is selectable from the scene panel but not by clicking. Inspecting, this appears to be because theThreeEventManageris using the the presence of__r3f.editableto determine if it is an editable element. However, because the red box is added as aprimitive, the intersectedMeshdoesn't have__r3f.editableon it.~~ - Selecting
Box.mesh, moving its position and then saving gives the following error:Uncaught TypeError: Cannot destructure property 'value' of 'input' as it is undefined. - Selecting
App.Box2and attempting to move it produces the error:Uncaught TypeError: Cannot read properties of undefined (reading 'every')
More to come.
(1) was fixed with https://github.com/pmndrs/react-three-editor/pull/39/commits/2bd3b34ab8ab74983c7a8d9e0da66a8b2bff1fd3
We will definitely want to use layers now as we are traversing the scene for every hit at the moment.