Hey everyone - we are working on a new Babylon Viewer and are already publishing (to npmjs) preview packages. The aim of the Babylon Viewer is to make it dead simple to add a great model viewing experience to your app (web or native). Check out the blog post for more background, and the readme for steps to try it out! Note that “alpha/preview” means the API is not yet stable, but the implementation is intended to be production quality.
We’ll use this thread to give some more detail on the features we have in mind (organized by the design principles described in the blog post) along with an indication of which ones have been completed (we’ll keep it up-to-date!). Please share any thoughts you have directly in this thread in terms of what features from the list below are most important to you, and any features you think should be added!
Easy to Integrate
JavaScript layer that is framework agnostic (can be used with web frameworks like React or even with Babylon Native)
HTML Web Components / Custom Element layer for easy integration directly in HTML
Custom element manifest (for simpler integration when using tools like VSCode)
Provide a “configurator” tool with UI to help setup the viewer (including annotations), show a live preview, and provide code snippets
Other framework integrations, such as React (maybe)
Inspector support
Compact
Defer loading (via dynamic imports) loaders (e.g. gltf, obj, stl, splat), glTF extensions, and features (e.g. animation, audio, etc.) until they are needed.
Statically import only what is always needed
Tooling to help understand and improve bundle size
Automated tooling to detect size regressions
Flexible
Default UI (in HTML custom element) can be customized through CSS variables, parts, and slots.
Support all model formats and glTF extensions that are supported by Babylon.
Formally expose Babylon constructs like the Scene
, AssetContainer
, etc.
Support some form of usd/z (big maybe )
Compatible with Babylon Native
Configurable camera auto orbit
Configurable animation auto play
Modern
Provide an ESM dist for direct usage in html
Support WebGPU (with snapshot rendering mode)
Use environment for IBL, otherwise fallback to standard lighting
Use environment for skybox
Allow skybox to be configured independent of environment
Support annotations
Support WebXR
Support QuickLook
Configurable shadows
Configurable tone mapping
Easy to Use
Viewer is accessible (keyboard interactions, screen readers, color contrast).
Default camera framing that takes into account animation
Interpolate/animate camera pose reset
Interpolate/animate camera for manual pose changes
Default UI for selecting, playing, and scrubbing animations
Default UI for loading progress
Default UI for material variants
Pause render loop by default when no animations are playing and camera is stationary
Pause render loop by default when the viewer canvas is not in view
Interaction hints
Gracefully handle page scrolling vs. camera orbit (for pointer input)
Full screen mode
Placeholder image (while loading)