mirror of
https://github.com/rastapasta/mapscii.git
synced 2024-11-25 09:33:48 +01:00
After ESLint in BrailleBuffer
This commit is contained in:
parent
ba09e8bd82
commit
d692c9317c
@ -31,7 +31,7 @@ const termReset = '\x1B[39;49m';
|
|||||||
|
|
||||||
class BrailleBuffer {
|
class BrailleBuffer {
|
||||||
constructor(width, height) {
|
constructor(width, height) {
|
||||||
this.brailleMap = [[0x1, 0x8],[0x2, 0x10],[0x4, 0x20],[0x40, 0x80]]
|
this.brailleMap = [[0x1, 0x8],[0x2, 0x10],[0x4, 0x20],[0x40, 0x80]];
|
||||||
|
|
||||||
this.pixelBuffer = null;
|
this.pixelBuffer = null;
|
||||||
this.charBuffer = null;
|
this.charBuffer = null;
|
||||||
@ -67,7 +67,7 @@ class BrailleBuffer {
|
|||||||
|
|
||||||
setBackground(x, y, color) {
|
setBackground(x, y, color) {
|
||||||
if (0 <= x && x < this.width && 0 <= y && y < this.height) {
|
if (0 <= x && x < this.width && 0 <= y && y < this.height) {
|
||||||
idx = this._project(x, y);
|
const idx = this._project(x, y);
|
||||||
this.backgroundBuffer[idx] = color;
|
this.backgroundBuffer[idx] = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user