Skip to content

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

apps/client/src/renderer/wreck-smoke ​

A wreck's smoke, every frame, for every wrecked car on screen (the player's and everyone else's), for as long as the wreck is there: a plume of dark puffs (effects.ts) rising out of its engine bay (the front of a front-engined car, behind the cabin of a mid-engined one, the back of a rear-engined one: the class says), billowing out as it climbs and drifting off on the wind. It is thick and black at first and settles, over the first THICK_SECONDS, into a thinner grey; a wreck seen for the first time already wrecked (driven up to, or come on screen) smokes as an old one does. Nothing like the tyres' smoke, which is light grey, low, wide and gone in a second and a half. The wrecks are remembered by car, and forgotten a minute after one was last seen; cars off screen are not handed in, so they cost nothing. A wreck in water (CarView.inWater) does not smoke: driven or sunk into it, its plume dies away within DOUSE_SECONDS (the puffs already out drift off and fade as puffs do), and it comes back only once the wreck is out of the water (keptOutOfWater).

Variables ​

Functions ​