We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 301a6a8 commit 932d6f9Copy full SHA for 932d6f9
index.js
@@ -67,6 +67,12 @@ function render () {
67
var data = ctx.getImageData(0, 0, w, h).data;
68
69
for (var i = 0, l = data.length; i < l; i += 4) {
70
+ if ((i/4|0) % w === 0) {
71
+ // end of the row
72
+ cursor.bg.reset();
73
+ cursor.write('\n');
74
+ }
75
+
76
var r = data[i];
77
var g = data[i+1];
78
var b = data[i+2];
@@ -79,11 +85,5 @@ function render () {
79
85
}
80
86
81
87
cursor.write(pixel);
82
-
83
- if ((i/4|0) % w === (w-1)) {
84
- // end of the row
- cursor.bg.reset();
- cursor.write('\n');
- }
88
89
0 commit comments