A more lightweight babylon.js?

When comparing babylon.js’s size (https://preview.babylonjs.com/babylon.js) with three.js’s size (https://threejs.org/build/three.min.js) then you will notice that babylon.js is ~5 times bigger than three.js: babylon.js is 570,088 bytes big while three.js is only 145,870 bytes. I can clearly notice that three.js loads much faster than babylon.js when loading a site. I was wondering if there is maybe a smaller version of babylon.js?

3 Likes

Hey and welcome!
Since v4.0, you know have the option to use ES6 to treeshake babylon.js ending up with very tiny file as it will only keep what you need (the “problem” is that Babylonjs philosophy is to be simple out of the box, so we package all that you MAY need in the library (like physics, collisions, particles, gamepads, etc…)

A good read about our es6 modules: ES6 - Babylon.js Documentation

6 Likes

If you want to try out the ES6 stuff, here is a link to a stackblitz example using the latest release.
This is just a simple copy-paste of the example in the link that @Deltakosh posted.

1 Like