content/hifi-content/dave/walk-tools/walkTools/libraries/three.js/lights/PointLight.js
2022-02-13 22:49:05 +01:00

32 lines
789 B
JavaScript

/**
* @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.
};
THREE.PointLight.prototype = Object.create( THREE.Light.prototype );
THREE.PointLight.prototype.constructor = THREE.PointLight;
THREE.PointLight.prototype.clone = function () {
var light = new THREE.PointLight();
THREE.Light.prototype.clone.call( this, light );
light.intensity = this.intensity;
light.distance = this.distance;
light.decay = this.decay;
return light;
};