Spaces:
Running
Running
File size: 621 Bytes
6cd9596 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
*/
import { Color } from '../math/Color.js';
function Fog( color, near, far ) {
this.name = '';
this.color = new Color( color );
this.near = ( near !== undefined ) ? near : 1;
this.far = ( far !== undefined ) ? far : 1000;
}
Object.assign( Fog.prototype, {
isFog: true,
clone: function () {
return new Fog( this.color, this.near, this.far );
},
toJSON: function ( /* meta */ ) {
return {
type: 'Fog',
color: this.color.getHex(),
near: this.near,
far: this.far
};
}
} );
export { Fog };
|