import { Light } from './Light.js';
import { DirectionalLightShadow } from './DirectionalLightShadow.js';
import { Object3D } from '../core/Object3D.js';

function DirectionalLight( color, intensity ) {

	Light.call( this, color, intensity );

	this.type = 'DirectionalLight';

	this.position.copy( Object3D.DefaultUp );
	this.updateMatrix();

	this.target = new Object3D();

	this.shadow = new DirectionalLightShadow();

}

DirectionalLight.prototype = Object.assign( Object.create( Light.prototype ), {

	constructor: DirectionalLight,

	isDirectionalLight: true,

	copy: function ( source ) {

		Light.prototype.copy.call( this, source );

		this.target = source.target.clone();

		this.shadow = source.shadow.clone();

		return this;

	}

} );


export { DirectionalLight };

@@ -148,24 +148,21 @@
 D.js';%0A%0A
-function
+class
  Directi
@@ -174,72 +174,166 @@
 ight
-( color, intensity ) %7B%0A%0A%09Light.call( this, color, intensity
+ extends Light %7B%0A%0A%09constructor( color, intensity ) %7B%0A%0A%09%09super( color, intensity );%0A%0A%09%09Object.defineProperty( this, 'isDirectionalLight', %7B value: true %7D
  );%0A%0A
+%09
 %09thi
@@ -362,16 +362,17 @@
 ight';%0A%0A
+%09
 %09this.po
@@ -406,16 +406,17 @@
 ltUp );%0A
+%09
 %09this.up
@@ -426,24 +426,25 @@
 eMatrix();%0A%0A
+%09
 %09this.target
@@ -463,16 +463,17 @@
 t3D();%0A%0A
+%09
 %09this.sh
@@ -514,169 +514,17 @@
 );%0A%0A
-%7D%0A%0ADirectionalLight.prototype = Object.assign( Object.create( Light.prototype ), %7B%0A%0A%09constructor: DirectionalLight,%0A%0A%09isDirectionalLight: true,%0A%0A%09copy: function 
+%09%7D%0A%0A%09copy
 ( so
@@ -539,40 +539,19 @@
 %0A%0A%09%09
-Light.prototy
+su
 pe
+r
 .copy
-.call( this,
+(
  sou
@@ -593,25 +593,24 @@
 et.clone();%0A
-%0A
 %09%09this.shado
@@ -658,20 +658,16 @@
 ;%0A%0A%09%7D%0A%0A%7D
- );%0A
 %0A%0Aexport

Convert to ES6 class