# Babylon.js

> A full web 3D and game engine: WebGL and WebGPU rendering, physics, GUI, XR and a scene inspector.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/babylonjs

free

A full web 3D and game engine: WebGL and WebGPU rendering, physics, GUI, XR and a scene inspector.

by Babylon.js team (Microsoft)[GitHub](https://github.com/BabylonJS/Babylon.js)[npm](https://npmjs.com/package/@babylonjs/core)

[visit](https://www.babylonjs.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://www.babylonjs.com](https://www.babylonjs.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [three.js](https://tastebase.ehsanulsiam.workers.dev/browse/three)

The standard WebGL and WebGPU 3D engine: scenes, cameras, materials, loaders.

no preview

### [PlayCanvas](https://tastebase.ehsanulsiam.workers.dev/browse/playcanvas)

Open-source WebGL and WebGPU engine with a React wrapper, a hosted editor and first-class Gaussian splats.

no preview

### [React Three Fiber](https://tastebase.ehsanulsiam.workers.dev/browse/r3f)

React renderer for three.js: build 3D scenes as JSX components with hooks.

no preview

### [<model-viewer>](https://tastebase.ehsanulsiam.workers.dev/browse/model-viewer)

Google's web component that shows a glTF model with orbit controls, lighting and phone AR in one tag.

## For your agent

##### Install

`npm i @babylonjs/core`

##### Use it for

- a browser game with physics, collisions and input
- a product configurator or digital twin where the team wants a scene inspector and node material editor
- a WebGPU 3D app that needs physics, 3D GUI and XR from one vendor

##### Skip it when

- a 2D flowchart, workflow or node diagram editor: use xyflow (its node editor is for 3D materials)
- a decorative hero object or a scene driven by React state: use r3f
- showing one glTF model with orbit and phone AR: use model-viewer
- a designer-built scene with no code edits: use spline

##### What's inside9 free

- @babylonjs/core
- @babylonjs/gui
- @babylonjs/loaders
- @babylonjs/materials
- @babylonjs/inspector
- @babylonjs/havok
- Playground
- Node Material Editor
- Sandbox

##### Facts

**Frameworks**
vanilla, react, vue, svelte, solid, angular

**Styling**
unstyled

**Weight**
large

**Accessibility**
weak

**Maturity**
established

**License**
Apache-2.0

**Price**
Free

##### Alternatives

[three.js](https://tastebase.ehsanulsiam.workers.dev/browse/three)[PlayCanvas](https://tastebase.ehsanulsiam.workers.dev/browse/playcanvas)[React Three Fiber](https://tastebase.ehsanulsiam.workers.dev/browse/r3f)

[Compare Babylon.js with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/babylonjs-alternatives)

```
import { Engine } from '@babylonjs/core/Engines/engine'
import { Scene } from '@babylonjs/core/scene'
import { Vector3 } from '@babylonjs/core/Maths/math.vector'
import { ArcRotateCamera } from '@babylonjs/core/Cameras/arcRotateCamera'
import { HemisphericLight } from '@babylonjs/core/Lights/hemisphericLight'
import { CreateSphere } from '@babylonjs/core/Meshes/Builders/sphereBuilder'
import '@babylonjs/core/Materials/standardMaterial'

const canvas = document.getElementById('scene') as HTMLCanvasElement
const engine = new Engine(canvas, true)
const scene = new Scene(engine)
const camera = new ArcRotateCamera('cam', Math.PI / 2, Math.PI / 3, 6, Vector3.Zero(), scene)
camera.attachControl(canvas, true)
new HemisphericLight('light', new Vector3(0, 1, 0), scene)
CreateSphere('sphere', { diameter: 2, segments: 32 }, scene)

engine.runRenderLoop(() => scene.render())
addEventListener('resize', () => engine.resize())
```

https://www.babylonjs.com/featureDemos/

Loading website

[Visit](https://www.babylonjs.com/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
