Introducing Babylon Lite

shark-raw-module.zip (2.5 KB)

One warning though: because you are not using bundler you will not treeshake with that approach :frowning:

1 Like

I created a simple glTF viewer and tested it.

https://cx20.github.io/gltf-test/examples/babylonjs-lite/index.html

It seems the reason Fox doesn’t display is because the glTF model doesn’t use indexing.

Below is a simplified sample.

Triangles using indexing can be displayed.

https://cx20.github.io/gltf-test/examples/babylonjs-lite/index.html?url=https://cx20.github.io/gltf-test/tutorialModels/Triangle/glTF/Triangle.gltf

Triangles not using indexing cannot be displayed.

https://cx20.github.io/gltf-test/examples/babylonjs-lite/index.html?url=https://cx20.github.io/gltf-test/tutorialModels/TriangleWithoutIndices/glTF/TriangleWithoutIndices.gltf

on it!

do you have a link to the fox model?

ok ignore me I did not see the gltf files :wink:

Thanks for the repro!

1 Like

https://cx20.github.io/gltf-test/sampleModels/Fox/glTF/Fox.gltf
https://cx20.github.io/gltf-test/sampleModels/Fox/glTF-Binary/Fox.glb

I’m a bit confused about the consumption story.

From what I can see, Babylon-Lite has a packages/babylon-lite workspace package, but I can’t find a published npm package at https://www.npmjs.com/package/babylon-lite.

Is the intention to publish Babylon-Lite as an npm package that consumers can install directly, similar to babylonjs or three?

Or is the expected workflow that consumers clone/build Babylon-Lite from source and include a custom build in their own project depending on their needs?

If it is the latter, what is the recommended way to include it in an external project?

Right there:
https://www.npmjs.com/package/@babylonjs/lite

1 Like

here we are:
fix: support non-indexed glTF primitives by deltakosh · Pull Request #239 · BabylonJS/Babylon-Lite

Congratulations on the release! I’m super excited about this.

I think your performance-first approach is fantastic. Some of the old APIs felt a bit unnatural to use for the sake of compatibility, so rewriting them is a very welcome change—not just for performance, but also for code clarity and ease of implementation.

Anyway, I can’t wait to start migrating my own projects to “lite” right away. If I notice anything along the way, I’ll be sure to share some feedback.

Cheers to an amazing framework!

2 Likes

amazing work, this is absolutely massive, my dreams have come true!

1 Like

You gonna get XR on there?

Of course! @RaananW is also on it

3 Likes

There was a holdup at the WebGPU spec last I heard.

hey, so i’m starting to dig into this tonight!

  1. where should we leave feedback?
  2. are there any docs for “basic usage” or “best practices”? eg, “install this npm package” and “here’s how to think about setting up scenes, loading resources, and interacting with the scene graph”?
  3. how do i clone a mesh or transform node hierarchy? if it’s ‘data-driven’ can i do something like the browser builtin structuredClone(mesh), or maybe no because we need the engine to upload stuff to the gpu?
  4. how do i instance a mesh? i only see thin instances, is that now the only way? in the past i used parentNode.instantiateHierarchy() to instance my props from an asset container into the scene as needed…
  5. can i load a GLB file into the engine (uploaded into the gpu?) but keep all of the meshes and visuals hidden, then only create instances of the props that i need? in the past i had used node.setEnabled(false) to hide things until they were needed, and i have an object-pooling mechanism to coordinate the reuse of such instances – does the new babylon lite design invalidate the need for me to do that bookkeeping?

i’d really love to see a kind of “general explainer” for the philosophy of the design of the developer experience for what babylon lite is supposed to look like – how am i supposed to think of the new scene graph, and what’s an efficient way for me to load some GLBs and populate my scene with prop instances from those GLBs?

very excited about this release! i’m going to start integrating this into my upcoming game this week. thanks!

This is absolutely amazing! :exploding_head: and imo the right approach for that BJS X project you surfaced a while back. Kudos to the whole team for a great strategy and what looks like an amazing execution. :raising_hands:

Personal preference I guess but I love to see the API move towards a more functional style :smiling_face:.

I’d love to try it out on Smplrspace. Sharing preliminary thoughts in case that’s useful, what would help get going is:

  1. a “live” list of features from BJS with dropped / ported / in progress / future status :backhand_index_pointing_right: I’d point Claude at it to figure out if I can even start (I think you have plans for that)
  2. a brief or MCP tool or skill, made for agents, to do the heavy lifting :backhand_index_pointing_right: having this authored by the team and community driven could be saving lots of tokens to us all, and i’m sure you’d dogfood it.

You folks rock!

Is supporting right-handed coordinate system planned, or would that add too much bloat?

I’m also curious how best to handle granular asset loading and load progress without AssetsManager - just rely on the already supported format loaders? I see lab/lite/src/demos/loading-progress.ts which is good to get started.

Also, in the repo (lab/ and packages/) there’s largely empty placeholder folders for “GL” - is the intention to support WebGL alongside WebGPU at some point? Although it was stated WebGL is unplanned.

2 Likes

Thanks a lot! It took a while but it was worth the wait.:heart_eyes: :fire:

1 Like

Seems like there is a WebGL prototype: Lite gl by sebavan · Pull Request #221 · BabylonJS/Babylon-Lite · GitHub

For those who are eager to try and experiment - here is the minimal Babylon-Lite Vite template

4 Likes