diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-03-24 20:59:59 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-03-24 20:59:59 -0400 |
| commit | c825857ba94e7952216522fd32f0172b1831a554 (patch) | |
| tree | fe36aedc34f3dc95efe9ed066bdc67df4ccaca6f /grid4.html | |
| parent | e60c634d76d21bf7c5537a4062be0cab6fb9d92c (diff) | |
blues
Diffstat (limited to 'grid4.html')
| -rw-r--r-- | grid4.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/grid4.html b/grid4.html new file mode 100644 index 0000000..e696590 --- /dev/null +++ b/grid4.html @@ -0,0 +1,54 @@ +<link rel="stylesheet" href="css/sally.css" type="text/css" charset="utf-8" /> +<link rel="stylesheet" href="css/ak.css" type="text/css" charset="utf-8" /> +<style> +* { + font-smooth: never; + -webkit-font-smoothing: none; +} +</style> +<body class="loading"> +<center> + +<div id="canvas_rapper" style="margin: 0 auto;margin-top:7%"> +</div> + +</body> +<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> +<script src="js/util.js"></script> +<script src="js/color.js"></script> +<script src="js/lex.js"></script> +<script src="js/matrix.js"></script> +<script> + +// var color_hue_order = ("black dark-blue purple dark-red red orange " + +// "yellow lime green teal cyan blue magenta dark-gray light-gray white").split(" "); + +function iter (a, n) { for (; n--;) a.unshift(n); return a } +function cartesian (a, b) { var aa = []; a.forEach(function(i){ b.forEach(function(j){ aa.push([i,j]) }) }); return aa } +var xx = iter([], 16) +var yy = iter([], 16) +var xy = shuffle( cartesian(xx, yy) ) + +var grid_w = 6, grid_h = 4, gap = 1 +//var grid_w = 3, grid_h = 3, across = 24, gap = 1 +var canvas = new Matrix (96, 48, function(x,y){ + var lex = new Lex (x,y) + + var i = floor(x / grid_w) + var j = floor(y / grid_h) + + if ( (x % grid_w) != grid_w-gap && (y % grid_h) != grid_h-gap) { + var color = xy[ j * 16 + i ] + lex.fg = blue( color[1] ) + lex.bg = blue( color[0] ) + lex.char = "x" + } + + lex.opacity = 1 + lex.build() + return lex +}) +canvas.append(canvas_rapper) + +document.body.className = "" +</script>
\ No newline at end of file |
