Log inGet started
World

Tsukimichi: The Lantern Stair

Branchmain
Branchesmain
Commit82f5976b05

README.md

clock

How dark it is now (0 full day .. 1 night), read from the scene's worldClockKit WorldClock when there is one, so drifting air follows the time of day. worldClockKit is optional: the module finds a WorldClock component on any scene entity, loads that copy's timeofday module by name and asks darkness(). With no WorldClock it answers nil and nothing follows the clock.

The Drift component (followClock = "auto") and api.start(style, { followClock = "auto" }) call it: night styles (fireflies, glowSpores, lanternSparks) fade in at dusk and out at dawn, day styles (dustMotes, pollen, cherryPetals) the other way, and glowing styles brighten as it gets dark.

local Clock = require("ambientDrift.clock")
print(Clock.darkness())   -- 0..1, or nil with no WorldClock in the scene