diff options
| author | Jules <jules@asdf.us> | 2015-04-22 19:58:57 -0400 |
|---|---|---|
| committer | Jules <jules@asdf.us> | 2015-04-22 19:58:57 -0400 |
| commit | 68db15310ee74e4b13d9af650c75b7ccae7ed96d (patch) | |
| tree | 3c62cfdd29ed601a620cc8954d9db77159f773c3 /js/color_code.js | |
| parent | 7e416f96c0944c65a17c7d127f75625cad1b7f53 (diff) | |
render webcam ccs MUCH more efficiently
Diffstat (limited to 'js/color_code.js')
| -rw-r--r-- | js/color_code.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/color_code.js b/js/color_code.js index c27f2bb..7811d82 100644 --- a/js/color_code.js +++ b/js/color_code.js @@ -232,7 +232,12 @@ var MircColor = (function(){ } function ascii (rows) { var lines = rows.map(function(str){ - return str.map(function(index){ return "\\x031," + index + " " }).join("") + var last = -1 + return str.map(function(index){ + if (last == index) return " " + last = index + return "\\x031," + index + " " + }).join("") }).join("\\n") var txt = '/exec -out printf "' + lines + '"\n' return txt |
