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: https://jsfiddle.net/6q4xzjr2/
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? https://jsfiddle.net/x81wy9cL/
The model I am loading is from here: https://github.com/mrdoob/three.js/tree/master/examples/models/gltf/Xbot.glb
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.
https://jsfiddle.net/x81wy9cL/1/ I think it works now, could you please take a look? I am sorry for taking your time.
Try it with: https://jsfiddle.net/q30eybp4/
The code looks a bit different than in my fiddle since when using glTF your model might consist of multiple 3D objects.