Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated hello-world to use 'animationFrame'.

  • Loading branch information...
commit 9e8561713517e61155ae7047a1ec0323cee7ef01 1 parent 2363b26
@lamberta authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 doc/examples/hello-world.html
View
7 doc/examples/hello-world.html
@@ -11,14 +11,13 @@
<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);
+ var display = doodle.createDisplay('#display', {width:400, height:400}),
+ text = doodle.createText("Hello, World!").appendTo(display);
//center text
text.x = display.width / 2;
text.y = display.height / 2;
//game loop
- display.on(doodle.events.Event.ENTER_FRAME, function () {
+ display.on('animationFrame', function () {
text.rotation += 4;
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.