Skip to content

five-on-it / apps/client/src/renderer/wreck-smoke / keptOutOfWater

Function: keptOutOfWater() ​

keptOutOfWater(kept, inWater, dt): number

Defined in: apps/client/src/renderer/wreck-smoke.ts:40

How much of its smoke (and fire) a car keeps, from 1 (all of it, out of water) to 0 (none, in water), dt seconds after it kept kept: in water it falls to none within DOUSE_SECONDS, out of it it comes back over a second and a half. The puffs and the flames already out live their lives, so the smoke thins away rather than vanishing.

Parameters ​

kept ​

number

inWater ​

boolean

dt ​

number

Returns ​

number