xeokit-sdk
xeokit-sdk copied to clipboard
TreeViewPlugin: inconsistent showing of added federated models
Describe the bug
When adding an XKT version of the federated IFC model to the TreeViewPlugin with treeViewPlugin.addModel(123, { rootName: 'Filename' })
, not all of them are shown.
To Reproduce
const viewer = new Viewer({
canvasId: 'viewer',
transparent: true,
pickSurfacePrecisionEnabled: true,
saoEnabled: true,
});
const xktLoader = new XKTLoaderPlugin(viewer, {
reuseGeometries: false,
maxGeometryBatchSize 50000000 / 2,
});
const objectsTreeView = new TreeViewPlugin(viewer, {
containerElementId: 'tree-view',
hierarchy: "containment",
autoAddModels: false,
autoExpandDepth: 3,
pruneEmptyNodes: false,
});
Then add models one by one:
const model = xktLoader.load({
id: FILENAME
src: SRC,
edges: true,
});
objectsTreeView.addModel(model.id, { rootName: FILENAME });
As result, the models that were loaded into the viewer with XktLoader and added to the treeViewPlugin are not displayed there
Expected behavior Adding each model to the treeview should display it in the plugin separately.
Screenshots
Models shown:
Models loaded:
Desktop (please complete the following information):
- OS: any OS
- Browser: Chrome
- Version: 129.0.6668.70 (Official Build) (arm64)
Additional context Previously this was working fine. XKT files used to reproduce the issue: Archive.zip