Members
constructor
- optionsWorldOptions
- Undocumented
catalogreadonly
clockreadonly
framesreadonly
galaxyreadonly
galaxySeedreadonly
rootSeedreadonly
seedTextreadonly
entitiesaccessor
The entities, to read. Every write is a verb on the world (EntityView).
structuresaccessor
Stable, immutable authored placements, including those in unloaded systems.
advance
Advance by wall-clock seconds. Returns the number of ticks actually run.
The only place real time enters the simulation, and all it decides is how many identical fixed steps to take — and how many of those may be taken one at a time.
- realSecondsnumber
- Undocumented
altitudeOf
- idEntityId
- Undocumented
binding
The binding governing a frame, walking up until one is found.
A ship in a surface frame is three levels below the body that is pulling on it, and this is what makes that work without registering a binding per landing site.
- frameFrameId
- Undocumented
bindingsUnder
- frameFrameId
- Undocumented
bodyAt
- frameFrameId
- Undocumented
canonicalEntities
Every entity as the facts that decide its next tick, in id order.
What a save captures and what the hash reads — one projection for both,
which is the whole reason CanonicalEntity exists. landed is in it
because it is the world's bookkeeping rather than the entity's, and the
entity alone cannot say.
canonicalPositionOf
- idEntityId
- Undocumented
contactHeight
Highest support above the body datum: the integrator's rails boundary, and the band above which a tick cannot touch anything on this body. Cached, because the integrator asks on every tick with a body binding and each answer is a terrain sample per placement.
- bodyBody
- Undocumented
contactRadius
Terrain and any placed support disk compete by height, never insertion order.
- bodyBody
- Undocumented
- directionBodyFixedDirection
- Undocumented
- terrainnumber
- Undocumented
ensureFrame
Re-create a frame from its id.
Surface frames are minted on landing rather than up front, so a save that has a ship parked on a planet refers to a frame that does not exist yet after a reload. Because terrain is a pure function of the seed, the frame can be regenerated exactly — which is the persistence model working as intended: store the reference, regenerate the content.
- idFrameId
- Undocumented
events
- limitnumber
- Undocumented
isCoasting
Whether an entity is coasting on rails rather than being integrated.
- idEntityId
- Undocumented
isLanded
- idEntityId
- Undocumented
killRotation
Zero the spin without disturbing the trajectory.
- idEntityId
- Undocumented
landedEntities
loadedSystems
loadSystem
- idSystemId
- Undocumented
moveStructure
A replacement is fully validated before the existing placement is touched.
- placementSurfacePlacement
- Undocumented
placeStructure
- placementSurfacePlacement
- Undocumented
previousState
- idEntityId
- Undocumented
reframeEntity
Move an entity into another frame without moving it in the universe.
removeCharacter
Release an on-foot avatar when control returns to its parked vessel.
- idEntityId
- Undocumented
removeStructure
- idstring
- Undocumented
restoreDynamicIdCounter
Restore the dynamic id counter after a load, so a replay issues the same ids.
- valuenumber
- Undocumented
restoreLanded
Restore internal bookkeeping after a load.
- idsreadonly EntityId[]
- Undocumented
runTicks
Run n ticks with no wall clock. Deterministic by construction.
- countnumber
- Undocumented
setCharacterFlightPermission
A session host reconciles restored privileges with its current authority.
- idEntityId
- Undocumented
- canFlyboolean
- Undocumented
setCharacterFlying
A host-granted capability is necessary even when callers bypass the HUD.
- idEntityId
- Undocumented
- flyingboolean
- Undocumented
setCharacterInput
- idEntityId
- Undocumented
- inputPartial<CharacterInput>
- Undocumented
setControl
The thrusters and the attitude. The throttle stays where it was.
setFlightAssist
- idEntityId
- Undocumented
- enabledboolean
- Undocumented
setThrottle
The main drive's throttle, 0..1, clamped there.
A setting rather than a held key: it stays where it is put until
something puts it elsewhere, which is what lets a burn outlast a hand on
the keyboard, a mode change and a save. Its own verb rather than a fourth
argument to setControl because the two are set by different acts — a
key edge writes the thrusters forty times a burn and never means to touch
the drive.
- idEntityId
- Undocumented
- throttlenumber
- Undocumented
spawn
- initEntityInit
- Undocumented
spawnCharacter
Put a suited character's feet on canonical support. Contact earns
groundedness. vessel is the ship it steps back into, and has to exist.
spawnShip
Spawn the debug spacecraft in a frame, at rest unless given a velocity.
The velocity is a spawn argument rather than a later write: a ship that begins in orbit, or falling, or inbound from interstellar space is spawned that way, so the interpolation history it is born with already describes that motion and nothing has to reach past the verbs to set it.
stateHash
A hash of everything canonical.
Two runs that agree on this agree on the universe. Used by the determinism tests, by the harness, and (later) as a desync check against a server.
angularVelocity, control and flightAssist are in here now. They were
not, and the docstring said "everything canonical" anyway, so two worlds
differing only in the fields that killRotation and flight assist write
hashed identically at the instant they diverged. That matters because it is
where a real bug already lived — a save taken mid-burn resumed coasting —
and the persistence test caught it only by stepping 300 further ticks and
letting the difference show up in position. This makes it detectable at the
tick it happens.
The rails epoch is in it for the same reason: two worlds that agree on a coasting entity's state and disagree on its epoch diverge on the next tick, in the low bits, and a hash that ignored the epoch would call them equal.
Which fields, exactly, is entityState.ts's decision and not this
method's: the line is written from CanonicalEntity, the same record the
save carries, so the hash cannot count a field the save drops or the
other way round. The thrust profile was that field — omitted here,
reduced to a boolean there — and two worlds with different drives hashed
equal until the first tick under throttle.
step
Advance exactly one fixed tick.
An entity on rails is evaluated from its epoch rather than integrated,
and its sphere-of-influence tests run only on a RAILS_CHUNK boundary —
the same instants #jump tests at, so that stepping and jumping agree.
structuresOn
The placements on one body, by its formatted address; empty for a body with none.
- bodyAddressstring
- Undocumented
system
- idSystemId
- Undocumented
teleport
Set an entity's state discontinuously.
Resets the interpolation history as well, which a plain update does not: the presentation layer lerps between the previous tick and this one, so a teleport without this smears the ship across the system for one frame. Only debug tooling should be calling it — nothing in normal play moves an entity without moving it.
- idEntityId
- Undocumented
- stateFrameState
- Undocumented
unloadSystem
- idSystemId
- Undocumented
updateInterest
Load systems near a point and unload ones that are far away.
Ordinary control flow, called every so often rather than at a mode boundary. Systems containing an entity are never unloaded.
- centerUniverseVector
- Undocumented
- radiusnumber
- Undocumented