tui

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	H = 88
	W = 320
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Launcher

type Launcher interface {
	Init(state0 []*fw.Firework, looping bool)
	Len() int
	Reset()
	Trigger(now time.Time)
	Update(now time.Time, dt time.Duration)
	Render(screen []sym.Symbol, h, w int) string
	AllFireworks() iter.Seq[*fw.Firework]
}

type Model

type Model struct {
	Launcher
	// contains filtered or unexported fields
}

func NewModel

func NewModel(show Launcher) *Model

func (Model) FPS

func (f Model) FPS() float64

FPS returns the current frames per second.

func (*Model) H

func (m *Model) H() int

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Render

func (m *Model) Render() string

func (*Model) SetDemo

func (m *Model) SetDemo()

func (*Model) Size

func (m *Model) Size() int

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (m *Model) View() tea.View

func (*Model) W

func (m *Model) W() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL