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?
已存档?
是复刻?
已锁定?
是镜像?
是私有?