So far I managed to load a mesh with GLTFLoader and turn it into a wireframe. I'm stuck at the part where I want to color it and give it a line thickness. I don't completely understand how to use traverse().
My code so far:
var loader = new THREE.GLTFLoader(); loader.load('model.glb', handle_load);
var mesh;
function handle_load(gltf) {
mesh = gltf.scene;
mesh.traverse((node) => {
if (!node.isMesh) return;
node.material.wireframe = true;
});
scene.add(mesh);
mesh.position.z = 2;
}