function findWorlds
universe/src/worldQuery.ts:214
findWorlds(rootSeed: Seed, galaxy: GalaxyId, stubs: readonly SystemStub[], query: WorldQuery, from: UniverseVector, canceled: () → boolean) → readonly WorldMatch[]
Walk a list of systems, generating each, and return what matches.
The stubs are an argument rather than a sweep, and that is what makes this divisible: a caller cuts the volume into batches, hands each to its own job, and shows the answers as they arrive rather than after the last one. It is also what keeps the catalog out of the worker — a stub is what the caller already resolved, so nothing here needs a 200 KB table to answer with.
canceled is polled per system rather than per body, because a system is a
millisecond and a body is microseconds: that bounds the wasted work without
the check costing more than the work it is guarding.
- rootSeedSeed
- Undocumented
- galaxyGalaxyId
- Undocumented
- stubsreadonly SystemStub[]
- Undocumented
- queryWorldQuery
- Undocumented
- fromUniverseVector
- Undocumented
- canceled() → boolean
- Undocumented
Returnsreadonly WorldMatch[]