Getting started? Play directly with the Babylon.js API using our playground. It also contains a lot of samples to learn how to use it.
Any questions? Here is our official forum.
To look into our CDN bundled distribution, you can refer to the package babylonjs
BabylonJS and its modules are published on npm as esNext modules with full typing support. To install, use:
npm install @babylonjs/core --save
This will allow you to import BabylonJS entirely using:
or individual classes to benefit from enhanced tree shaking using :
To add a module, install the respective package. A list of extra packages and their installation instructions can be found on the babylonjs user on npm scoped on @babylonjs.
;;;;;;// Side-effects only imports allowing the standard material to be used as default.;// Side-effects only imports allowing Mesh to create default shapes (to enhance tree shaking, the construction methods on mesh are not available if the meshbuilder has not been imported).;;const canvas = document as HTMLCanvasElement;const engine = canvas;var scene = engine;// This creates and positions a free camera (non-mesh)var camera = "camera1" 0 5 -10 scene;// This targets the camera to scene origincamera;// This attaches the camera to the canvascamera;// This creates a light, aiming 0,1,0 - to the sky (non-mesh)var light = "light1" 0 1 0 scene;// Default intensity is 1. Let's dim the light a small amountlightintensity = 07;// Our built-in 'sphere' shape. Params: name, subdivs, size, scenevar sphere = Mesh;// Move the sphere upward 1/2 its heightspherepositiony = 2;// Our built-in 'ground' shape. Params: name, width, depth, subdivs, sceneMesh;engine;
Please see the Contributing Guidelines
- Official web site: www.babylonjs.com
- Online playground to learn by experimentating
- Online sandbox where you can test your .babylon and glTF scenes with a simple drag'n'drop
- Online shader creation tool where you can learn how to create GLSL shaders
- 3DS Max exporter can be used to generate a .babylon file from 3DS Max
- Maya exporter can be used to generate a .babylon file from 3DS Max
- Blender exporter can be used to generate a .babylon file from Blender 3d
- Unity 5 (deprecated) exporter can be used to export your geometries from Unity 5 scene editor(animations are supported)
- glTF Tools by KhronosGroup
To get a complete list of supported features, please visit our website.