Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
Find a file
2010-06-11 10:29:12 -04:00
dist Add build files, both — just concatened and minified with YUIC 2010-06-11 01:32:18 -04:00
lib Add a couple more dependencies to /lib. Remove unneeded code from 2D.js and unminify it. 2010-06-09 23:30:25 -04:00
src Replace $w with split(' ') (to remove dependency on global, non-descriptive variable and Prototype in general). Add few missing console.warn statements when double initialization is attempted. 2010-06-11 10:29:12 -04:00
test Replace $w with split(' ') (to remove dependency on global, non-descriptive variable and Prototype in general). Add few missing console.warn statements when double initialization is attempted. 2010-06-11 10:29:12 -04:00
README.md List supported browsers in README. 2010-06-11 09:18:09 -04:00

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