|
@@ -6,7 +6,7 @@ THREE.SpotLight = function ( hex, intensity, distance, angle, exponent ) {
|
|
|
|
|
|
THREE.Light.call( this, hex );
|
|
|
|
|
|
- this.position = new THREE.Vector3( 0, 1, 0 );
|
|
|
+ this.position.set( 0, 1, 0 );
|
|
|
this.target = new THREE.Object3D();
|
|
|
|
|
|
this.intensity = ( intensity !== undefined ) ? intensity : 1;
|
|
@@ -41,3 +41,23 @@ THREE.SpotLight = function ( hex, intensity, distance, angle, exponent ) {
|
|
|
};
|
|
|
|
|
|
THREE.SpotLight.prototype = Object.create( THREE.Light.prototype );
|
|
|
+
|
|
|
+THREE.SpotLight.prototype.clone = function () {
|
|
|
+
|
|
|
+ var light = new THREE.SpotLight();
|
|
|
+
|
|
|
+ THREE.Light.prototype.clone.call( this, light );
|
|
|
+
|
|
|
+ light.target = this.target.clone();
|
|
|
+
|
|
|
+ light.intensity = this.intensity;
|
|
|
+ light.distance = this.distance;
|
|
|
+ light.angle = this.angle;
|
|
|
+ light.exponent = this.exponent;
|
|
|
+
|
|
|
+ light.castShadow = this.castShadow;
|
|
|
+ light.onlyShadow = this.onlyShadow;
|
|
|
+
|
|
|
+ return light;
|
|
|
+
|
|
|
+};
|