aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}