2
0

FogExp2.js 438 B

12345678910111213141516171819202122232425262728293031323334
  1. import { Color } from '../math/Color.js';
  2. class FogExp2 {
  3. constructor( color, density = 0.00025 ) {
  4. this.name = '';
  5. this.color = new Color( color );
  6. this.density = density;
  7. }
  8. clone() {
  9. return new FogExp2( this.color, this.density );
  10. }
  11. toJSON( /* meta */ ) {
  12. return {
  13. type: 'FogExp2',
  14. color: this.color.getHex(),
  15. density: this.density
  16. };
  17. }
  18. }
  19. FogExp2.prototype.isFogExp2 = true;
  20. export { FogExp2 };