fabric.js/README.md
2010-06-11 09:18:09 -04:00

979 B

Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. It is also an SVG-to-canvas parser.

Goals

  • Unit tested
  • Modular
  • Cross-browser
  • Fast

Supported browsers

  • Firefox 2+
  • Safari 3+
  • Opera 9.64+
  • Chrome 1+

Examples of use

Adding red rectangle to canvas

<canvas id="canvas" width="300" height="300"></canvas>  
...

var canvas = new Canvas.Element('canvas');

var rect = new Canvas.Rect({
  top: 100,
  left: 100,
  width: 60,
  height: 70,
  fill: 'red'
});

canvas.add(rect);

Credits