Babylon Lite Explorer

When you work with Babylon Lite scenes it is very important to know what is happening.

A compact (tarball 30kB) Preact explorer for Babylon Lite. The built-in adapter reads (and provides editing when possible) only documented public fields from @babylonjs/lite; it never probes underscore-prefixed or otherwise private engine state.

npm install babylon-lite-explorer

Demo:

Similar to Babylon Inspector, but Liter. Much lighter.

In the beginning only the part of available API is supported. The Babylon Lite quickly evolves and Explorer will grow as well (I hope).

GitHub - eldinor/babylon-lite-explorer: A small, public-API-only explorer for Babylon Lite. Similar to Babylon Inspector but Liter · GitHub

9 Likes

cc @ryantrem :slight_smile:

The latest Explorer in the Lite Playground - Babylon Lite Playground

2 Likes

So pretty, cc @ryantrem

Very cool! As you might imagine, we do plan to add support for Lite in Inspector as well. Any learnings so far that you’d like to see in Inspector?

In the Explorer the hardest boundary was avoiding private fields while still showing useful information through public API only.

The Lite typedoc could be improved a lot to be more clear for human users, especially in cases when the using of “a function” means that you need to use another function first in order to achieve the desired result.

In split-module environments, the app and Inspector can accidentally use different Lite module instances. It would be good to have the official way to bind to the exact Lite runtime used by the app.

Custom app diagnostics may need a supported way to register extra objects/nodes etc into Inspector (similar to custom extensions in Babylon.js Inspector).

Not sure that React Fluent is light enough for Lite. In Babylon.js Inspector it increases the build time and size significantly.

2 Likes

Updated to Lite 1.9.0

  • Upgraded the Babylon Lite peer and development dependency to 1.9.0.
  • Made scene image-processing exposure, contrast, and tone-mapping enabled state editable through Babylon Lite 1.9.0 setSceneImageProcessing().
  • Kept tone-mapping algorithm read-only after auditing Babylon Lite 1.9.0’s PBR shader caches; changing only the algorithm can reuse cached tone-mapping WGSL.