the names that have been asked for, in creation order
drops every stream and re-bases future ones; existing streams are gone, not reset
the seed a stream was created from; undefined for one that has never been asked for
restores what getState wrote; a stream missing from state stays as it was
the stream named name, created from the base seed on first use and kept after that
Named, independent random streams over one base seed:
streams.stream('loot')andstreams.stream('ai:goblin-3')each get their own MT19937 position, so one consumer drawing more numbers never shifts another's results - the property a replay and a per-entity stream both need, and one a single shared generator cannot give.A stream is created on first use, from
baseSeed ^ FNV-1a(name), and then kept. Creating a stream later therefore does not disturb an existing one, which is what makes adding a new consumer reproducible rather than a change to every draw after it.Example