sengokuTownKit.package
This package holds more than this page lists. See all of its files in its world.
README.md
Atmos
The castle town's time of day, weather, ambience and night lighting. The time runs on worldClockKit's shared clock, the weather on Cloudburst, and the sound on soundstage. Atmos.setTime(name, hold) sets dawn (06:30, half an hour after sunrise, with clear weather shown as mist), day (12:30) or festivalNight (21:30) for every player through worldClockKit's Clock. Atmos.setWeather(name) sets clear, mist, rain or storm for every player through Cloudburst (cloudburst.weather): clear is Cloudburst's clear_day, mist is misty_dawn, rain is steady_rain and storm is night_storm_town (the map is Atmos.CLOUDBURST). Cloudburst draws the falling rain, splashes, eave drips and lightning, wets the surfaces and plays the rain and thunder, muffled under roofs. The rain follows the town look: toon draws Cloudburst's cartoon rain and ink its woodblock rain (Atmos.RAIN_LOOK); Atmos.cloudburstFor(weather, time, look) answers the settings any combination comes to. Atmos.ensureWeather() uses the scene's Cloudburst weather or creates one (temporary, synced, by the host) when there is none; Atmos.ensureClock() does the same for the WorldClock, and the clock's own rain, lightning and weather sound are turned off so nothing is drawn or heard twice. getTime, getWeather and darkness() (worldClockKit's timeofday, darkened by a storm) read them back. Each frame it picks the soundstage ambience bed (the kit's town day, town dawn or festival beds, or soundstage's own night) and places ambience zones over the paddies and the temple precinct; the kit's own rain-on-the-roofs bed plays only when the scene's Cloudburst weather has its sound off. At night it turns on sengokuMaterials' lantern and screen glow (SengokuMaterials.setGlow) and stands up to 20 flickering point lights at the lanterns nearest the camera. Atmos.ringBell() plays the temple bell at the bell tower. start, update, stop, running and report are its lifecycle, driven by the TownAtmosphere component; start also installs Footsteps.