mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-27 13:56:03 +10:00
This buggy pattern ("something = parameter || nonzero value") exists at more places though elsewhere setting to zero doesn't make that much sense (e.g. in geometries).
Not sure if we should change it everywhere to proper pattern ("something = ( parameter !== undefined ) ? parameter : value").
Maybe it would be good for establishing habit. I remember fixing this buggy pattern long ago but it just keeps popping up.
14 lines
279 B
JavaScript
14 lines
279 B
JavaScript
/**
|
|
* @author mr.doob / http://mrdoob.com/
|
|
* @author alteredq / http://alteredqualia.com/
|
|
*/
|
|
|
|
THREE.Fog = function ( hex, near, far ) {
|
|
|
|
this.color = new THREE.Color( hex );
|
|
|
|
this.near = ( near !== undefined ) ? near : 1;
|
|
this.far = ( far !== undefined ) ? far : 1000;
|
|
|
|
};
|