fireball/lib/scenes/FogExp2.js

36 lines
594 B
JavaScript
Raw Normal View History

2018-12-25 13:59:22 +00:00
import { Color } from '../math/Color.js';
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
*/
function FogExp2( color, density ) {
this.name = '';
this.color = new Color( color );
this.density = ( density !== undefined ) ? density : 0.00025;
}
FogExp2.prototype.isFogExp2 = true;
FogExp2.prototype.clone = function () {
return new FogExp2( this.color, this.density );
};
FogExp2.prototype.toJSON = function ( /* meta */ ) {
return {
type: 'FogExp2',
color: this.color.getHex(),
density: this.density
};
};
export { FogExp2 };