Fog

new Fog({ color?, near?, far? })
THREE: THREE.Fog

Linear depth fog. Blends fragment colors toward a configurable color based on camera-space depth. Objects at near are unaffected; objects at far are fully fogged.

Differs from THREE.js

Constructor takes an options object { color, near, far }, not positional parameters.

Properties

NameTypeDescription
color

Color

Fog color. Defaults to black (0x000000). Also used as the framebuffer clear color.

near

number

World-unit distance where fog starts. Default 1.

far

number

World-unit distance where fog reaches full density. Default 100.

Methods

MethodDescription
clone(): Fog

Returns a new Fog with the same color, near, and far.