Documentation
¶
Overview ¶
Package mark draws the Waniis mark (the W, its loop and the dot) turning in 3D, in Braille characters, for a terminal's status line. The mark's lines are points in space: each frame turns them about the vertical axis, projects them with a little perspective and lights the nearest Braille dot, so the mark reads as a thin wire shape spinning like a coin.
Index ¶
Constants ¶
const ( Cols = 6 Rows = 2 )
Size is the spinner's size in cells: two lines of six.
const Cycle = 26
Cycle is how many frames one turn takes; the mark rests near face on for part of it.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Color ¶
type Color int
Color says how many colors the terminal shows.
func DetectColor ¶
DetectColor reads the terminal's color support from the environment.
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner draws the turning mark for an animation frame: Rows lines of Cols cells, colored. Frames are computed once and reused.
func NewSpinner ¶
NewSpinner computes every frame for a terminal with the given colors.