Can you duplicate objects using dat-gui

I’m trying to make it so that when a user presses a button, it duplicate an existing object in the scene. What I’m trying to do is similar to this Introduction to Three.js but the code is old and three.js doesn’t support it anymore. My code is down below:
l.html (4.4 KB)
Thanks in advance.

Try it like so: https://jsfiddle.net/65ayefjm/

The example uses the latest version of three.js and dat.gui. Notice that the material is only cloned so the cloned mesh can receive a new color.

1 Like

Thanks! I was also wondering if you could duplicate groups of objects and edit the size and shape of the all of the duplicates at the same time.