How do I setup materials in THREE.js when loading Collada (dae) models?
I have the following code:
new THREE.ColladaLoader().load('models/cylinder.dae',
function(collada) {
var model = collada.scene;
model.scale.set(10.0, 10.0, 10.0);
// attempt to set a material - doesn't work...
collada.dae.materials[0] = new THREE.MeshBasicMaterial({
color: 0xff0000,
wireframe: true
});
scene.add(model);
});
Thanks for any help.