RailsEpoch

interface RailsEpoch

The instant a coasting entity is propagated from, in its own frame.

An entity with one of these is on rails (ADR-0025): its state at any tick is the two-body propagation of this epoch by the elapsed time, a pure function that does not care whether the ticks between were stepped or jumped. That is what lets a frame run a hundred thousand ticks of a coast for the price of one, without giving up the bit-identity the fixed step promises.

Canonical, hashed and saved, for a reason that is not obvious: two worlds that agree on an entity's state and disagree on its epoch agree about the present and disagree about the future in the low bits, because each is propagating a slightly different rounding of the same conic. A save that dropped the epoch and re-anchored on load would continue almost identically, and "almost" is exactly what stateHash exists to catch.

simulation/src/entity.ts:46

Members

angularVelocityreadonly

angularVelocity: Vec3

Zero for a ship whose flight assist has settled it; otherwise the constant spin it carries, which the propagation applies analytically.

orientationreadonly

orientation: Quat

positionreadonly

position: Vec3

timereadonly

time: number

Simulation time the epoch state is taken at.

velocityreadonly

velocity: Vec3