three.js vs Babylon.js for VR: which should you pick?

By the Turbl team · · 11 min read

In the three.js vs Babylon.js choice for VR, pick Babylon.js if you want teleport, controller models and hand tracking working from one function call. Pick three.js if you want a small download, React support, or the library with about 100 times more npm downloads. Both are free and open source, and both run in the Meta Quest browser.

three.js vs Babylon.js in one table

Both libraries draw 3D graphics in a web page and talk to a headset through WebXR. WebXR is the browser standard for VR and AR. If the term is new, read what WebXR is first.

The table shows the state as of November 2026.

three.jsBabylon.js
What it isA rendering library with optional addonsA full engine with tools around it
Current versionr187 (npm 0.187.0, October 30, 2026)9.38.0 (November 26, 2026)
LicenseMITApache 2.0
Enter VRVRButton addon, three linescreateDefaultXRExperienceAsync, one call
TeleportYou write itBuilt in
Controller modelsAddon (XRControllerModelFactory)Loaded by default
Hand trackingYou request it, then draw hands with an addon (XRHandModelFactory)On by default in the default experience
PhysicsAddons for Rapier, Jolt and AmmoOfficial Havok plugin
Inspector and editorWeb editorInspector, Playground, desktop Editor
TypeScriptTypes in a separate package, @types/threeType definitions ship in the package
Whole package, gzippedAbout 186 kBAbout 1.86 MB
npm downloads, November 19 to 25, 2026About 38.5 millionAbout 383,000 (@babylonjs/core)

Setup: entering VR in each

A working VR scene takes about 25 lines in either library. Babylon.js gives you more for those lines.

Here is three.js, following the official "How to create VR content" guide. You import the VRButton addon, enable XR on the renderer, and let the renderer run the loop.

import * as THREE from 'three';
import { VRButton } from 'three/addons/webxr/VRButton.js';

const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.xr.enabled = true;
document.body.appendChild(renderer.domElement);
document.body.appendChild(VRButton.createButton(renderer));

const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.1, 100);
camera.position.set(0, 1.6, 0);
scene.add(new THREE.HemisphereLight(0xffffff, 0x444444, 3));

const cube = new THREE.Mesh(
  new THREE.BoxGeometry(0.3, 0.3, 0.3),
  new THREE.MeshStandardMaterial({ color: 0x3388ff })
);
cube.position.set(0, 1.4, -1);
scene.add(cube);

renderer.setAnimationLoop(() => {
  cube.rotation.y += 0.01;
  renderer.render(scene, camera);
});

You must use renderer.setAnimationLoop. The three.js manual says a plain window.requestAnimationFrame loop cannot be used for VR.

That scene lets you look around and walk within your room. It shows no controllers. You cannot teleport or grab. Each of those is more code.

Here is Babylon.js. The default experience helper does the same job and adds more.

import {
  Engine, Scene, FreeCamera, HemisphericLight,
  MeshBuilder, Vector3, WebXRDefaultExperience,
} from "@babylonjs/core";
import "@babylonjs/loaders/glTF"; // needed to load controller models

const canvas = document.querySelector("canvas");
const engine = new Engine(canvas, true);
const scene = new Scene(engine);

const camera = new FreeCamera("camera", new Vector3(0, 1.6, -2), scene);
camera.attachControl(canvas, true);
new HemisphericLight("light", new Vector3(0, 1, 0), scene);

const ground = MeshBuilder.CreateGround("ground", { width: 10, height: 10 }, scene);
const box = MeshBuilder.CreateBox("box", { size: 0.3 }, scene);
box.position.set(0, 1.4, 1);

// Returns a promise. The enter-VR button appears when it resolves.
WebXRDefaultExperience.CreateAsync(scene, { floorMeshes: [ground] });

engine.runRenderLoop(() => scene.render());

The page needs a <canvas> element. scene.createDefaultXRExperienceAsync(...) is the same call in its short form.

According to the Babylon.js docs, the default experience creates the enter button, sets up controllers, and turns on pointer selection and teleportation. Pointer selection is the laser that lets you click meshes. The floorMeshes option lists the meshes you can teleport onto, so here you can teleport on the ground right away.

Importing from the root of @babylonjs/core is the simple way. It can also pull far more of the engine into your build. For a smaller build, Babylon's own Vite sample imports each class from its own file path, such as @babylonjs/core/XR/webXRDefaultExperience.js.

Both need HTTPS when you open the page on a headset. WebXR works only in a secure context. That means an HTTPS page, or localhost on the same machine.

