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

readDrawnFlight

readDrawnFlight(world, ball): DrawnFlight | null

Where the player’s page draws ball, a flight body whose display names one, this frame: the tick drawn, its rate and its place, written in place, so read it at once, as a view’s frame callback does. Null for a ball drawn at the page’s own tick, and on a world that is no page’s.

Parameter Type
world World
ball Entity

DrawnFlight | null

const drawn = readDrawnFlight(world, ball); if (drawn) shadow.position.set(drawn.position.x, 0, drawn.position.z);