Skip to content
This repository has been archived by the owner on Dec 9, 2019. It is now read-only.

Commit

Permalink
Added hello-world.html to examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
lamberta committed Apr 8, 2011
1 parent 345e00e commit f775480
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Doodle-js
## A JavaScript Animation Library for HTML5 Canvas.
__A JavaScript Animation Library for HTML5 Canvas.__

Tested on Chrome/WebKit, looking good on Firefox 4.
Requires a browser with support for HTML5 Canvas and some ECMAScript 5 capabilities.
Expand All @@ -25,23 +25,26 @@ Debugging version (type-checking and some useful error messages):

For more options: `./build/make-doodle -h`

Reference: http://lamberta.org/doodle-js/doc/api/
Examples: http://lamberta.org/doodle-js/doc/demos/making\_things\_move/
[Reference API](http://lamberta.org/doodle-js/doc/api/)
[Some Examples](http://lamberta.org/doodle-js/doc/demos/making_things_move/)

Questions?
Mailing list: http://groups.google.com/group/doodlejs
Mailing list: http://groups.google.com/group/doodlejs
Or, ask me on Twitter: http://twitter.com/billyist

`hello-world.html`:
[hello-world.html](./doc/examples/hello-world.html):

<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello, World!</title>
</head>
<body>
<div id="display"></div>
<script src="./build/doodle.js"></script>
<script src="../../build/doodle.js"></script>
<script>
doodle.ready(function () {
var display = doodle.createDisplay('#display', {width:400, height:400, frameRate:20}),
Expand Down
27 changes: 27 additions & 0 deletions doc/examples/hello-world.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello, World!</title>
</head>
<body>
<div id="display"></div>
<script src="../../build/doodle.js"></script>
<script>
doodle.ready(function () {
var display = doodle.createDisplay('#display', {width:400, height:400, frameRate:20}),
layer = display.createLayer(),
text = doodle.createText("Hello, World!").appendTo(layer);
//center text
text.x = display.width / 2;
text.y = display.height / 2;
//game loop
display.on(doodle.events.Event.ENTER_FRAME, function () {
text.rotation += 4;
});
});
</script>
</body>
</html>

0 comments on commit f775480

Please sign in to comment.