Closed hellhorse123 closed 5 months ago
The event listener should be attached to the stage at the place where the stage is declared.
For the rest of the code that you need to add it depends what you want to do. For example, you can bind it to a react state variable (like adding to an array of all the selected atoms) and have a useEffect depend on this list of selected atoms to update a representation selection.
This is not trivial, because there are design issues related to React and functionality from NGL. This takes a long time to explain the details and I'm afraid I cannot do more while also maintaining the NGL library.
I continue to transfer ngl functionality to react. I can’t figure out how to show selected atoms on a 3D model. I found this function, but problem with displaying of selected atom is stayed.
How can i modifying my current code?