How can I see with a checkbox the wireframe of the model?

In this example: three.js examples , how can I add a new folder to the panel in which the user can toggle between the wireframe of the model and the textured model ?

Simple live example:

1 Like

Thank you very much for your time. That’s exactly what I want to do. However I am not able to apply your code to mine. Could you take a look here please?
The model I am loading is from here:

It seems you have shared the same fiddle like in my post.

I am sorry, I changed it now.

Please share a workable live example. Not copy/paste stuff. I think it works now, could you please take a look? I am sorry for taking your time.

Try it with:

The code looks a bit different than in my fiddle since when using glTF your model might consist of multiple 3D objects.

1 Like