<canvas id="gameView" width="400px" height="400px" style="background-color: antiquewhite"></canvas>
1.Stage舞台
var stage = new createjs.Stage("gameView");new一个舞台
var Rect = new createjs.Shape();Rect.graphics.beginFill("#ff0000");Rect.graphics.drawRect(5,5,50,50);stage.addChild(Rect);添加到舞台stage.update();舞台要随时更新,改变就要更新2.Container容器
var container = new createjs.Container();
container.addChild(bitmapInstance, shapeInstance);很多子元素的一个集合3.graphics绘图指令
var Rect = new createjs.Shape();
Rect.graphics.beginFill("#ff0000");Rect.graphics.drawRect(5,5,50,50);画各种图形4.Ticker订阅的滴答事件
createjs.Ticker.setFPS(5);
createjs.Ticker.addEventListener("tick", handleTick);function handleTick(event) {}