rgb(r: number, g: number, b: number) → void
| arg | type | description |
|---|
| r | number | |
| g | number | |
| b | number | |
defineSky( ) → void
Register the `tsukimichi` sky look with worldClockKit (once per machine).
hourAt(solar: number) → number
The clock hour (today) at a solar hour, from today's sunrise and sunset.
| arg | type | description |
|---|
| solar | number | |
driveClock(name: string, seconds: number) → void
Take the clock to a mood's hour over `seconds` (0 = at once), paused there. Only the clock's authority moves the clock; every machine follows it.
| arg | type | description |
|---|
| name | string | |
| seconds | number | |
step(dt: number) → void
Advance a running clock blend (call every frame on the authority).
| arg | type | description |
|---|
| dt | number | |
totalAtSolar(solar: number) → number
the clock's total hours on the mood day at a solar hour
| arg | type | description |
|---|
| solar | number | |
localEnv(solar: number) → any
| arg | type | description |
|---|
| solar | number | |
presetAt(solar: number, key: string, default: number) → number
a preset value at a solar hour, blended between the moods either side of it
| arg | type | description |
|---|
| solar | number | |
| key | string | |
| default | number | |
shape(env: any, solar: number?) → any
The shrine's light on top of the clock's at a solar hour: the fill scaled per mood (`fill`) and the moon held at least `moonMin` degrees up. Returns a new table; `env` is left as it was.
| arg | type | description |
|---|
| env | any | |
| solar | number? | |
hook(dt: number, env: any) → void
| arg | type | description |
|---|
| dt | number | |
| env | any | |
setLocal(name: string, seconds: number?) → void
Show a mood on this machine only, over `seconds`: the sun, moon, sky, light and fog follow a local hour; the shared clock is untouched.
| arg | type | description |
|---|
| name | string | |
| seconds | number? | |
install( ) → void
Put the shrine's light (fill and moon, see `Moods.shape`) on top of the clock on this machine, every frame the clock lights the scene. Called by the component's build; safe to call again.
uninstall( ) → void
Stop shaping the clock's light (the shrine is gone).
followShared(seconds: number?) → void
Slide this machine's view back to the shared clock over `seconds` (0 = at once) and stop overriding it.
| arg | type | description |
|---|
| seconds | number? | |
isLocal( ) → boolean
Whether this machine is showing a local mood rather than the shared clock.