Skip to content

1681-engine / pixel / paintWeatherArt

Function: paintWeatherArt() ​

ts
function paintWeatherArt(
   textures, 
   colors?, 
   prefix?
): Record<"rain" | "snow" | "ash" | "fog", WeatherLook>;

Defined in: src/pixel/weatherArt.ts:75

Paints a set of weather in whole world pixels, flat colours and never a soft glow (a rain streak is the size of a pixel of the roof it falls past; light from the up-left, so a flake's lit pixel is its top-left one), and returns looks ready for WeatherLayer: rain, snow, ash (with an ember now and then) and fog. Painted once; a key already in the registry is kept.

Parameters ​

ParameterTypeDefault value
texturesTextureRegistryundefined
colorsPartial<WeatherColors>{}
prefixstring'wx_'

Returns ​

Record<"rain" | "snow" | "ash" | "fog", WeatherLook>

Released under the MIT License.