Skip to content

Commit bb5cfde

Browse files
committed
DirectionalLightShadow: Convert to ES6 class
1 parent 14f2163 commit bb5cfde

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
import { LightShadow } from './LightShadow.js';
22
import { OrthographicCamera } from '../cameras/OrthographicCamera.js';
33

4-
function DirectionalLightShadow() {
4+
class DirectionalLightShadow extends LightShadow {
55

6-
LightShadow.call( this, new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );
6+
constructor() {
77

8-
}
9-
10-
DirectionalLightShadow.prototype = Object.assign( Object.create( LightShadow.prototype ), {
11-
12-
constructor: DirectionalLightShadow,
13-
14-
isDirectionalLightShadow: true,
8+
super( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );
159

16-
updateMatrices: function ( light ) {
17-
18-
LightShadow.prototype.updateMatrices.call( this, light );
10+
Object.defineProperty( this, 'isDirectionalLightShadow', { value: true } );
1911

2012
}
2113

22-
} );
23-
14+
}
2415

2516
export { DirectionalLightShadow };

0 commit comments

Comments
 (0)