aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeremy2015-01-04 16:27:13 -0800
committergeremy2015-01-04 16:27:13 -0800
commit58974042044d53309d914eacc0e0abeca972e63e (patch)
tree683a26ef84fc0ce261ba4f7f89190cabeffd8fdf
parent5f4b8d8ea21b9a91c0f94d275b925aae6a7915f8 (diff)
downloadpubnub-python-58974042044d53309d914eacc0e0abeca972e63e.tar.bz2
drawing scale lines
-rw-r--r--python/examples/futureHouse/waveViz.js23
1 files changed, 7 insertions, 16 deletions
diff --git a/python/examples/futureHouse/waveViz.js b/python/examples/futureHouse/waveViz.js
index 02094a5..5e59a18 100644
--- a/python/examples/futureHouse/waveViz.js
+++ b/python/examples/futureHouse/waveViz.js
@@ -60,25 +60,16 @@ $(function () {
ctx.strokeStyle = '#ffffff';
ctx.stroke();
+ var gradients = 5;
+ for (var z = -1; z < gradients; z++) {
- for (var z = 0; z < 5; z++) {
+ ctx.beginPath();
+ ctx.moveTo(10, hOffset - (hOffset / 2 * ((z+1) / gradients)) );
+ ctx.lineTo(w, hOffset - (hOffset / 2 * ((z+1) / gradients)) );
+ ctx.strokeStyle = '#ff0000';
+ ctx.stroke();
}
- // 0 line
-
- ctx.beginPath();
- ctx.moveTo(10, hOffset);
- ctx.lineTo(w, hOffset);
- ctx.strokeStyle = '#ff0000';
- ctx.stroke();
-
- // 1 line
-
- ctx.beginPath();
- ctx.moveTo(10, hOffset / 2);
- ctx.lineTo(w, hOffset / 2);
- ctx.strokeStyle = '#ff0000';
- ctx.stroke();
requestAnimationFrame(loop);
}