BASE

Three.js

Three.js

Development library / tool · Free

A JavaScript library for interactive 3D scenes, cameras, materials, animation, and model loading.

Also known as: mrdoob/three.js

Resource illustration: Three.js

Open resource ↗

What you can use for free

Three.js code is available free of charge for local and commercial projects, subject to its license.

Paid features and costs

This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.

Access and limitations

Three.js code is available free of charge for local and commercial projects, subject to its license. This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.

Use cases

  • Interactive 3D scenes
  • Visualizing models and materials in a browser

Example workflow

A possible workflow; this is not a report of hands-on testing.

Show a simple rotatable model on a page.

Before you start

  • Geometry or a model with permitted usage rights.
  • A scene container and target dimensions.

Steps

  1. Create a scene, camera, and renderer.
  2. Add a mesh and a render loop.
  3. Check resizing and resource disposal on closing.

Check your result

  • The entire model is visible.
  • Reopening does not leave an extra render loop running.

Choosing Three.js

Create a programmable 3D scene in a web application.

Choose this when

  • An interactive model, camera, or data visualization in 3D is needed.
  • Direct scene control from JavaScript is needed.

Consider alternatives when

  • Blender is more convenient for model preparation; Godot suits games using built-in engine systems.

Requirements

  • JavaScript, a supported browser graphics backend, and prepared assets.

Things to consider

  • Scene complexity and texture sizes affect memory and speed.
  • A 3D scene alone does not replace an accessible text interface.

Frequently asked questions

Does Three.js create a model instead of a 3D editor?

It can create geometry through code, but complex custom models often use a separate editor.

Related tasks and approaches

  • Blender

    Complement: prepare models and materials before use in a web scene.

  • React Three Fiber + Drei

    Alternative interface: control Three.js through React components.

License

MIT: permits commercial use, modification, and distribution of the code at no charge, provided the license text and copyright notice are retained.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • JavaScript
  • WebGL/WebGPU
  • webgl

Sources

Other resources