HemisphereLight.js 653 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.HemisphereLight = function ( skyColorHex, groundColorHex, intensity ) {
  5. THREE.Light.call( this, skyColorHex );
  6. this.position.set( 0, 100, 0 );
  7. this.groundColor = new THREE.Color( groundColorHex );
  8. this.intensity = ( intensity !== undefined ) ? intensity : 1;
  9. };
  10. THREE.HemisphereLight.prototype = Object.create( THREE.Light.prototype );
  11. THREE.HemisphereLight.prototype.clone = function () {
  12. var light = new THREE.PointLight();
  13. THREE.Light.prototype.clone.call( this, light );
  14. light.groundColor.copy( this.groundColor );
  15. light.intensity = this.intensity;
  16. return light;
  17. };