Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / EnvironmentFogState

Type Alias: EnvironmentFogState ​

ts
type EnvironmentFogState = {
  type: EnvironmentFogType;
  color: string;
  linear: {
     near: number;
     far: number;
  };
  exponential: {
     density: number;
  };
};

Defined in: components/Environment.ts:49

Fog configuration. Mirrors three.js Fog / FogExp2.

Properties ​

PropertyTypeDescriptionDefined in
typeEnvironmentFogTypeActive fog model.components/Environment.ts:51
colorstringFog color as #rrggbb.components/Environment.ts:53
linear{ near: number; far: number; }Linear-fog parameters used when type is "linear".components/Environment.ts:55
linear.nearnumberDistance at which fog begins to take effect.components/Environment.ts:57
linear.farnumberDistance at which fog reaches full opacity.components/Environment.ts:59
exponential{ density: number; }Exponential-fog parameters used when type is "exponential".components/Environment.ts:62
exponential.densitynumberDensity coefficient. Higher values produce thicker fog.components/Environment.ts:64