I'm making a rotating rectangle with EaselJS but it doesn't work like I thought.
As I think, if I want to make a square (40x40) which rotates around its center at position x=100, y=100, I will need to set it's registration point to regX=20, regY=20.
//Create a stage by getting a reference to the canvas
stage = new createjs.Stage("demoCanvas");
//Create a Shape DisplayObject.
circle = new createjs.Shape();
circle.graphics.beginFill("red").drawRect(100, 100, 40, 40);
circle.regX = circle.regY = 20;
//Add Shape instance to stage display list.
stage.addChild(circle);
createjs.Ticker.setFPS(60);
createjs.Ticker.addEventListener("tick", onTick);
function onTick() {
circle.rotation++;
stage.update();
}