node wrapper for EaselJS, utilizing node-canvas.
node-easel is a node wrapper for EaselJS. For use with NodeJS, built on-top of node-canvas
$ npm install node-easel
Note Cairo graphics is required to run node-easel && node-canvas. Read the install docs at https://github.com/LearnBoost/node-canvas, for full install instructions.
To see a full working demo, checkout the examples folder.
node-easel is completely polymorphic with EaselJS. A good starting point is to checkout the EaselJS documentation.
//Import easel require'node-easel';var Stage = createjsStage;var Shape = createjsShape;var Graphics = createjsGraphics; var fs = require'fs'; //Create the canvas to draw to var c = 980 580;var ctx = cgetContext'2d'; //Create graphics object var g = ;var shape = g; //Draw a circle gsetStrokeStyle8beginStroke"#F0F"beginRadialGradientFill"#FF0""#00F"01100200010020040drawCircle10020040; //Add the item to our stage, and call .tick(); to draw the object. var stage = c;stageaddChildshape;stagetick; //Create a PNG file. fswriteFile__dirname + '/public/circle.png' ctoBuffer createjsTickerhalt;;