playcanvas
Version:
PlayCanvas WebGL game engine
49 lines (48 loc) • 1.26 kB
TypeScript
/**
* Fog parameters.
*
* @category Graphics
*/
export class FogParams {
/**
* The type of fog used by the scene. Can be:
*
* - {@link FOG_NONE}
* - {@link FOG_LINEAR}
* - {@link FOG_EXP}
* - {@link FOG_EXP2}
*
* Defaults to {@link FOG_NONE}.
*
* @type {string}
*/
type: string;
/**
* The color of the fog (if enabled), specified in sRGB color space. Defaults to black (0, 0, 0).
*
* @type {Color}
*/
color: Color;
/**
* The density of the fog (if enabled). This property is only valid if the fog property is set
* to {@link FOG_EXP} or {@link FOG_EXP2}. Defaults to 0.
*
* @type {number}
*/
density: number;
/**
* The distance from the viewpoint where linear fog begins. This property is only valid if the
* fog property is set to {@link FOG_LINEAR}. Defaults to 1.
*
* @type {number}
*/
start: number;
/**
* The distance from the viewpoint where linear fog reaches its maximum. This property is only
* valid if the fog property is set to {@link FOG_LINEAR}. Defaults to 1000.
*
* @type {number}
*/
end: number;
}
import { Color } from '../core/math/color.js';