Construct a generator. With no seed it draws entropy from entropySeed; with a seed it is fully reproducible.
Optionalseed: string | number | number[]Optional string / number / four-word seed.
Snapshot the internal state so it can be restored with setState (e2e captures before an action, replays after).
A copy of the generator's state words — mutating it is safe.
Fully reset the stream to a known start (reset, not perturb). String
seeds hash through cyrb128, so seeding each unit test with its own name
gives an independent, reproducible stream for free.
A string, a single number, or the four state words directly.
xoshiro128**— the interchangeable alternative to the default sohl.entity.random.Sfc32Rng, behind the same sohl.entity.random.Rng interface. 128-bit state across four 32-bit words; excellent statistical quality with a well-scrambled output stage.All state is per-instance (no static or shared state), so it is reentrant and safe to run interleaved with any number of other generators.