From 58ebf53dfedd3a6cee7f1e22031a0ed5ce53bd55 Mon Sep 17 00:00:00 2001 From: sole Date: Sat, 25 Sep 2010 17:49:20 +0100 Subject: [PATCH] added usage and another simple example --- README.md | 38 +++++++++++++++++++++++++++++++++++++- examples/04_simplest.html | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 examples/04_simplest.html diff --git a/README.md b/README.md index d982b7d..07ea685 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Tween.js [![Flattr this](http://api.flattr.com/button/button-compact-static-100x17.png)](https://flattr.com/thing/45014/tween-js) -Super simple, fast and easy to use engine which incorporates Robert Penner's easing equations. +Super simple, fast and easy to use engine which incorporates Robert Penner's easing equations (and Philippe Elsass's optimised equations from his AS3 Eaze library). We are still developing this so the API might probably change from commit to commit. @@ -20,3 +20,39 @@ We are still developing this so the API might probably change from commit to com [![Linechart](http://github.com/sole/sole.github.com/raw/master/tween.js/assets/projects/00_linechart.png)](http://dejavis.org/linechart) [![The Wilderness Downtown](http://github.com/sole/sole.github.com/raw/master/tween.js/assets/projects/01_wilderness.png)](http://thewildernessdowntown.com/) + +### Usage ### + +Download the [minified library](http://github.com/sole/tween.js/raw/master/build/Tween.js) and include it in your html. + + + +The following code creates a Tween which will change the 'x' attribute in a position variable, so that it goes from 50 to 400 in 2 seconds. The anonymous function set up with an interval will update the screen so that we can see something happening: + + + +Note: this corresponds to the example 04_simplest.html that you can find in the examples folder. + +Have a look at that folder to discover more functionalities of the library! + +### Contributors ### + +People who have contributed directly or indirectly to this project :-D + +[sole](http://soledadpenades.com), [mrdoob](http://mrdoob.com), [Robert Penner](http://www.robertpenner.com/), [Philippe Elsass](http://philippe.elsass.me) diff --git a/examples/04_simplest.html b/examples/04_simplest.html new file mode 100644 index 0000000..383fcb1 --- /dev/null +++ b/examples/04_simplest.html @@ -0,0 +1,39 @@ + + + + Tween.js / simplest possible example! + + + + + +
+

tween.js

+

04 _ simplest possible example

+

Creating a tween and doing little else apart from that :)

+
+ +
+
+ + + +