Updates to xbim Viewer

Updates to xbim Viewer

In the last few months, we had a chance to use the xbim viewer on some of our customers’ incredibly large and complex projects. While the models looked great when stationary, moving about the model was not as fast as we’d like it. So we’ve done some work to handle these mega models better using what we call “adaptive rendering”. Adaptive rendering is automatically on when you use the latest version, but you can switch it off.

Whilst working on our new adaptive rendering feature the team also updated some of our other features and functions.

mobile support fix

Some of our Toolkit users reported issues with the viewer in mobile web applications, so we took a closer look. We discovered that some mobile platforms have different implementations of the shader precision. This issue should now be fixed, if you’re viewing this on a mobile device you can take a look at our example here.

the helper function

As we were exploring various factors impacting the performance of the viewer we also implemented a helper function which you can use to isolate rendering-heavy objects. While this doesn’t help immediately, you can use it to provide some feedback to model authors. If you are just interested in the analytical data, you can use viewer.getProductAnalysis() function to take a view. 

locked orbit view

While we improved the navigation in the latest version of the viewer, we lost the ability to keep the rotation origin fixed on a certain point. However, this turns out to be useful when you want to focus on something (say a nice lamp) and allow the user to rotate around it. This function is now a new navigation mode called ‘locked-orbit’. When you want to pinpoint the rotation to a specific product you can use viewer.setLockedOrbitOrigin() to set that point. See our live example in detail here.


Last but not least, based on community requests we’ve put in a new function which makes it easy to place any arbitrary HTML markup over the viewer on top of a specific object/product. The result of viewer.getHTMLPositionOfProductCentroid() will give you all you need to set the position for your great floating HTML. Get more details on this feature here.