| 12345678910111213141516171819202122232425262728293031323334353637 |
- /**
- * @author mrdoob / http://mrdoob.com/
- * @author alteredq / http://alteredqualia.com/
- */
- THREE.DirectionalLight = function ( color, intensity ) {
- THREE.Light.call( this, color );
- this.type = 'DirectionalLight';
- this.position.set( 0, 1, 0 );
- this.updateMatrix();
- this.target = new THREE.Object3D();
- this.intensity = ( intensity !== undefined ) ? intensity : 1;
- this.shadow = new THREE.LightShadow( new THREE.OrthographicCamera( - 500, 500, 500, - 500, 50, 5000 ) );
- };
- THREE.DirectionalLight.prototype = Object.create( THREE.Light.prototype );
- THREE.DirectionalLight.prototype.constructor = THREE.DirectionalLight;
- THREE.DirectionalLight.prototype.copy = function ( source ) {
- THREE.Light.prototype.copy.call( this, source );
- this.intensity = source.intensity;
- this.target = source.target.clone();
- this.shadow = source.shadow.clone();
- return this;
- };
|