Light.js 564 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. * @author alteredq / http://alteredqualia.com/
  4. */
  5. THREE.Light = function ( color ) {
  6. THREE.Object3D.call( this );
  7. this.type = 'Light';
  8. this.color = new THREE.Color( color );
  9. };
  10. THREE.Light.prototype = Object.create( THREE.Object3D.prototype );
  11. THREE.Light.prototype.constructor = THREE.Light;
  12. THREE.Light.prototype.clone = function ( light ) {
  13. if ( light === undefined ) light = new THREE.Light();
  14. THREE.Object3D.prototype.clone.call( this, light );
  15. light.color.copy( this.color );
  16. return light;
  17. };