|
@@ -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 };
|