You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding OrbitControls in a child component and trying to have access to it in other components i would expect it works the same way as 'camera' by using TresContext.
Confirm this is a real bug and it happens for our case. In our case, we want to have some transition animation, so we are implementing moving the camera from top down to some certain x,y,z. However, we also have Orbit control in our screen, hence, we need to detect when the orbit control "starts" to stop the transition, otherwise, the camera will try to bounce back to x.y.z whenever the user move around with orbit control
Describe the bug
Adding OrbitControls in a child component and trying to have access to it in other components i would expect it works the same way as 'camera' by using TresContext.
controls just returns null.
Reproduction
https://play.tresjs.org/#eNqdVW1v2zYQ/iuEgsEtZkuykxSb5g6Z3Xbo0DZB429VPzDS1WJCkQRJvy3If99RLzblJanaRLCte3nuuePx7j5YaDB/KRWuVxAkwdRkmilLDNiVIpyK5es0sCYN/kwFK5XUltwT5zKnYk0NeSDftCzJ4MKi7NZEmdQw+GNvuyiYzq9AGykawzDyZC6oZz0vGM/nslR7272ktUzFNKopIiF8sVAqTi3gGyFTj9iGiVxuRob9CyTjQPUok1xqzObkt8mb2fy8Song39QnGTXCRrWPfyR3gd4wDZllUlD+gS0LSxIlDXMCDPIlHpLJkJx9TQOSMGFBoGqHinE4QVFGjR2ZgiLFJuQ0OpBHwTTyMsNXY3fc/SxsyYepuJH5jtw7v5LqJRMJibE4hCia50ws29cCHLGEjOP4l0qwYbkt9u8PqTihStVA37El5IZmd0stVyKvS5mQkzh2cRAGD6UiGAyD+ixHJVXhLVYUe6qCTxsFtlJSB3Qyv22cIg0Ka5VJoijLBfrnwNlahwJsJFQZ+eYXZ+EknEQ5MzZyYrROAyzNETADYWUVtC927YHwcRiPBGxtOD5EabTdYHYD9E5R0SeFvW0VoEVuhWHJnI+PXWjohevsLhDxFdKOfgVT+tXA27My0LvMnvnFOA7PERGvE2zDslvkxg4bWUP+A8C1w3PQaDjKoWQ9QFtTl/xZ+Cri7MaHdIjYoQ/YmtZkUnxjy6PGzPB+Mw76UrnL221Qyrnc/FPJrF7Bnl9WQHb3iPzWbGvKV9gsoNdY7sNR4lUFW6vfXn/CzvKUpcxXvDmcJ5SfwUi+chxrsxleRaTt2VVs31f3DKfAwrzdVoOnSapD1O4UVNIvtcTrtVrwtSpcZV8dh5uCT1XpkNlpeOoV/GjU990vl/qG2bkUVkv+yIqpr+Dg2VXQzGgXW7kpvYY5LUHT7pD+fUjc44Z0O+Cn3eBO3JnFmFVnKfXNCdu+GvAIjGf7+N50aWCHGmeP3236r4+cX7ysFqGzlBxCLpcvBvPLT4vPlx+uB8O9Z7imfAUv+5TpI5iiW5kRLi984mp/aWmpt9c+UluEV+9rbQPTLl8p4G+QJVi9Iwl2hXE+4yEZh+dDcuoX2gu9kFIgKGhGOdI/WtOHo6lWpHN4njtSdI8L5u3ZbtiZ3D7C05FsP36I69k79/8TXLHGrtT/r+S1KkAfatmbybvZLD6dPcWk28oP/wEJMkhh
Steps to fix
When adding you need to add the make-default and combined with nextTick we have access to it.
Code of Conduct
The text was updated successfully, but these errors were encountered: