Fog.js 415 字节
Newer Older
1
/**
M
Mr.doob 已提交
2
 * @author mrdoob / http://mrdoob.com/
M
Mr.doob 已提交
3
 * @author alteredq / http://alteredqualia.com/
4 5
 */

6
THREE.Fog = function ( color, near, far ) {
7

A
alteredq 已提交
8
	this.name = '';
M
Mr.doob 已提交
9

10
	this.color = new THREE.Color( color );
11 12 13

	this.near = ( near !== undefined ) ? near : 1;
	this.far = ( far !== undefined ) ? far : 1000;
14 15

};
16 17 18 19 20 21

THREE.Fog.prototype.clone = function () {

	return new THREE.Fog( this.color.getHex(), this.near, this.far );

};