Babylon.js

Babylon.js is a JavaScript library and 3D engine for displaying real time 3D graphics in a web browser via HTML5. The source code is available on GitHub and distributed under the Apache License 2.0.

History and progress
It was initially released in 2013 under Microsoft Public License, having been developed by two Microsoft employees in their free time as a side-project. David Catuhe created the 3D game engine, while David Rousset implemented VR, Gamepad and IndexedDB support. The two were aided by artist Michel Rousseau, who contributed several 3D scenes. Babylon.js is based on an earlier game engine for Silverlight's WPF based 3D system. Catuhe's side-project then became his full-time job, and his team's primary focus. In 2015, it was presented at the WebGL Conference in Paris. Following its promotion and application in games, video game publisher Ubisoft released an Assassin's Creed title built atop the library in 2014. As of 2024, the project has more than 500 contributors.

Its use has developed into a variety of fields such as:


 * virtual worlds
 * crime data visualization
 * education in medicine
 * fashion avatars
 * managing Kinect on the web
 * military training
 * modelling historic sites
 * Product design
 * RDF graphs
 * urban underground infrastructure modelling

Technical description
The source code is written in TypeScript and then compiled into a JavaScript version. The JavaScript version is available to end users via NPM or CDN who then code their projects in JavaScript accessing the engine's API. The Babylon.js 3D engine and user code is natively interpreted by web browsers supporting the HTML5 standard and WebGL to undertake the 3D rendering.

Modeling methodology
The 3D modeling process used is that of polygon modeling with triangular faces to be represented by shell models. Limited use of constructive solid geometry is possible, though only as a transitional method to create the union, subtraction, and intersection of shell models. Once created, models are rendered on an HTML 5 canvas element using a shader program which determines the pixel positions and colors on the canvas using the polygon models, the textures applied to each model, the scene camera and lights together with the 4 x 4 world matrices for each object which stores their position, rotation and scale. The technique used to produce photo realistic images is that of physically based rendering along with post-processing methods. In order to simulate collisions between models and other real world physical actions, one of two physics engines need to be added as plugins: Cannon.js and Oimo. Animation involving, for example, changes in position or color of models is accomplished by key frame animation objects called "animatables," while full character animation is achieved through the use of skeletons with blend weights.