Skip to content

Instantly share code, notes, and snippets.

@kled
Created March 7, 2012 14:22
Show Gist options
  • Save kled/1993410 to your computer and use it in GitHub Desktop.
Save kled/1993410 to your computer and use it in GitHub Desktop.
HTML5:easeljs Text
// Create a new Text object, and position it on stage:
var txt = new Text("text on the canvas.", "36px Arial", "#FFF");
txt.textBaseline = "top"; // draw text relative to the top of the em box.
txt.x = 100;
txt.y = 80;
txt.rotation = 20;
//txt.outline = true;
stage.addChild(txt);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment