Documentation
¶
Index ¶
- Constants
- Variables
- func Render() []string
- func RenderFrame(progress float64, paneWidth int) []string
- type Flock
- func (f *Flock) Composite(base string, progress float64, paneWidth int, origin image.Point, ...) string
- func (f *Flock) Displaced() bool
- func (f *Flock) Leave() bool
- func (f *Flock) Near(x, y, progress float64, width int) bool
- func (f *Flock) Point(x, y float64, click bool, progress float64, width int)
- func (f *Flock) Step(elapsed time.Duration, progress float64, width int) (active, changed bool)
Constants ¶
const ( Width = 76 Height = 6 )
Variables ¶
var Lines = []string{
` ⣿⡿ ⣸⣿⠁ ⣤⡶`,
` ⢠⣶⡿⢷⣶⣿⡇⢀⣴⣾⠿⢷⣦⡀ ⣠⣶⠿⢷⣦⡀⢀⣿⡟⣠⣶⠶⠂⢠⣶⡾⢿⣶⡄ ⣴⣶⣴⡿⠂ ⣠⣶⠿⢷⣦ ⢀⣴⣾⠿⣦⣶⡶ ⣠⣶⠿⢷⣦⡀ ⣶⣶⡶⢾⣷⡆⠠⢾⣿⡷⠆`,
`⢠⣿⡏ ⣿⣿ ⣾⣿⠁ ⢈⣿⡇⢸⣿⠃ ⠉⠁⢸⣿⣿⣿⡇ ⢠⣿⣯⣤⣤⣿⡷⢀⣿⡟⠁ ⢀⣤⣤⣶⣾⣿ ⣼⣿⠁ ⢸⣿⡇⢸⣿⣧⣤⣤⣿⡇⢰⣿⡏ ⢰⣿⡇ ⣾⣿`,
`⠘⣿⣧⣀⣴⣿⡏ ⢻⣿⣄⣠⣾⡿⠁⠸⣿⣄⣠⣾⡖ ⣿⡿⠁⢹⣿⡀⠈⢿⣧⣀⣴⣶⠄⣸⣿⠃ ⢺⣿⣄⣤⣿⡏ ⢻⣿⣤⣤⣾⣿ ⠘⣿⣦⣀⣴⡦ ⣼⣿ ⣼⣿ ⠠⣿⣇⡀`,
` ⠈⠉⠉⠉⠉⠁ ⠉⠉⠉⠉ ⠈⠉⠉⠁ ⠉⠁ ⠈⠉⠁ ⠉⠉⠉⠁ ⠉⠉ ⠉⠉⠁⠉⠁ ⣤⣍⣉⣡⣿⡇ ⠈⠉⠉⠉ ⠉⠉ ⠉⠉ ⠉⠉⠁`,
` ⠙⠛⠛⠛⠋`,
}
Lines is the italic wordmark in 2×4 braille cells.
Functions ¶
func Render ¶ added in v1.162.0
func Render() []string
Render returns the static, theme-adjusted wordmark.
func RenderFrame ¶ added in v1.163.0
RenderFrame renders a pane-width particle frame. The settled hold uses Render exactly.
Types ¶
type Flock ¶ added in v1.168.0
type Flock struct {
// contains filtered or unexported fields
}
Flock adds spring-bound local motion to the existing dust trajectory. Positions and forces use braille dots rather than terminal cells.
func (*Flock) Composite ¶ added in v1.168.0
func (f *Flock) Composite(base string, progress float64, paneWidth int, origin image.Point, viewport image.Rectangle, masks []image.Rectangle) string
Composite overlays occupied braille cells only, clipping at the viewport and foreground masks. One screen buffer and one dot pass keep work linear.
func (*Flock) Displaced ¶ added in v1.168.0
Displaced reports whether the flock owns a frame, including a resting hover.
func (*Flock) Leave ¶ added in v1.168.0
Leave reports whether displaced particles need to return home.
func (*Flock) Near ¶ added in v1.168.0
Near reports whether the pointer is within the influence radius of a dot.