five-on-it / apps/client/src/renderer/lasers-view
apps/client/src/renderer/lasers-view
The marksmen's lasers (GAME_DESIGN §12 at seven stars: a rooftop sniper's, the helicopter door gunner's): the tell before every round. While the police's tells (police frames) list a laser on the player, a thin red beam runs from the marksman (where the client draws them, else where the tells say they are) to the player, with a red dot where it lands, both brighter and thicker as its second and a half runs on (laserIntensity), the round coming at its end.
LaserClock keeps when each laser first appeared, so the view knows how far into its hold it is and the game plays the warning tone once for each new one. A beam is a thin instance of one box that adds its colour to the scene's (composeBeam, which the police's fittings' cable uses too): every laser of a frame costs one draw.