Upon creating a union of two meshes, I want to apply MeshLambertMaterial specifically on the object named 'result':
var lathe = new THREE.Mesh(latheGeometry);
var cube_bsp = new ThreeBSP( lathe );
var box = new THREE.BoxGeometry( 2,30,3);
var sub = new THREE.Mesh( box );
sub.position = new THREE.Vector3(0,0,19);
var substract_bsp = new ThreeBSP( sub );
var subtract_bsp = cube_bsp.union( substract_bsp );
var result = subtract_bsp.toMesh();
result.rotation.x = Math.PI * -0.5;
scene.add(result);
Currently, the resulting object has a plain random color after the union operation. However, I aim to achieve a white-colored object with LambertMaterial instead.
Images: https://i.sstatic.net/cJzUC.jpg