mrkeyoor.comAsk

mrdoob/three.jstested 25 Oct 2026commit fae8734

three.js review

Use Three.js for custom browser 3D when you want control over scene code and can own the surrounding application.

  • README snippet failed
  • 23.3 MB on disk
23 sto install
  • 0 dependencies
  • Build 10 s
Webevaluationupdated 18 Nov 2026
+491stars / 7d

Three.js is a JavaScript 3D library. Its README demonstrates creating a scene, camera and cube, attaching a renderer to a browser page and animating the cube.

Verdict

Use Three.js for custom browser 3D when you want control over scene code and can own the surrounding application. Choose an integrated engine when connected game systems are your priority. Our October source run passed installation, build and tests; the November attempt to run the browser example in Node failed with ReferenceError: window is not defined. The useful next step is to build your hardest interaction in its intended browser setting.

Three.js infographic: create browser 3D scenes through JavaScript, plus its uses, our test result, pitfalls and who it suits
Tested 18 November 2026: the README snippet failed with "ReferenceError: window is not". Before that: 25 Oct: source install 23 s, build 10 s; npm install took 3.9 s.

We ran it

Lab card: what happened when we ran three.js
Lab card from our sandbox run
Screenshot of three.js (threejs.org)
threejs.org
Install✓ · 23s266 packages · 183 MB
Build✓ · 10s
Tests✓ · 31sran, no count parsed
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo6063 files~714,789 lines of source · 590.7 MB · 6 CI workflows · tests dir

Answers from our run

Does three.js build from source?

Dependencies installed in 23 seconds (266 packages), and the build succeeded in 10 seconds. We cloned commit fae8734 into a clean Debian container with 3 CPUs and no project-specific setup.

Do three.js's tests pass?

Yes. The project's own test command exited successfully in 31 seconds, although its output did not expose an individual test count.

Does three.js have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use three.js?

Teams whose priority is an integrated game workflow with physics and animation state machines.

What are the alternatives to three.js?

Godot, React Three Fiber, Babylon.js. Use Three.

Setup3/5In our 2026-11-18 run it installed in 3.9 s, but the README’s “Usage” example failed as written with “ReferenceError: window is not defined”.Editor’s note: Source setup passed, but the quickstart record ends at a Node execution error and contains no completed browser setup.
Docs3/5The README has an install command and a usage section (“Usage”), but its “Usage” example failed as written in our 2026-11-18 run (“ReferenceError: window is not defined”).Editor’s note: The supplied README and documentation indexes support descriptions, but no completed tutorial assessment establishes documentation quality.
Community5/5Last push on 2026-11-18, 118,838 stars and maintainers answered or closed 10 of the 10 most-discussed issues we sampled.Editor’s note: Sampled project reports and troubleshooting discussions do not measure support responsiveness or successful resolution rates.
Maturity4/5Latest release r187 on 2026-10-30, repository created 2010-03-23 and its test suite passed in our sandbox.Editor’s note: The dated source checks and historical issues do not establish reliability across devices, releases or production applications.

How we score

Discussed on

  1. hnRealtime Three.js Coding261 points
  2. hnThree.js editor242 points
  3. hn3D CSS Periodic table with three.js191 points
  4. hnThree.js Shading Language160 points
  5. hnPR converts the Three.js codebase to ES2015 modules134 points

Who it’s for

Web developers building custom browser 3D who want to control their scene code.
Teams exploring interactive visualization, including the reported dashboard and industrial digital twin.
Game developers who value browser sharing and are prepared to assemble the surrounding application systems.

Who it’s NOT for

Teams whose priority is an integrated game workflow with physics and animation state machines.
Developers looking for a README example that runs unchanged in Node: the recorded attempt stopped at ReferenceError: window is not defined.

Setup reality

Our October 25, 2026 source run at fae8734 completed installation in 23 seconds, build in 10 seconds and tests in 31 seconds. It recorded 266 dependencies, 183 MB installed and 0 known vulnerabilities in npm audit. The sandbox configuration was 3 CPUs, 8 GB RAM and image label lab-node:22.

The November 18 quickstart run identified source commit 3e008f097f44 and separately installed three 0.187.0 from npm in 3.9 seconds. Its clone step took 33 seconds, node_modules occupied 23.3 MB and it installed 0 packages besides three. That container used 2 CPUs and 4 GB RAM. The unedited 32-line README Usage block failed in 0.2 seconds when executed with Node, exiting with ReferenceError: window is not defined. Teardown succeeded.

