navigationWorker beta
Function of @v12-engine/engine
export declare function navigationWorker(given: NavigationWorkerLike | (() => NavigationWorkerLike), workers?: number): NavigationBuilder;A builder that builds in a worker: one whose file serves builds (serveNavigationBuilds). In a page, the page makes the worker, as its bundler wants it: the library makes no worker of its own there.
A worker's file of two lines (serveNavigationBuilds imported from the engine, and called), and the page: navigationWorker(() => new Worker(new URL('./navigation.worker.ts', import.meta.url), { type: 'module' })), the builder of every world it makes (NavigationBuilds). Given as a function, the worker is made at the first build: a page whose menu builds nothing fetches none of it until a world is made (OF2); given made, it is used as it is. Given as a function, as many as workers are made as builds are asked at once (a world's navigations, one for each size of unit, the water's, each side's: built side by side, the Well's four in the time of its longest), each build to the one with the fewest under way