Controllers, hands and movement

three.js gives you the raw parts. renderer.xr.getController(0) returns an object that follows the pointing ray of a controller. getControllerGrip(0) returns one that follows the grip. They fire selectstart and selectend events when the trigger is pressed and released. The XRControllerModelFactory addon loads a 3D model that matches the controller in your hand.

Hands work the same way. renderer.xr.getHand(0) gives you the tracked joints, and XRHandModelFactory draws them as spheres, boxes or a mesh. You must ask for hand tracking yourself. VRButton requests only local-floor, bounded-floor and layers by default, so you pass { optionalFeatures: ['hand-tracking'] } as the second argument.

Teleport, smooth movement, grabbing and throwing are not in the library. You write them, adapt the official examples (the manual links a dragging and a ball shooter example), or add a package that has them.

Babylon.js ships these as features you switch on. Its features manager lists, among others:

  • Teleportation and pointer selection, on in the default experience.
  • Hand tracking, on in the default experience since version 6.40.0 (January 2024). It tracks 25 points on each hand and loads a hand mesh.
  • Near interaction, which is touching things with your finger or controller tip. The default experience in 9.38.0 turns it on too.
  • Movement, which is thumbstick walking and turning. You turn teleportation off first.
  • Walking locomotion (walking in place), body tracking, layers, plane detection, anchors and depth sensing.

Each feature has numbered versions. You ask for a number, for "stable", or for "latest".

Physics

Physics means objects fall, collide and bounce without you coding each case. VR needs it as soon as the player can throw something.

Babylon.js documents one main answer: the Havok plugin. The web version of the Havok engine is a WebAssembly module. It is free under the MIT license, in the npm package @babylonjs/havok. It needs WebAssembly SIMD, which iOS versions before 16.4 lack. There is also an XR feature, WebXRControllerPhysics, that gives the controllers physics bodies.

three.js has no physics in its core. It ships three small addons that connect a mesh to a physics engine: RapierPhysics, JoltPhysics and AmmoPhysics. The Rapier addon loads Rapier from a CDN at run time, so it needs an internet connection. To avoid that, install a physics engine from npm and connect it to your meshes yourself.

Tools, TypeScript and learning curve

Babylon.js comes with tools that three.js leaves to others.

  • Playground. A web page where you write JavaScript or TypeScript and see the scene run.
  • Inspector. A panel for inspecting and changing a running scene. Microsoft announced a rebuilt Inspector v2 with Babylon.js 9.0 in March 2026. The docs say @babylonjs/inspector 8.49.0 and later is v2.
  • Editor. A desktop app for Windows, macOS and Linux with scene editing, scripting and physics. Microsoft's 9.0 announcement credits it to community member Julien Moreau Mathis.
  • Node editors. Visual editors for materials, geometry and particles.

three.js has a web-based scene editor at threejs.org/editor. It has no official counterpart to the Playground or the Inspector.

On TypeScript: Babylon.js ships type definitions inside its packages. three.js is written in JavaScript, and its types live in a separate package, @types/three. As of November 2026 both sit at the same version, 0.187.0.

On learning: three.js has fewer concepts at the start: a scene, a camera, a renderer, a mesh. The cost comes later, when you need teleport, grabbing or physics and must choose and connect them yourself. Babylon.js has more to read up front, in one official documentation site. After that there is less to assemble.

Bundle size and performance

Bundle size is how much JavaScript the headset downloads before the scene starts.

three.js is smaller. Bundlephobia measures the whole three 0.187.0 package at 742 kB minified and 186 kB gzipped. It measures all of @babylonjs/core 9.38.0 at 8.3 MB minified and 1.86 MB gzipped.

These are worst cases. Both libraries support tree shaking, where the build tool drops code you never import. A real Babylon.js app ships much less than the full package. Babylon's own team gives one data point: a scene with one glTF model and no WebXR code comes to 675 kB of gzipped JavaScript in Babylon.js. That is still more than three times the whole of three.js.

Frame rate in the headset depends mostly on your scene: the number of draw calls, the triangle count, the texture sizes and the shaders. We found no current, independent benchmark that compares the two libraries in a headset, so this article names no winner on speed. The rules in WebXR performance on Meta Quest apply to both.

WebGPU status

WebGPU is the newer browser graphics API that follows WebGL. Both libraries can render with it on a flat screen. Inside a headset it is experimental in both, as of November 2026.

