ReadonlyextensionExtension of the files it reads.
Optional ReadonlyworkerWorkers to read with, each one file at a time; default: the cores but one, at most the
scene's settings.loading.maxWorkers.
Resolves once meshoptimizer's decoder is compiled, which open needs.
One of its workers, on this module.
Opens a .mgeom file: reads its header and materials, indexes its geometries. Throws when the decoder is not ready yet (see ready).
Downloads a .mgeom file and opens it (see open), once the decoder is ready.
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.
Reader of the .mgeom files (
schema/maquette-geom.fbs, format 1), for the engine'sMeshLoader: it reads in workers on this module (seeFileReader). One InputMesh per representation of an object: its uuid is the object id (the key of its .mdata), its name the object type, its tag the representation ('3D' or '2D'), one part per .mgeom part of its 3D mesh, or of its 2D meshes (whatever their projection axis, together); its SVG meshes are left out.The geometry buffers are compressed with the meshoptimizer codecs, or raw: a geometry is decoded at its first use, into buffers the engine's
MeshControllerthen copies into its Containers. The positions are dequantized to float32. A geometry of lines only (no triangles, its edges the lines) is read as lines (primitive'lines'). The file has no BVH: the controller builds one on the first raycast.