node-drawille

Drawing in terminal with unicode braille characters

Github星跟蹤圖

node-drawille Build Status

drawing in terminal with unicode braille characters. The idea is based on drawille by @asciimoo.

cube

install

install the package with npm:

$ npm install --save drawille

usage

See examples.

this module provides a very basic API only, for fancy things, like drawing lines, use another module, like bresenham.

drawille-canvas provides HTML5 Canvas API for drawille.

api

Canvas(w, h)

Create a new canvas with the given dimensions.
w must be multiple of 2, h must be multiple of 4.
Uses columns & rows from process.stdout as default values for w and h.

canvas.set(x, y)

Draw point on canvas at the given position.

canvas.unset(x, y)

Delete point on canvas at the given position.

canvas.toggle(x, y)

Toggle point on canvas at the given position.

canvas.clear()

Clear the whole canvas (delete every point).

canvas.frame(delimiter)

return the current content of canvas, as a delimiter-delimited
string. delimiter defaults to \n.

it uses braille characters to represent points,
so every line has length of w/2, and the string contains h/4
lines.

projects

  • vtop uses it to draw CPU and memory usage charts in the terminal
  • datop uses it to draw dat statistics
  • boscillate uses it to draw baudio soundwaves in real-time

license

MIT

主要指標

概覽
名稱與所有者madbence/node-drawille
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2014-05-05 16:43:55
推送於2022-10-16 21:40:07
最后一次提交2022-10-16 23:36:31
發布數7
最新版本名稱v1.1.1 (發布於 )
第一版名稱v0.0.3 (發布於 2014-05-21 12:48:55)
用户参与
星數1k
關注者數15
派生數28
提交數69
已啟用問題?
問題數5
打開的問題數0
拉請求數13
打開的拉請求數1
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?