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:28

Fog configuration. Mirrors three.js Fog / FogExp2.

Properties

PropertyTypeDescriptionDefined in
typeEnvironmentFogTypeActive fog model.components/Environment.ts:30
colorstringFog color as #rrggbb.components/Environment.ts:32
linear{ near: number; far: number; }Linear-fog parameters used when type is "linear".components/Environment.ts:34
linear.nearnumberDistance at which fog begins to take effect.components/Environment.ts:36
linear.farnumberDistance at which fog reaches full opacity.components/Environment.ts:38
exponential{ density: number; }Exponential-fog parameters used when type is "exponential".components/Environment.ts:41
exponential.densitynumberDensity coefficient. Higher values produce thicker fog.components/Environment.ts:43