Keep the inputs.
A checkpoint is only useful when the inputs after it can be replayed. This worker owns a fixed-tick command log, restores a checkpoint, and re-applies the same events to prove the resulting world bytes match.
Creating the main-thread scene while the worker loads deterministic Rapier...
- physics
- -
- bodies
- -
- checkpoint
- -
- transfer
- -
- events
- -
- replay
- -
- step ms
- -
- fps
- -
The worker is loading deterministic Rapier. Once ready, the selected index will address one fixed-tick body command.
event.tick = simulationStep + 1schedule the next fixed tickworld.step()apply queued inputs before steppingworld.takeSnapshot()capture a checkpoint payloadWorld.restoreSnapshot(bytes)rebuild the worker worldreplay(events, from, to)replay only post-checkpoint inputspostMessage(bytes, [buffer])transfer checkpoint stateThe log records semantic commands with fixed ticks, not rendered frames. Replay restores the checkpoint, replays events through the original target tick, and compares the resulting serialized world bytes with the uninterrupted branch.
The worker is loading deterministic Rapier. Restored body order will remain mapped to these instance slots.
Based on the official Three.js worker guidance, Rapier serialization guide, determinism guide, World API, and InstancedMesh docs. Measurements are local browser evidence, not a universal rollback or networking claim.