xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
732 stars 290 forks source link

Update ObjectsMemento::StoreyViewsPlugin to restore only visibility #1709

Closed ijlal99 closed 1 month ago

ijlal99 commented 1 month ago

When invoking createStoreyMap function from StoreyViewsPlugin when there are more than one models on the screen, the object memento eventually eventually end up recolorizing all of the objects.

In our case, we had an ifc and a point cloud model on the screen, with createStoreyMaps being called for the ifc model only.

The point cloud model had _colorize set to default value of [255, 255, 255] and when objects memento restore the model's state, it ends colorizing the point cloud to true.

In this fix, I have updated ObjectsMemento to only restore visibility of the objects on the scene as StoreyViewsPlugin does not update any other property of the objects.