Skip to content

Commit

Permalink
minor updates to READMEs.
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Skinner <[email protected]>
  • Loading branch information
gskinner committed Oct 15, 2014
1 parent 9afb542 commit 7f05997
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
30 changes: 11 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,27 @@ EaselJS is a library to make working with the Canvas element easier. It provides
## Simple Example

//Draw a square on screen.
var canvas = document.getElementById('canvas');
var stage = new createjs.Stage(canvas);
var stage = new createjs.Stage('myCanvas');
var shape = new createjs.Shape();
shape.graphics.beginFill('rgba(255,0,0,1)').drawRoundRect(0, 0, 120, 120, 10);
shape.graphics.beginFill('rgba(255,0,0,1)').drawRect(0, 0, 120, 120);
stage.addChild(shape);
stage.update();

## Animation Example
## Sprite Animation Example
var ss = new createjs.SpriteSheet({
"frames": {
"width": 200,
"numFrames": 64,
"regX": 2,
"regY": 2,
"height": 361
frames: {
width: 32,
height: 64,
numFrames: 19
},
"animations": {"jump": [26, 63], "run": [0, 25]},
"images": ["./assets/runningGrant.png"]
animations: {"jump": [26, 63], "run": [0, 25]},
images: ["./assets/runningGrant.png"]
});

ss.getAnimation("run").speed = 2;
ss.getAnimation("run").next = "jump";
ss.getAnimation("jump").next = "run";

var sprite = new createjs.Sprite(ss, "run");
sprite.scaleY = sprite.scaleX = 0.4;

createjs.Ticker.setFPS(60);
createjs.Ticker.addEventListener("tick", stage);
createjs.Ticker.on("tick", stage);
stage.addChild(sprite);


Expand All @@ -50,7 +42,7 @@ can use it for almost any purpose (including commercial projects). We appreciate

## Classes

The API is inspired by Flash's display list, and should be easy to pick up for both JS and AS3 developers. Check out the [docs](http://createjs.com/Docs/EaselJS/) for more information.
The API is inspired in part by Flash's display list, and should be easy to pick up for both JS and AS3 developers. Check out the [docs](http://createjs.com/Docs/EaselJS/) for more information.

**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.
Expand Down
2 changes: 1 addition & 1 deletion extras/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EaselJS: extras
# extras directory

This directory contains extra tools, utilities, and classes that may be useful, but are not a core part of the library.

Expand Down
2 changes: 2 additions & 0 deletions lib/README.txt → lib/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# lib directory

This directory contains a compressed version of the EaselJS library.

It is recommended that you use this version in almost all cases, unless you need to modify the original code. It is much smaller, results in less http requests, and you don't have to worry about the order in which you include the js files.
Expand Down

0 comments on commit 7f05997

Please sign in to comment.