Skip to content
Browse files

Added the quick example back into the readme

  • Loading branch information...
1 parent af61c9d commit b9996f8c3e1b01e18fb01b5a594d58dd801db9cd @rsandor committed Oct 18, 2010
Showing with 42 additions and 4 deletions.
  1. +21 −2 README
  2. +21 −2 README.markdown
View
23 README
@@ -1,5 +1,5 @@
gury - A jQuery inspired canvas utility library
-================================================================================
+===
by Ryan Sandor Richards
Gury (pronounced "jury") is a simple to use utility library for drawing,
@@ -10,13 +10,32 @@ It was built with simplicity in mind and its usage was modeled in the image
of jQuery. For instance you can initialize, style, and animate an entire scene
in a single expression using chaining.
+Example
+---
+Here is an example of some gury code to make a simple spinning square animation.
+
+ $g('screen').size(100, 100).add({
+ theta: 0,
+ draw: function(ctx) {
+ ctx.save();
+ ctx.translate(50, 50);
+ ctx.rotate(this.theta);
+ ctx.fillStyle = "#ada";
+ ctx.fillRect(-32, -32, 64, 64);
+ ctx.restore();
+ this.theta += Math.PI / 120;
+ }
+ }).play(16);
+
+Neat, eh?
+
Documentation
---
You can find full API documentation for the project on it's github wiki:
http://github.com/rsandor/gury/wiki/API
License (MIT)
---------------------------------------------------------------------------------
+---
Copyright (c) 2010 Ryan Sandor Richards
Permission is hereby granted, free of charge, to any person obtaining a copy
View
23 README.markdown
@@ -1,5 +1,5 @@
gury - A jQuery inspired canvas utility library
-================================================================================
+===
by Ryan Sandor Richards
Gury (pronounced "jury") is a simple to use utility library for drawing,
@@ -10,13 +10,32 @@ It was built with simplicity in mind and its usage was modeled in the image
of jQuery. For instance you can initialize, style, and animate an entire scene
in a single expression using chaining.
+Example
+---
+Here is an example of some gury code to make a simple spinning square animation.
+
+ $g('screen').size(100, 100).add({
+ theta: 0,
+ draw: function(ctx) {
+ ctx.save();
+ ctx.translate(50, 50);
+ ctx.rotate(this.theta);
+ ctx.fillStyle = "#ada";
+ ctx.fillRect(-32, -32, 64, 64);
+ ctx.restore();
+ this.theta += Math.PI / 120;
+ }
+ }).play(16);
+
+Neat, eh?
+
Documentation
---
You can find full API documentation for the project on it's github wiki:
http://github.com/rsandor/gury/wiki/API
License (MIT)
---------------------------------------------------------------------------------
+---
Copyright (c) 2010 Ryan Sandor Richards
Permission is hereby granted, free of charge, to any person obtaining a copy

0 comments on commit b9996f8

Please sign in to comment.
Something went wrong with that request. Please try again.