node-drawille

Drawing in terminal with unicode braille characters

  • Owner: madbence/node-drawille
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

Main metrics

Overview
Name With Ownermadbence/node-drawille
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-05-05 16:43:55
Pushed At2022-10-16 21:40:07
Last Commit At2022-10-16 23:36:31
Release Count7
Last Release Namev1.1.1 (Posted on )
First Release Namev0.0.3 (Posted on 2014-05-21 12:48:55)
用户参与
Stargazers Count1k
Watchers Count18
Fork Count28
Commits Count69
Has Issues Enabled
Issues Count5
Issue Open Count0
Pull Requests Count13
Pull Requests Open Count1
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private