| | |
| | | ambient.position.set(0, 0, 0); |
| | | this.addObject(ambient); |
| | | |
| | | |
| | | // 添加平行光,平行光类似于太阳光 |
| | | // let directionalLight = new THREE.DirectionalLight(0xffffff, 0.3);//模拟远处类似太阳的光源 |
| | | // directionalLight.position.set(0, 200, 0); |
| | |
| | | pointLight.castShadow = true; |
| | | pointLight.shadow.camera.near = 2000; |
| | | pointLight.shadow.camera.far = 10000; |
| | | pointLight.shadow.mapSize.height = 100000; |
| | | pointLight.shadow.mapSize.width = 100000; |
| | | // 将所有创建的物体加入到场景中去 |
| | | pointLight.shadow.mapSize.height = 200000; |
| | | pointLight.shadow.mapSize.width = 200000; |
| | | this.addObject(pointLight); |
| | | } |
| | | this.initOrbitControl = function () { |