diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2009-04-23 22:14:47 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2009-04-23 22:14:47 +0000 |
commit | 67830bde803020329a01b9eca1701ffb6d0b38be (patch) | |
tree | 275e63044f508a9b8fbecf6aa594975ce5217e67 /demos/effect | |
parent | 60a0ae46e5e544a800dbf33d2d083a378f735119 (diff) | |
download | jquery-ui-67830bde803020329a01b9eca1701ffb6d0b38be.tar.gz jquery-ui-67830bde803020329a01b9eca1701ffb6d0b38be.zip |
effects: demo visualising easing functions, tuning
Diffstat (limited to 'demos/effect')
-rw-r--r-- | demos/effect/easing.html | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/demos/effect/easing.html b/demos/effect/easing.html index 52103d5e9..f5f30a288 100644 --- a/demos/effect/easing.html +++ b/demos/effect/easing.html @@ -33,6 +33,8 @@ canvas.height = 135;
var ctx = canvas.getContext("2d");
ctx.fillStyle = "black";
+ ctx.strokeStyle = "white";
+
ctx.beginPath();
ctx.moveTo(10, 0);
ctx.quadraticCurveTo(0, 0, 0, 10);
@@ -44,18 +46,15 @@ ctx.lineTo(10, 0);
ctx.fill();
- ctx.strokeStyle = "white";
ctx.beginPath();
ctx.moveTo(0, 100.5);
ctx.lineTo(100, 100.5);
ctx.stroke();
- var mod = 2;
+ ctx.lineWidth = 1.5;
ctx.beginPath();
- $.each(new Array(100 * mod), function(position) {
- var ease = impl(0, position, 0, 1, 100 * mod);
- ctx.moveTo(position / mod, 100 - position / mod * ease);
- ctx.lineTo(position / mod + 1, 99 - position / mod * ease);
+ $.each(new Array(100), function(position) {
+ ctx.lineTo(position, 100 - position * impl(0, position, 0, 1, 100));
});
ctx.stroke();
graph.click(function() {
|