The README example reads window dimensions and appends the renderer to document.body. Its intended setting is a browser page with working module resolution.

Our Three.js source run passed installation in 23 seconds, build in 10 seconds and tests in 31 seconds. A separate attempt to execute the README browser example with Node failed with ReferenceError: window is not defined. Choose Three.js for custom browser 3D when you want to control the scene and own the surrounding application. Choose an integrated engine when connected game systems matter more.

The project reports make that choice more concrete. A rally-game creator kept Three.js after trying a Godot port because improving the existing game made more sense and sharing it through a browser mattered. A wargame developer described detailed stair animation as slow and expensive work. Together, those accounts suggest a useful starting question: which part of your application will take the most effort after the first scene appears?

What people use three.js for

Reported Three.js projects include a rally game, an industrial digital twin and a dashboard with several 3D layouts. These examples connect the library to tasks readers can evaluate: driving a course, inspecting robotics or opening details about a record. They also give a more useful basis for choosing a tool than judging the appearance of an isolated rotating object.

  • Conscious-Desk6823 describes keeping the Three.js version of Over The Edge after trying Godot. Improving the existing game and sharing it instantly through a browser influenced that decision. Rally creator's account.
  • Plenty_Line2696 reports working on a real-time industrial digital twin for remotely monitoring and controlling robotics. The developer describes the work as challenging. Digital-twin developer's account.
  • Abinanthan02's dashboard README lists table, sphere, helix, grid and wave arrangements, along with simulated live values and controls for orbiting, zooming and pausing animation. Dashboard project description.
  • Danucksan Sathiyaraj's portfolio README describes an EmailJS contact form alongside its interactive presentation. Portfolio project description.
  • On X, xikhar describes Papertrails as a papercraft world that expands around the visitor and runs in the browser with Three.js. Papertrails creator's post.

For a dashboard or monitoring interface, decide what navigating the scene helps someone inspect. For a game, decide whether browser sharing is central to reaching players. Those are editorial recommendations drawn from the reported uses. They give each proposed scene a job: the visitor should be able to explain what the extra dimension helps them do, rather than simply notice that the page contains 3D.

What happened when we ran it

Our October 25, 2026 run at commit fae8734 passed installation, build and tests. The source checkout used 3 CPUs, 8 GB RAM and image label lab-node:22. We measured repository setup and recorded the following results, which belong to that dated checkout. The dependency installation occupied 183 MB, while the complete checkout occupied 590.7 MB.

Source-run check Recorded result
npm installation Succeeded in 23 seconds; 266 dependencies recorded, 183 MB on disk
Build Succeeded in 10 seconds
Tests Succeeded in 31 seconds
npm audit 0 known vulnerabilities across the recorded severity categories
Checkout 6,063 files, approximately 714,789 source lines, 590.7 MB
Repository signals Six CI workflow files, a tests directory, no Dockerfile detected

The November 18 quickstart run identified source commit 3e008f097f44 and installed npm package three version 0.187.0. Its recipe was quickstart-lib, using a fresh unprivileged container with 2 CPUs, 4 GB RAM, no published ports and no secrets. The source commit and installed package version are separate recorded identifiers.

Quickstart step Recorded result
Clone 33 seconds
Install three 0.187.0 installed in 3.9 seconds
Installed size 23.3 MB in node_modules
Dependency count 0 packages besides three
README Usage execution Failed in 0.2 seconds; exit 1; ReferenceError: window is not defined
Finding snippet-failed: the README snippet does not run as written: ReferenceError: window is not defined
Teardown ok

The clone record, installation record, size record and dependency record supply the first four rows. The harness executed the unedited 32-line Usage block with Node. Its first browser-window access produced the recorded error. The failed step, finding and successful teardown preserve that outcome.

Where people get stuck: modules before materials

A beginner's forum report contains a blank page, a module-syntax error and an unresolved bare three import. These errors point to how JavaScript reaches the browser before they point to lighting or materials. The supplied discussion records the concrete messages, so a reader with a blank page can compare the console output before changing scene objects. Blank-page report.

Symptom in the evidence What the record supports doing Recorded outcome
Import declarations rejected outside a module Inspect the script's module configuration The original report contains the syntax error
Bare specifier three cannot be resolved Supply module resolution through a toolchain or explicitly served paths A separate forum reply describes an Express static route
window is not defined in our example check Use the browser setting expected by the README example Node execution failed; teardown succeeded
Historical black MP4 texture after an S3 upload Inspect the video's content metadata The synthesis records a commenter reporting success with video/mp4 metadata

