r2487 - effects: demo visualising easing functions, tuning
Author: joern.zaefferer
Date: Thu Apr 23 14:37:07 2009
New Revision: 2487
Modified:
trunk/demos/effect/easing.html
Log:
effects: demo visualising easing functions, tuning
Modified: trunk/demos/effect/easing.html
==============================================================================
--- trunk/demos/effect/easing.html (original)
+++ trunk/demos/effect/easing.html Thu Apr 23 14:37:07 2009
@@ -61,13 +61,14 @@
});
// needs higher precision for better graphs
- $.each(new Array(100), function(position) {
- var mod = impl(0, position, 0, 1, 100);
- ctx.beginPath();
- ctx.moveTo(position, 100 - position * mod);
- ctx.lineTo(position + 1, 99 - position * mod);
- ctx.stroke();
+ var mod = 2;
+ 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);
});
+ ctx.stroke();
graph.click(function() {
$(canvas).animate({height: "hide"}, "slow",
name).animate({height: "show"}, "slow", name);
});
@@ -88,7 +89,7 @@
<div class="demo-description">
-All easings provided by jQuery UI are drawn above. Click a diagram to
see the easing in action.
+<strong>All easings provided by jQuery UI are drawn above, using a HTLM
canvas element</strong>. Click a diagram to see the easing in action.
</div><!-- End demo-description -->