Skip to content

Commit

Permalink
Merge pull request #21232 from DefinitelyMaybe/ambientlight
Browse files Browse the repository at this point in the history
AmbientLight: Convert to ES6 Class
  • Loading branch information
mrdoob authored Feb 9, 2021
2 parents 536d729 + 2738713 commit 1fcd7ff
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/lights/AmbientLight.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import { Light } from './Light.js';

function AmbientLight( color, intensity ) {
class AmbientLight extends Light {

Light.call( this, color, intensity );
constructor( color, intensity ) {

this.type = 'AmbientLight';
super( color, intensity );

}

AmbientLight.prototype = Object.assign( Object.create( Light.prototype ), {
this.type = 'AmbientLight';
Object.defineProperty( this, 'isAmbientLight', { value: true } );

constructor: AmbientLight,
}

isAmbientLight: true

} );
}


export { AmbientLight };

0 comments on commit 1fcd7ff

Please sign in to comment.