The module-import reply describes serving a specific module file through Express instead of exposing the whole dependency directory. Its underlying point is straightforward: a browser needs a resolvable module address. The README cube example also reads window.innerWidth and appends its renderer to document.body. Those operations explain why executing the same block as a Node script reaches a different environment.

The video row concerns a separate MP4 report within issue #9754. The supplied synthesis distinguishes its content-metadata workaround from the thread's HLS problem. The readable issue extract reports drawing HLS video through a canvas while dropping frames, followed by a black frame on iOS 9. Preserve that distinction when diagnosing a video texture: file delivery metadata and the rendering path describe different parts of the problem.

AI-generated scenes still require game development

The Over The Edge creator describes extensive directing, testing, tweaking and reshaping despite using Claude for the coding. The account singles out procedural roads: generating one was easier than making it enjoyable to drive. That is useful evidence for planning the work after a generated scene appears, because the creator identifies the judgments still required rather than treating code generation as the finished game. Rally development account.

A separate r/aigamedev commenter reports five weeks building a simulation wargame with AI assistance. The difficult example was inverse kinematics on stairs, which the commenter described as slow and expensive compared with systems available in Unity and Unreal. Before choosing a stack, build the interaction most likely to dominate development. A rally game's handling and a wargame's foot placement are more revealing exercises than another cube. Wargame developer's report.

Measure the bundle your application ships

Measure the production bundle using your application's actual imports. Issue #24199 supplies a historical reason: its author reported that importing only Vector2 produced a 295 KB uncompressed bundle after r141, down from 1 MB in r140. The reported goal was to include only the classes required by an import. These figures describe that issue author's test. Historical tree-shaking report.

Our 590.7 MB checkout and 183 MB dependency installation answer storage questions about the October source run. A browser bundle answers a delivery question about a particular application. Keep those quantities separate when deciding whether a small 3D element earns its loading cost. Set a budget for the interaction, build with the imports you intend to ship and inspect the resulting output rather than estimating download size from repository storage.

Security: the recorded audit found zero known vulnerabilities

Our October 25 npm audit reported 0 known vulnerabilities: 0 critical, 0 high, 0 moderate and 0 low. That result belongs to the dependency set at commit fae8734, alongside the successful installation, build and tests. Keeping the date and checkout attached makes the result useful when comparing the recorded setup with the application a team plans to maintain.

The README cube example creates local scene objects and a browser renderer without configuring an application account or hosted API credential. Other services enter through the surrounding application. The portfolio README, for example, separately describes an EmailJS contact form. When reviewing an implementation, identify those services and its asset delivery alongside the rendering code, so responsibilities are visible in the application design. Three.js Usage example, portfolio contact form.

Three.js vs Godot, React Three Fiber, Babylon.js and WebGL

Godot describes a unified interface for 2D and 3D games, while React Three Fiber describes reusable React components for Three.js scenes. These are different reasons to change tools. An engine changes the surrounding production workflow; a React renderer changes how scene code participates in a React application. Choose according to the work you want the tool to organize, including the cost of moving an existing project.

Choice Evidence behind the distinction When to choose it
Three.js The README creates a scene, camera, cube and browser renderer Custom browser graphics with direct scene code
Godot Its README describes a unified interface for creating 2D and 3D games An integrated game workflow
React Three Fiber Its README describes reusable components that react to state A React application whose components should organize the scene
Raw WebGL The supplied comparison describes the underlying browser graphics API Learning or controlling lower-level rendering

The Godot README describes exports to desktop, mobile and web platforms. The React Three Fiber README describes its React renderer and asks newcomers to understand both React and Three.js. Our existing React Three Fiber review addresses that component-oriented choice. For an existing game, the rally creator's decision to retain Three.js also makes the cost of maintaining another version part of the comparison.

Babylon.js provides a playground with samples and publishes npm modules with typing support, according to its README. Use those samples to identify a representative interaction before comparing implementation effort. For raw WebGL, the supplied comparison explains that Three.js adds scene, camera, material and loader abstractions around the lower-level API. These descriptions help select an experiment suited to your application. Babylon.js README, Three.js and WebGL comparison.

Outdated claims, corrected

Wikipedia's supplied Three.js overview specifies browsers with WebGL 2.0 support; TutorialsPoint's promise of graphics running in any browser is broader. Attribute the narrower statement to Wikipedia, the supplied source that actually contains it. Usersnap's older review discusses WebGL browser support, while the supplied Three.js homepage identifies r187. Those sources describe different compatibility contexts. Wikipedia overview, TutorialsPoint introduction, Usersnap review, r187 homepage.

