three
Version:
JavaScript 3D library
35 lines (20 loc) • 494 B
JavaScript
import { Color } from '../math/Color.js';
function FogExp2( color, density ) {
this.name = '';
this.color = new Color( color );
this.density = ( density !== undefined ) ? density : 0.00025;
}
Object.assign( FogExp2.prototype, {
isFogExp2: true,
clone: function () {
return new FogExp2( this.color, this.density );
},
toJSON: function ( /* meta */ ) {
return {
type: 'FogExp2',
color: this.color.getHex(),
density: this.density
};
}
} );
export { FogExp2 };