PointLight.js 570 B

123456789101112131415161718192021222324252627
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. THREE.PointLight = function ( color, intensity, distance ) {
  5. THREE.Light.call( this, color );
  6. this.intensity = ( intensity !== undefined ) ? intensity : 1;
  7. this.distance = ( distance !== undefined ) ? distance : 0;
  8. };
  9. THREE.PointLight.prototype = Object.create( THREE.Light.prototype );
  10. THREE.PointLight.prototype.clone = function () {
  11. var light = new THREE.PointLight();
  12. THREE.Light.prototype.clone.call( this, light );
  13. light.intensity = this.intensity;
  14. light.distance = this.distance;
  15. return light;
  16. };
粤ICP备19079148号