Summer Engine's migration guide acknowledges that the Three.js editor composes scenes, attaches scripts and publishes a player page. Its useful distinction concerns the surrounding game systems, including physics and animation state machines. Wikipedia's description of built-in controls also needs the packaging distinction visible in the official documentation: OrbitControls and EffectComposer appear under Addons. Read the relevant module documentation when turning an overview into application imports. Migration guide's editor description, official documentation index.

FAQ

Three.js creates browser 3D scenes through JavaScript objects such as cameras, geometry and materials, as its README cube example demonstrates. The questions below come from the supplied research questions and search intents. Their answers focus on the initial tool choice, the concrete module errors and the scene fundamentals that also matter when a React application uses Three.js through another renderer.

What is Three.js, and how does it work?

The README creates a scene and camera, adds a cube and draws it through a WebGL renderer attached to the page. Its animation callback changes the cube's rotation before rendering another frame. This gives a newcomer a concrete sequence to follow: construct the objects, place them in the scene and render the scene through a camera. README Usage example.

Why does my Three.js page stay blank even though the same code works in JSFiddle?

The sampled forum report contains module parsing and unresolved bare-import errors. Those messages make module setup the first thing to inspect in that case. Compare your own first console error with the reported messages before changing lights, geometry or camera positions. A separate reply demonstrates explicitly serving a module path through Express. Blank-page errors, served-module explanation.

Should I learn Three.js or React Three Fiber first?

React Three Fiber's README asks readers to understand both React and Three.js, including scenes, cameras, meshes, geometry and materials. If your application already uses React, components can organize those objects while you learn what they do. If you are new to 3D, the Three.js cube provides a direct example of the objects the components will create. React Three Fiber first steps.

What can I build and export with the Three.js editor?

The supplied migration guide says the editor composes scenes, attaches scripts and publishes a small player page. That gives scene assembly a concrete place in the workflow. The same passage distinguishes that editor from integrated game systems such as physics and animation state machines, which the guide says developers assemble through their own code or chosen libraries. Editor and game-system description.

What we have not tested yet

The November record contains a Node execution failure, not a completed browser-rendering result. The source checks supply no representative frame-rate, load-time, battery or GPU-memory measurements. The recorded image label identifies sandbox configuration; actual runtime and operating-system versions require raw toolchain logs. The November npm package is explicitly recorded as 0.187.0, while the October timings belong to source commit fae8734 rather than an identified release tag.

We have not reproduced the reported games, dashboard, portfolio, digital twin or social demonstrations. Their descriptions supply use cases rather than measured usability or operational reliability. The rally account supplies no reproducible anti-aliasing implementation or before-and-after frame rates, and the historical tree-shaking extract supplies no current cross-bundler result. The portfolio's listed future improvements include accessibility and mobile performance. Tutorial excerpts likewise support no course-completeness or learning-outcome rating.

Historical device reports provide cases for investigation rather than a current compatibility matrix. In issue #14137, a reporter describes Standard Material textures rendering solid black on Android devices. In issue #13288, an iPhone report describes skinned meshes deforming away from the origin; the synthesis records that disabling float vertex textures also stopped animation. We did not reproduce these cases or establish which fixes reached particular releases.

The supplied evidence contains no inspected official WebGLRenderer requirement extract, so the WebGL 2.0 statement above is attributed to Wikipedia. We have not tested the editor's exported player, WebGPU rendering, application security, accessibility or alternatives side by side. The audit covers the recorded dependency set rather than application safety. Numerical editorial ratings remain unassessed because the available checks do not establish onboarding quality, support responsiveness or reliability across devices. The next useful adoption check is your intended interaction in its browser and device setting.

Alternatives

ProjectWhat it isPick it when
Godot gh↗An engine for creating 2D and 3D games through a unified interface.Choose it when an integrated game workflow matters more than preserving existing JavaScript scene code. Include the cost of a rewrite in that decision.
React Three Fiber gh↗A React renderer for Three.js with reusable scene components.Choose it when your application uses React and you want its component structure to organize the scene.
Babylon.js gh↗A browser graphics project whose README provides a playground and typed npm modules.Evaluate it when its playground samples match the interaction you intend to build, then compare the implementation work.

What people are saying

  1. [hackernews] Spreading Liquid with Three.js
  2. [github-trending] mrdoob/three.js

Sources

  1. Three.js README
  2. Three.js official documentation index
  3. Godot README
  4. React Three Fiber README
  5. Babylon.js README

More web reviews