Install with bower

\n\n $ bower install fabric\n\n

Install with npm

\nTo install Fabric.js using npm, you must first manually [install Cairo](http://cairographics.org/download/) on your system. Cairo is a system library which powers node-canvas, which Fabric.js relies on. When the installation is complete, you may need to restart your terminal or command prompt before installing fabric.\n\n $ npm install fabric --save\n\n

Testing

\n\n1. [Install Node.js](https://github.com/joyent/node/wiki/Installation)\n\n2. [Install NPM, if necessary](https://github.com/npm/npm#super-easy-install)\n\n3. Install NPM packages\n\n $ npm install\n\n4. Run test suite\n\nMake sure testem is installed\n\n $ npm install -g testem\n\nRun tests Chrome and Node (by default):\n\n $ testem\n\nSee testem docs for more info: https://github.com/testem/testem\n\n### Demos\n\n- [Demos](http://fabricjs.com/demos/)\n- [Kitchensink demo](http://fabricjs.com/kitchensink)\n- [Benchmarks](http://fabricjs.com/benchmarks/)\n\n[Who's using Fabric?](http://trends.builtwith.com/javascript/FabricJS)\n\n### Documentation\n\nDocumentation is always available at [http://fabricjs.com/docs/](http://fabricjs.com/docs/).\n\nAlso see [official 4-part intro series](http://fabricjs.com/articles), [presentation from BK.js](http://www.slideshare.net/kangax/fabricjs-building-acanvaslibrarybk) and [presentation from Falsy Values](http://www.slideshare.net/kangax/fabric-falsy-values-8067834) for an overview of fabric.js, how it works, and its features.\n\n### Optional modules\n\nThese are the optional modules that could be specified for inclusion, when building custom version of fabric:\n\n- **text** — Adds support for static text (`fabric.Text`)\n- **itext** — Adds support for interactive text (`fabric.IText`)\n- **serialization** — Adds support for `loadFromJSON`, `loadFromDatalessJSON`, and `clone` methods on `fabric.Canvas`\n- **interaction** — Adds support for interactive features of fabric — selecting/transforming objects/groups via mouse/touch devices.\n- **parser** — Adds support for `fabric.parseSVGDocument`, `fabric.loadSVGFromURL`, and `fabric.loadSVGFromString`\n- **image_filters** — Adds support for image filters, such as grayscale of white removal.\n- **easing** — Adds support for animation easing functions\n- **node** — Adds support for running fabric under node.js, with help of [jsdom](https://github.com/tmpvar/jsdom) and [node-canvas](https://github.com/learnboost/node-canvas) libraries.\n- **freedrawing** — Adds support for free drawing\n- **gestures** — Adds support for multitouch gestures with help of [Event.js](https://github.com/mudcube/Event.js)\n- **object_straightening** — Adds support for rotating an object to one of 0, 90, 180, 270, etc. depending on which is angle is closer.\n- **animation** — Adds support for animation (`fabric.util.animate`, `fabric.util.requestAnimFrame`, `fabric.Object#animate`, `fabric.Canvas#fxCenterObjectH/#fxCenterObjectV/#fxRemove`)\n\nAdditional flags for build script are:\n\n- **requirejs** — Makes fabric requirejs AMD-compatible in `dist/fabric.js`. *Note:* an unminified, requirejs-compatible version is always created in `dist/fabric.require.js`\n- **no-strict** — Strips \"use strict\" directives from source\n- **no-svg-export** — Removes svg exporting functionality\n- **no-es5-compat** - Removes ES5 compat methods (Array.prototype.*, String.prototype.*, Function.prototype.*)\n- **sourcemap** - Generates a sourceMap file and adds the `sourceMappingURL` (only if uglifyjs is used) to `dist/fabric.min.js`\n\nFor example:\n\n node build.js modules=ALL exclude=json no-strict no-svg-export\n\n### Examples of use\n\n#### Adding red rectangle to canvas\n\n```html\n\n\n\n\n\n \n\n \n \n\n\n```\n\n### Helping Fabric\n\n- [Fabric on Bountysource](https://www.bountysource.com/trackers/23217-fabric-js)\n- [Fabric on CodeTriage](http://www.codetriage.com/kangax/fabric.js)\n\n### Staying in touch\n\nFollow [@fabric.js](http://twitter.com/fabricjs) or [@kangax](http://twitter.com/kangax) on twitter.\n\nQuestions, suggestions — [fabric.js on Google Groups](http://groups.google.com/group/fabricjs).\n\nSee [Fabric questions on Stackoverflow](http://stackoverflow.com/questions/tagged/fabricjs),\nFabric snippets on [jsfiddle](http://jsfiddle.net/user/fabricjs/fiddles/)\nor [codepen.io](http://codepen.io/tag/fabricjs).\n\nFabric on [LibKnot](http://libknot.ohmztech.com/).\n\nGet help in Fabric's IRC channel — irc://irc.freenode.net/#fabric.js\n\n### Credits\n\n- Ernest Delgado for the original idea of [manipulating images on canvas](http://www.ernestdelgado.com/archive/canvas/)\n- [Maxim \"hakunin\" Chernyak](http://twitter.com/hakunin) for ideas, and help with various parts of the library throughout its life\n- [Sergey Nisnevich](http://nisnya.com) for help with geometry logic\n- [Stefan Kienzle](https://twitter.com/kienzle_s) for help with bugs, features, documentation, github issues\n- [And all the other GitHub contributors](https://github.com/kangax/fabric.js/graphs/contributors)\n\n### MIT License\n\nCopyright (c) 2008-2015 Printio (Juriy Zaytsev, Maxim Chernyak)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kangax/fabric.js/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n","readmeFilename":"README.md","homepage":"http://fabricjs.com/","keywords":["canvas","graphic","graphics","SVG","node-canvas","parser","HTML5","object model"],"bugs":{"url":"https://github.com/kangax/fabric.js/issues"},"license":"MIT","contributors":[{"name":"Andrea Bogazzi","email":"andreabogazzi79@gmail.com"}],"_attachments":{}}