灯光

  • 点光源
var light = new THREE.PointLight(0xffffff, 1, 100); 
light.position.set(1, 2, 3);
this.scene.add(light);
  • 聚光灯
var spotLight = new THREE.SpotLight(0xffffff);
spotLight.castShadow = true; // 点光源
spotLight.position.set(1, 2, 3);
this.scene.add(spotLight);
  • 环境光(漫反射)
var ambientLight = new THREE.AmbientLight('#0c0c0c'); )
this.scene.add(ambientLight);
  • 平行光
var directionLight = new THREE.DirectionalLight(0x00FF00, 1);
directionLight.position.set(0, 5, 0);
this.scene.add(directionLight);

你可能感兴趣的:(灯光)