Css3d_periodictable add object by dynamically

hi, In the css3d_periodictable example, I want to dynamically add a object to 3D model without refreshing the webpage. How can I done this?How should I write the js code???

Thank you

link: https://threejs.org/examples/?q=periodic#css3d_periodictable

To add a new element it should be enough to repeat the code from the initial for-loop - between lines 243 and 268 - and put it in an event listener, or any other place you’d like the new object to be dynamically added from.

Thank you ! I will try it later

发自levsion的 iPhone