EaselJS .. provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
SoundJS A Javascript library for working with Audio. Features a simple interface as the front end to multiple audio APIs via a plugin model. Currently supports HTML5 Audio & Flash.
PreloadJS .. makes preloading assets & getting aggregate progress events easier in JavaScript. It uses XHR2 when available, and falls back to tag-based loading when not.
畫圈圈 var canvas = document.getElementById("demo_canvas"); var stage = new createjs.Stage(canvas); var graphic = new createjs.Graphics(); graphic.beginStroke("white"); graphic.setStrokeStyle(5); graphic.beginFill("red"); graphic.drawCircle(100, 100, 50); var shape = new createjs.Shape(graphic); stage.addChild(shape); stage.update();
var canvas = document.getElementById("demo_canvas"); var stage = new createjs.Stage(canvas); var graphic = new createjs.Graphics(); graphic.beginStroke("white") .setStrokeStyle(5) .beginFill("red") .drawCircle(100, 100, 50); var shape = new createjs.Shape(graphic); stage.addChild(shape); stage.update(); 畫圈圈
var canvas = document.getElementById("demo_canvas"); var stage = new createjs.Stage(canvas); var graphic = new createjs.Graphics(); graphic.s("white") .ss(5) .f("red") .dc(100, 100, 50); var shape = new createjs.Shape(graphic); stage.addChild(shape); stage.update(); 畫圈圈
DisplayObject Abstract base class for all display elements in EaselJS. Exposes all of the display properties (ex. x, y, rotation, scaleX, scaleY, skewX, skewY, alpha, shadow, etc) that are common to all display objects.
Stage The root level display container for display elements. Each time tick() is called on Stage, it will update and render the display list to its associated canvas.