approach()
Move value towards target by at most rate dt, never past it. For accumulating state.
function approach(
value: number,
target: number,
rate: number,
dt: number
): number;Defined in: engine/src/atmosphere/weather.ts:152
Parameters
| Parameter | Type |
|---|---|
value | number |
target | number |
rate | number |
dt | number |
Returns
number
@voxolith/engine/atmosphere
@voxolith/engine/atmosphere: time of day and weather, as configuration.
atmosphereFrame()
Lighting and the renderer's atmosphere settings for one frame: overcast dims and flattens the key light and greys the sky (keeping the night dark), fog takes the horizon's colour, wind tilts the rain and snow and drives the clouds and the water. With a clear atmosphere the lighting passes...