three.js has a second renderer, WebGPURenderer, imported from three/webgpu. It uses WebGPU when the browser has it and falls back to WebGL 2 when not. The three.js manual says the renderer itself is still experimental. VRButton accepts either renderer. The r187 XR manager can create a WebGPU binding for an XR session if the browser offers one. We did not test this on a headset.

Babylon.js has a WebGPUEngine. Its docs call WebGPU inside WebXR experimental. You create the engine with xrCompatible: true, enable the Layers feature, and keep a WebGL path for devices that do not support it.

Both depend on the browser shipping the WebXR and WebGPU binding, an interface named XRGPUBinding. Meta Quest Browser 146.0 (April 2026) turned on experimental WebGPU support in WebXR. The release notes for version 156.0 (November 13, 2026) list "Support for WebGPU in WebXR" as a new feature and give no further detail. Other headset browsers may lack it. For a VR project you want to release now, use WebGL in either library and treat WebGPU as an optional path.

Babylon also has Babylon Lite, a separate WebGPU-only engine built for small bundles. Its overview page does not mention WebXR, and it says Babylon.js "remains the right default for most projects today". Do not plan a VR project on Lite unless its docs confirm WebXR support.

Community and ecosystem

three.js is much more widely used. npm counted about 38.5 million downloads of three in the week of November 19 to 25, 2026, against about 383,000 for @babylonjs/core. The ratio is about 100 to 1. Treat it as a rough signal. Download counts include automated installs, and the weekly count for three rose from about 14 million in early August 2026 to about 38 million in mid-November.

Several XR toolkits are built on three.js:

  • React Three Fiber with @react-three/xr lets you write a three.js scene as React components. See the React Three Fiber VR tutorial.
  • A-Frame lets you write scenes as HTML tags.
  • Immersive Web SDK from Meta combines three.js rendering with an entity component system, XR input handling and browser emulation.

So "three.js for VR" often means three.js plus one of these. The WebXR frameworks comparison covers each.

Babylon.js has a smaller community with one center: the official forum at forum.babylonjs.com. Microsoft announces its major releases on the Windows Developer Blog.

Which should you pick?

Your situationPick
You want a VR prototype with teleport and hands todayBabylon.js
You want engine, physics plugin and tools from one projectBabylon.js
You want bundled TypeScript types and one official manualBabylon.js
Your app is built in Reactthree.js with React Three Fiber
Download size matters, such as a VR mode on a normal websitethree.js
You want custom rendering or unusual shadersthree.js
You want the larger pool of tutorials, examples and developersthree.js

If you are still unsure, build the same small scene in both: one room, one object you can grab, one way to move. You can try each in an emulator first, as described in how to test WebXR without a headset.

If you want a playable VR scene without choosing a library at all, an AI builder is a third route. Turbl builds a WebXR project from a text description and gives you a link that opens in the Quest browser. It suits small single-player games and walk-through spaces. It has no online multiplayer and no store app export, and you get less control than with code you write yourself.

FAQ

Is Babylon.js better than three.js for VR?

Babylon.js has more VR features built in. Teleport, controller models and hand tracking come with its default XR experience, and physics is an official plugin. three.js is smaller and far more widely used, and you add VR features yourself or through a toolkit. Neither is better for every project.

Does three.js support WebXR?

Yes. WebXR support is part of the three.js renderer. You set renderer.xr.enabled = true and add the VRButton addon to start a VR session. Controllers and hands are available through renderer.xr.getController and renderer.xr.getHand.

Is Babylon.js free?

Yes. Babylon.js is open source under the Apache 2.0 license. The Havok physics plugin for the web is free under the MIT license. three.js is free under the MIT license.

Which is faster on Meta Quest, three.js or Babylon.js?

We found no current, independent benchmark that settles this. Both draw through the same WebGL and WebXR interfaces in the Quest browser. Your scene mostly decides the frame rate: draw calls, triangles, textures and shaders. three.js is the smaller download: about 186 kB gzipped for the whole package, against 1.86 MB for all of @babylonjs/core.

Can I use three.js or Babylon.js with React?

three.js has React Three Fiber, a library that describes a three.js scene as React components, plus @react-three/xr for VR. For Babylon.js there is a community package, react-babylonjs.

Should I use WebGPU for VR in 2026?

Not for a project you need to ship now. Both libraries can render with WebGPU on a flat screen. WebGPU inside a WebXR session depends on a browser interface, XRGPUBinding, that Babylon's docs describe as experimental as of November 2026. The Meta Quest browser has shipped it in steps during 2026. Use WebGL for VR and keep WebGPU as an optional path.

Sources

Keep reading