-- RAIN
-- drefs
dr_f("rain_percent", "sim/weather/rain_percent")
dr_f("airspeed_kts_pilot", "sim/cockpit2/gauges/indicators/airspeed_kts_pilot")

--anim constants
local MAX_RAINDROPS = 100                                    -- Max raindrops we show at heavy rain
local MAX_LIFETIME = 600                                     -- Max raindrop lifetime (frames) then it dies and gets replaced by a new drop
local VERTICAL_VECTOR_THRESHOLD = 40                         -- Vertical vector threshold for speed 0 to get drops going down (gravity)
local raindropsCount = get(rain_percent) * MAX_RAINDROPS          -- How many raindrops we show on a windshield per frame
local raindropsCountSparse = get(rain_percent) * MAX_RAINDROPS/3  -- How many raindrops we show on a windshield per frame (for small triangle window)

local raindropImages = {loadImage('raindrop1.png'),loadImage('raindrop2.png'),loadImage('raindrop3.png')}
local raindropsCount = get(rain_percent) * MAX_RAINDROPS
local raindropsCountSparse = get(rain_percent) * MAX_RAINDROPS/3
-- /RAIN