AbstractAbstract ReadonlyextensionExtension of the files it reads, without the dot (e.g. mgeom); any case.
Optional ReadonlyworkerWorkers to read with, each one file at a time; default: the cores but one, at most the
scene's settings.loading.maxWorkers.
AbstractcreateMakes one of its workers, on its own module (see the class): the engine calls it at the first file, for each worker of the reader.
AbstractreadReads the file at url, in a worker: downloads it (e.g. with fetchFile), reads its
header; its objects come with meshes(). Rejects when it is not of this format.
StaticserveIn a worker made by createWorker, makes a reader of this class (no constructor argument) and reads the files the engine sends it. Called at the bottom of the reader's module: does nothing on the main thread.
Optionalscope: LoadingScopeWhere the files come from; default: the worker's global scope, when in one.
Reads the files of one format (one extension) into InputMeshes, the engine's input: what an application gives the MeshLoader (
addFileReader). A reader wraps its workers: the application only writesread, run in the workers, and the line making a worker on its own module, so that it writes no worker script:The engine does the rest: it makes the workers at the first file, sends them the files, one at a time each. For a file, a worker answers the download progress, the header (object count), then its objects in batches of the scene's
settings.loading.batchMeshesobjects orsliceMsof reading at most (sent with the file), their buffers transferred (each geometry once per file).