Readonlyangular§23 angular damping coefficient.
ReadonlyangularRadians per second (§23); only Z is meaningful in a "2d" world (§21).
Readonlyanimation§19 animated share of a "blended" pose.
Readonlyccd§31 continuous-collision method.
Optional Readonlyccd§31 speculative prediction distance, when the body authored one.
Optional ReadonlycenterLocal-frame centre of mass (§23), present only when authored.
Readonlygravity§23 multiplier on world gravity.
Optional ReadonlyinertiaNine column-major elements (§23), present only when authored.
Readonlylinear§23 linear damping coefficient.
ReadonlylinearMetres per second (§23), refreshed from the solver every step.
Optional ReadonlymassKilograms (§23), present only when the mass was authored.
Readonlyphysics§19 solver share of a "blended" pose.
Optional ReadonlypositionThe initial world position a descriptor carried (§37), when it did.
Optional ReadonlyrotationThe initial world rotation a descriptor carried (§37), when it did.
Optional Readonlysleeping§32 sleep state as diagnostics only — written by this serializer, never read by it.
Recorded so a saved document says whether the body was simulating, and
deliberately not applied on load: sleep is solver state (§34), and
RigidBody.sleeping is read-only precisely because only a solver report may
change it (§23, §32). It earns its bytes when a §79 document is read beside
a §34 snapshot of the same moment — "this body reloaded awake because it was
asleep when saved" is otherwise unanswerable from the document alone.
Optional on the read side (decision, 2026-08-07). The write side always
emits it, so every document this build produces carries it and no existing
file's bytes moved; the type says ? because deserialize ignores the
field entirely, so a hand-written or foreign document that omits it is
perfectly valid and must not be described as malformed. The alternative
considered — dropping the field — would have changed the bytes of every
rigid-body document to save nothing that anyone reads a document for.
Optional ReadonlyspaceThe §8 space the body is solved in, present only when it is not
"world" (PH-12).
Absent is the default, so every document written before PH-12 reloads
unchanged and a "world" body still writes no field. It round-trips even
though PhysicsWorld.addBody refuses every non-"world" value: dropping
it would turn a body a world refuses into one it silently accepts after a
save-and-reload, which is the class of lie §79's authoredness rules exist
to prevent.
Readonlytype§22 simulation model. Required: there is no default body type.
The document RIGID_BODY_SERIALIZER writes — named so a reader can see the shape without decoding the two functions below.
The optional members are exactly the state §23 lets a body leave to the solver, plus the initial pose §37 lets a descriptor carry; every one of them is written when, and only when,
RigidBody.toDescriptor()emits it. See the module header for the authoredness rule that makes that the interesting property of this record.