Introducing Viewer Lite

Hey everyone - as of 9.16.2, the Babylon Viewer now supports Babylon Lite! It’s provided via the same @babylonjs/viewer package, the only difference is you should import @babylonjs/viewer/lite instead of @babylonjs/viewer. The API is identical, so you should not need to change your code. The exception is for existing advanced use cases that access viewerDetails, as that exposes the underlying BJS API, and an equivalent does not exist in the Viewer Lite API yet.

In its current state, the Lite Viewer will typically have a download cost around 168kb (compressed JS) when loading and rendering a gltf (some small variation depending on gltf features). Half of that is the default PBR environment and BRDF base64 encoded into js files for convenience. If you want an even smaller footprint and are willing to host your own environment and BRDF, the size will be a bit smaller.

Much of the Viewer functionality is supported for Lite, but it is not complete yet, and there are more features that need work:

  • Shadows
  • SSAO
  • Environment blur and intensity
  • Suspend while idle
  • Formats beyond glft (e.g. splat)
  • Viewer details (underlying Lite state for deep Viewer customization)

Work will continue on Viewer Lite, and we’ll be sure to post updates here!

12 Likes