Skip to content
T

Two.js

A renderer agnostic two-dimensional drawing api for the web

by jonobr1Free

#663in Developer Tools
0In stores

Description

Two.js is a two-dimensional drawing API for modern web browsers. Its main idea is that the same code can draw in several renderers, includin…

Highlights

  • Same code for SVG, canvas and WebGL
  • Scene graph of shapes and groups
  • Built-in animation loop
  • SVG import from design tools
  • Sprite sheets and image sequences

Ratings & Reviews

No ratings yet

Be the first to rate Two.js.

People also visit

P

pixijs-2d

Fast, lightweight 2D rendering engine for creating interactive graphics

AI Skills
Get
P

Paper.js

Open source vector graphics scripting framework

Developer Tools
Launch
P

Pixijs

The HTML5 Creation Engine: Create beautiful digital content

Entertainment
Launch
S

Stage.js

2D HTML5 rendering and layout engine for game development

Entertainment
Launch
R

Ripl

Ripl provides a unified, cross-platform API for 2D

Developer Tools
Launch
M

Maker.js

2D vector line drawing and shape modeling for CNC and laser cutters

Design
Launch

Two.js FAQ

What is Two.js?

A two-dimensional drawing API for the browser that draws shapes and animations in SVG, canvas or WebGL.

How do I install it?

Run npm install --save two.js@latest, or download the script and add it to your HTML page.

How big is it?

The site lists about 95 KB for the development build and about 50 KB for production.

Can I use SVG from Illustrator?

Yes. The site says you can create SVG elements in design tools such as Adobe Illustrator and bring them into a Two.js scene.

Does it have animation?

Yes. It has a built-in animation loop, which can also be paired with another animation library.

Does it need other libraries?

Before version 0.7.0-alpha.1 it needed Underscore.js and the Backbone Events module. Newer versions do not, according to the page's notes.

What are the best Two.js alternatives?

Popular alternatives to Two.js include Paper.js, Ripl and Motion Canvas. See all Two.js alternatives

Developer Stuff

Badges