FindSoftware

Two.js

Renderer-agnostic JavaScript drawing API for two-dimensional scenes that render to WebGL, canvas or SVG.

Two.js is a drawing API for two-dimensional scenes on the web. The same scene can be drawn by its WebGL, canvas or SVG renderer, because the API sits above the renderer. Shapes and groups are kept in a scenegraph, so an object can be rotated, moved or scaled after it is created, and the library has a built-in animation loop that updates the scene.

Two.js also reads SVG elements from design tools into a scene and loads bitmap images, sprite sheets and image sequences. A headless mode renders a scene on a server with the Node Canvas library and writes the frames to files. The documentation describes the API.

Worth knowing

The README says the main import includes every module, so tree shaking is not yet implemented, although the project lists it on its roadmap. A custom build can exclude renderers the project does not need by editing its build script, which reduces the file size.

Identity

Status
Active
Maintainer
jonobr15
Maintained by
Individual
First release
20134

Rendering and deploy

Install with
npm, download, source build3

Releases

Current major version
Pre-1.06
Last release
2026-08-296

Adoption

GitHub stars
8,7452
npm downloads a week
19,0398
Contributors
637
Dependent repositories
2869
Dependent packages
539

Why these figures do not compare

Sources

  1. 2026-11-16: links, Categories
    two.js.org/
  2. 2026-11-16: links, Written in, GitHub stars
    api.github.com/repos/jonobr1/two.js
  3. 2026-11-16: links, Categories, Runtime, Install with
    raw.githubusercontent.com/jonobr1/two.js/dev/README.md
  4. 2026-11-16: First release
    api.github.com/repos/jonobr1/two.js/tags
  5. 2026-11-16: Maintainer, License, License model
    raw.githubusercontent.com/jonobr1/two.js/dev/LICENSE
  6. 2026-11-16: Current major version, Last release
    api.github.com/repos/jonobr1/two.js/releases
  7. 2026-11-16: Contributors
    api.github.com/repos/jonobr1/two.js/contributors
  8. 2026-11-16: npm downloads a week
    api.npmjs.org/downloads/range/2026-11-01:2026-11-07/two.js
  9. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/two.js

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON