//新建光斑spotLight
var spotLight = new THREE.SpotLight(0xffffff);//光斑颜色为白色
spotLight.position.set(8.7, 5, -8); // 设置光源位置为灯杆顶部位置
spotLight.angle = Math.PI / 10; // 设置光锥的角度
spotLight.penumbra = 0.2; // 设置边缘柔化
spotLight.castShadow = true; // 启用阴影
spotLight.target.position.set(8.7, 0, -8); // 设置光源的目标位置
scene.add( spotLight.target );
scene.add(spotLight);
//克隆出光斑2 spotLight2
var spotLight2=spotLight.clone();
spotLight2.position.set(14, 5, -14); // 设置光源位置为灯杆顶部位置
spotLight2.target.position.set(14, 0, -14); // 设置光源的目标位置
scene.add(spotLight2.target );
scene.add(spotLight2);