Skip to content

jonobr1/two.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

two.js

This is considered alpha grade. A two-dimensional drawing api meant for modern browsers. It is renderer agnostic enabling the same api to render in multiple contexts: webgl, canvas2d, and svg.

Roadmap:

  • Optimize webgl. There are currently a lot of object replication.

Concerns:

  • Two.Group unable to re-add.

Up for discussion:

  • Add width and height properties to Two.Polygon.
  • Add radius to Two.Circle.
  • Add Two.Arc.
  • Add a z-index property to Two.Shape.
  • Standardized way to apply other types of transformations — namely skewX, skewY, scaleX, scaleY.

Notes:

  • More information on triangulation here.
  • For importing svg I’ve implemented the Adaptive Quadratic Bezier Subdivision from this c++ implementation.