This might be phrased as a question, but I think it’s more like a feature discussion.
As we all know, the Babylon developers take great care to always maintain backward compatibility with every release. Even with the upcoming 5.0 release, everything should still work as-is. That has been a great boost to developers: they can rest assured their code won’t break just because a new release has been uploaded to the CDN.
If the next release were allowed to break backward compatibility, what would you like to see done?
Please note: this is a purely theoretical discussion. The 5.0 release hasn’t even been released yet. It will be years before work on a 6.0 begins, even if it does decide to break backward compatibility
Here are some things on my wishlist:
- ES6 modules only. It’s time to stop worrying about IE11. All modern web browsers now support modules. Browsers can import the built modules directly, or tools such as webpack or rollup will bundle them when
- A better build system. No more globally installed Gulp required for contributing. I tried porting the build system to Rollup. You can read about my attempts here and see my old code on GitHub. It required all sorts of special tricks to get all of the same modules (and there are multiple copies of each module that must be built), type definitions, shaders, and everything else to work identically to the current system. I’d like Gulp to be replaced with either Rollup, webpack, or just plain-old tsc and leaving the rest to the browser or application bundler.
No side effects by default. This is the root of all evil in Babylon: it makes the file size explode. Tree-shaking just doesn’t work properly with side effects. At the very least, take advantage of modules by having them dynamically imported with something like
- No callbacks for things like ImportMesh. You all-to-easily get into callback hell once you start hooking things up to the model you just loaded. Callbacks are fine for things like observables but for query-response type APIs, Promises should be used.
- Remove old APIs like WebVR. This one is obvious enough. WebVR is deprecated and shouldn’t be used anymore.
Allow WebGPU without additional code. The upcoming 5.0 release will include WebGPU, but it requires a special
WebGPUEngine. Migrate the regular engine to have
initAsyncand let the engine choose between WebGL and WebGPU.
Does anyone else have any fantasies about what they would like in a non-backward compatible release?