Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

readRoomSeconds

readRoomSeconds(world): number

The room’s clock in seconds, to the fraction of a tick: the tick her page steps over the steps a second, where a predicted command she sends now is stamped and the room runs it. A sound or a countdown scheduled against it plays in step with what she does: read it beside the audio context’s currentTime and schedule a cue at room second at for currentTime + at - readRoomSeconds(world). On the room and in a test, the tick it steps next, whole. Read it between steps, in a view or a frame callback: a system reads step.tick, which a correction’s re-run gives again.

Parameter Type
world World

number