The Three.js vs Babylon.js comparison on OctoCounts shows side-by-side source line counts for mrdoob/three.js and BabylonJS/Babylon.js, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of mrdoob/three.js and BabylonJS/Babylon.js using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-11-16, mrdoob/three.js contains 589,672 total lines (336,385 code) across 2,500 files, while BabylonJS/Babylon.js contains 1,199,634 total lines (843,704 code) across 7,290 files as of 2026-11-16. BabylonJS/Babylon.js has about 2.5x the counted code lines of mrdoob/three.js under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | mrdoob/three.js | BabylonJS/Babylon.js |
|---|---|---|
| Files | 2,500 | 7,290 |
| Total lines | 589,672 | 1,199,634 |
| Code lines | 336,385 | 843,704 |
| Comment lines | 104,752 | 220,776 |
| Blank lines | 148,535 | 135,154 |
| Languages counted | 7 | 12 |
Top languages in mrdoob/three.js: JavaScript (79.2% of code), HTML (13.0% of code), JSON (3.3% of code). Top languages in BabylonJS/Babylon.js: TypeScript (60.9% of code), TSX (14.2% of code), JSON (9.4% of code). JavaScript, JSON appear in both top language lists; HTML, SVG, CSS appear only in mrdoob/three.js's top languages; TypeScript, TSX, HLSL appear only in BabylonJS/Babylon.js's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. mrdoob/three.js was counted at ref dev (commit a04f49e30257) on 2026-11-16; BabylonJS/Babylon.js was counted at ref master (commit 1783cb6ba5e8) on 2026-11-16. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. mrdoob/three.js: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. BabylonJS/Babylon.js: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: mrdoob/three.js is the Three.js repository: the rendering library, its examples and documentation pages, and utilities in one tree — the project deliberately keeps the core small. BabylonJS/Babylon.js is the Babylon.js monorepo: the engine packages, loaders, materials, tooling, and their tests. Both are browser 3D rendering libraries, but the repositories are organized differently, which the contains and language tables above reflect.
The per-language tables show Three.js's counted code as predominantly JavaScript while Babylon.js's is predominantly TypeScript — a direct consequence of each project's chosen implementation language for the rendering core.
Neither total measures rendering performance, feature coverage, or what an application loads at runtime: an app bundles only the parts of a library it imports, and both libraries ship modular entry points. Use these counts to sense each repository's size and structure, not to rank the libraries.
Sources: mrdoob/three.js repository (library plus examples/) · BabylonJS/Babylon.js repository (packages monorepo). Statements verified 2026-09-16.
Evidence and next steps:
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
As of 2026-11-16, mrdoob/three.js contains 589,672 total lines (336,385 code) across 2,500 files, while BabylonJS/Babylon.js contains 1,199,634 total lines (843,704 code) across 7,290 files as of 2026-11-16. BabylonJS/Babylon.js has about 2.5x the counted code lines of mrdoob/three.js under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for mrdoob/three.js, BabylonJS/Babylon.js, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. mrdoob/three.js was counted at ref dev (commit a04f49e30257) on 2026-11-16; BabylonJS/Babylon.js was counted at ref master (commit 1783cb6ba5e8) on 2026-11-16. See the counting methodology for ignored directories and analysis options.
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.