anim

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 15 Imported by: 0

README

anim

Package anim contains a range of terminal animations. These are used on cy's splash screen and in the background while fuzzy finding.

Documentation

Index

Constants

View Source
const DEFAULT_FPS = 30

Variables

View Source
var Animations = map[string]Creator{}

Functions

func NewAnimator

func NewAnimator(
	ctx context.Context,
	animation Animation,
	initial image.Image,
	fps int,
	options ...Option,
) *taro.Program

Types

type Animation

type Animation = meta.Animation

type Animator

type Animator struct {
	// contains filtered or unexported fields
}

func (*Animator) Init added in v0.1.6

func (a *Animator) Init() tea.Cmd

func (*Animator) Update added in v0.1.6

func (a *Animator) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Animator) View added in v0.1.6

func (a *Animator) View(state *tty.State)

type Creator added in v0.1.6

type Creator = meta.Creator

type Option added in v0.1.6

type Option func(*Animator)

func WithStartTime added in v0.1.6

func WithStartTime(start time.Time) Option

Directories

Path Synopsis
* This code was ported from https://play.ertdfgcvb.xyz/#/src/contributed/slime_dish
* This code was ported from https://play.ertdfgcvb.xyz/#/src/contributed/slime_dish

Jump to

Keyboard shortcuts

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