Batch-loads multi-part models from a JSON manifest into a
SceneModel and an optional
DataModel, chunk by chunk.
Large BIM and CAD models routinely exceed any sensible single-file
limit — splitting them into geometry chunks (typically XGF) plus
matching semantic chunks (DataModel JSON) is the standard
delivery shape. ModelChunksLoader walks a manifest of those
chunks and applies the configured per-chunk loaders, populating
one SceneModel + DataModel pair end-to-end with no caller-side
orchestration.
sceneModelMIMEType chooses how chunks are fetched
("arraybuffer" for binary, "json" for text).
Features
One call loads the whole model — pass the manifest, the
baseDir, the target SceneModel + DataModel, and the loader
walks every chunk in parallel.
Pluggable per-chunk loaders — pass an
formats!XGFLoader | XGFLoader for geometry,
DataModelImporter
for semantics, or any other loader that implements
ModelLoader.
Geometry + semantics in lockstep — chunks share an ordering
so the loader emits SceneObjects
and DataObjects with matching
ids; picking and inspection see one coherent graph at the end.
Returns when everything's done — single Promise resolution
when every chunk has reached its target model.
xeokit Streaming Loader
Batch-loads multi-part models from a JSON manifest into a SceneModel and an optional DataModel, chunk by chunk.
Large BIM and CAD models routinely exceed any sensible single-file limit — splitting them into geometry chunks (typically XGF) plus matching semantic chunks (DataModel JSON) is the standard delivery shape.
ModelChunksLoaderwalks a manifest of those chunks and applies the configured per-chunk loaders, populating one SceneModel + DataModel pair end-to-end with no caller-side orchestration.Shape
Manifest shape
The manifest is a small JSON file pairing geometry chunks with the matching semantic chunks:
sceneModelFileslists the geometry chunks (XGF, glTF, …).dataModelFiles(optional) lists matching DataModel JSON chunks.sceneModelMIMETypechooses how chunks are fetched ("arraybuffer"for binary,"json"for text).Features
baseDir, the target SceneModel + DataModel, and the loader walks every chunk in parallel.Installation
Quick Start
1) Import the entry point
2) Construct with per-chunk loaders
3) Load a manifest