| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- /**
- * @author mrdoob / http://mrdoob.com/
- */
- THREE.PointLight = function ( color, intensity, distance, decay ) {
- THREE.Light.call( this, color );
- this.type = 'PointLight';
- this.intensity = ( intensity !== undefined ) ? intensity : 1;
- this.distance = ( distance !== undefined ) ? distance : 0;
- this.decay = ( decay !== undefined ) ? decay : 1; // for physically correct lights, should be 2.
- this.castShadow = false;
- this.onlyShadow = false;
- //
- this.shadowCameraNear = 1;
- this.shadowCameraFar = 500;
- this.shadowCameraFov = 90;
- this.shadowCameraVisible = false;
- this.shadowBias = 0;
- this.shadowDarkness = 0.5;
- this.shadowMapWidth = 512;
- this.shadowMapHeight = 512;
- //
- this.shadowMap = null;
- this.shadowMapSize = null;
- this.shadowCamera = null;
- this.shadowMatrix = null;
- };
- THREE.PointLight.prototype = Object.create( THREE.Light.prototype );
- THREE.PointLight.prototype.constructor = THREE.PointLight;
- THREE.PointLight.prototype.copy = function ( source ) {
- THREE.Light.prototype.copy.call( this, source );
- this.intensity = source.intensity;
- this.distance = source.distance;
- this.decay = source.decay;
- this.castShadow = source.castShadow;
- this.onlyShadow = source.onlyShadow;
- this.shadowCameraNear = source.shadowCameraNear;
- this.shadowCameraFar = source.shadowCameraFar;
- this.shadowCameraFov = source.shadowCameraFov;
- this.shadowCameraVisible = source.shadowCameraVisible;
- this.shadowBias = source.shadowBias;
- this.shadowDarkness = source.shadowDarkness;
- this.shadowMapWidth = source.shadowMapWidth;
- this.shadowMapHeight = source.shadowMapHeight;
- return this;
- };
|